fix: wrong paid and cn amount on pos invoice

(cherry picked from commit 5cb5e09dbb)
This commit is contained in:
Dany Robert
2023-12-16 04:35:43 +00:00
committed by Mergify
parent 4114760efd
commit 77da0da945

View File

@@ -244,8 +244,12 @@ class ReceivablePayableReport(object):
row.invoiced_in_account_currency += amount_in_account_currency
else:
if self.is_invoice(ple):
row.credit_note -= amount
row.credit_note_in_account_currency -= amount_in_account_currency
if row.voucher_no == ple.voucher_no == ple.against_voucher_no:
row.paid -= amount
row.paid_in_account_currency -= amount_in_account_currency
else:
row.credit_note -= amount
row.credit_note_in_account_currency -= amount_in_account_currency
else:
row.paid -= amount
row.paid_in_account_currency -= amount_in_account_currency