From 78795643cc13fe544cab03eb3989bd7ee8f31f07 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 19 Feb 2023 13:38:02 +0530 Subject: [PATCH] fix: consider rounded total amount while making payment request (#34110) fix: consider rounded total amount while making payment request (#34110) (cherry picked from commit 9c6466f15b90b9100635b76356f0a68426b053b1) Co-authored-by: ruthra kumar --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 86c373cf93d..b0ee5885482 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -495,7 +495,7 @@ def get_amount(ref_doc, payment_account=None): """get amount based on doctype""" dt = ref_doc.doctype if dt in ["Sales Order", "Purchase Order"]: - grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid) + grand_total = flt(ref_doc.rounded_total) - flt(ref_doc.advance_paid) elif dt in ["Sales Invoice", "Purchase Invoice"]: if ref_doc.party_account_currency == ref_doc.currency: