mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 11:15:10 +00:00
fix: Amount validation in Payment Request against Purchase Order (#33855)
fix: Amount validation in Payment Request against Purchase Order (#33855)
fix: Amount validation in Payment Request againt Purchase Order
(cherry picked from commit a34a1f8fd2)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ class PaymentRequest(Document):
|
||||
|
||||
if existing_payment_request_amount:
|
||||
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
|
||||
if hasattr(ref_doc, "order_type") and getattr(ref_doc, "order_type") != "Shopping Cart":
|
||||
if not hasattr(ref_doc, "order_type") or getattr(ref_doc, "order_type") != "Shopping Cart":
|
||||
ref_amount = get_amount(ref_doc, self.payment_account)
|
||||
|
||||
if existing_payment_request_amount + flt(self.grand_total) > ref_amount:
|
||||
|
||||
Reference in New Issue
Block a user