Skip to content

Commit

Permalink
fix: display amount in account currency if party is supplied
Browse files Browse the repository at this point in the history
(cherry picked from commit e5b04d5)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Aug 25, 2022
1 parent 362976f commit 15915d7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ def update_voucher_balance(self, ple):
if not row:
return

amount = ple.amount
# amount in "Party Currency", if its supplied. If not, amount in company currency
if self.filters.get(scrub(self.party_type)):
amount = ple.amount_in_account_currency
else:
amount = ple.amount
amount_in_account_currency = ple.amount_in_account_currency

# update voucher
Expand Down Expand Up @@ -685,7 +689,7 @@ def get_ple_entries(self):
ple.party,
ple.posting_date,
ple.due_date,
ple.account_currency.as_("currency"),
ple.account_currency,
ple.amount,
ple.amount_in_account_currency,
)
Expand Down

0 comments on commit 15915d7

Please sign in to comment.