diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 5b2b526e591..5ed34d34a32 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -162,7 +162,7 @@ class PaymentReconciliation(Document): { "reference_type": inv.voucher_type, "reference_name": inv.voucher_no, - "amount": -(inv.outstanding), + "amount": -(inv.outstanding_in_account_currency), "posting_date": inv.posting_date, "currency": inv.currency, } diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 8daff9d1936..6be8fd7e60b 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -855,8 +855,8 @@ def get_outstanding_invoices( ) for d in invoice_list: - payment_amount = d.invoice_amount - d.outstanding - outstanding_amount = d.outstanding + payment_amount = d.invoice_amount_in_account_currency - d.outstanding_in_account_currency + outstanding_amount = d.outstanding_in_account_currency if outstanding_amount > 0.5 / (10**precision): if ( min_outstanding @@ -872,7 +872,7 @@ def get_outstanding_invoices( "voucher_no": d.voucher_no, "voucher_type": d.voucher_type, "posting_date": d.posting_date, - "invoice_amount": flt(d.invoice_amount), + "invoice_amount": flt(d.invoice_amount_in_account_currency), "payment_amount": payment_amount, "outstanding_amount": outstanding_amount, "due_date": d.due_date, @@ -1412,7 +1412,7 @@ def create_payment_ledger_entry( if gle.against_voucher_type else gle.voucher_type, "against_voucher_no": gle.against_voucher if gle.against_voucher else gle.voucher_no, - "currency": gle.currency, + "account_currency": gle.account_currency, "amount": dr_or_cr, "amount_in_account_currency": dr_or_cr_account_currency, "delinked": True if cancel else False,