Skip to content

Commit

Permalink
fix: Amount validation in Payment Request against Purchase Order (fra…
Browse files Browse the repository at this point in the history
…ppe#33855)

fix: Amount validation in Payment Request againt Purchase Order
  • Loading branch information
deepeshgarg007 authored Jan 29, 2023
1 parent faecf3e commit a34a1f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def validate_payment_request_amount(self):

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:
Expand Down

0 comments on commit a34a1f8

Please sign in to comment.