Skip to content

Commit

Permalink
fix: wrong paid and cn amount on pos invoice
Browse files Browse the repository at this point in the history
(cherry picked from commit 5cb5e09)
  • Loading branch information
rtdany10 authored and mergify[bot] committed Dec 19, 2023
1 parent 4114760 commit 77da0da
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,12 @@ def update_voucher_balance(self, ple):
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
Expand Down

0 comments on commit 77da0da

Please sign in to comment.