refactor: convert amount to base currency for advances

(cherry picked from commit c9ede1ffbe)
This commit is contained in:
ruthra kumar
2024-05-09 11:06:06 +05:30
committed by Mergify
parent 199a64937b
commit 5d2f296ca8

View File

@@ -1250,7 +1250,7 @@ class PaymentEntry(AccountsController):
dr_or_cr, account = self.get_dr_and_account_for_advances(invoice)
args_dict["account"] = account
args_dict[dr_or_cr] = invoice.allocated_amount
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict.update(
{
@@ -1269,7 +1269,7 @@ class PaymentEntry(AccountsController):
args_dict[dr_or_cr + "_in_account_currency"] = 0
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
args_dict["account"] = self.party_account
args_dict[dr_or_cr] = invoice.allocated_amount
args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice)
args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount
args_dict.update(
{