mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] set sign on amount / amount_currency
This commit is contained in:
committed by
Yannick Vaucher
parent
eef85a6936
commit
b7d280e753
@@ -61,6 +61,10 @@ class account_statement_from_invoice_lines(models.TransientModel):
|
||||
amount = from_currency_id.with_context(date=line_date).compute(line.amount_residual_currency,
|
||||
line.invoice.currency_id)
|
||||
amount_currency = line.amount_residual_currency
|
||||
# we test how to apply sign
|
||||
if line.journal_id.type in ['sale_refund','purchase']:
|
||||
amount_currency = -amount_currency
|
||||
amount = -amount
|
||||
ctx = {}
|
||||
ctx.update({'move_line_ids': [line.id],
|
||||
'invoice_id': line.invoice.id})
|
||||
|
||||
Reference in New Issue
Block a user