fix: per_billed condition for Payment Entry (#34969)
This commit is contained in:
parent
f7b50f2ade
commit
d6bc8bba8b
@ -1693,7 +1693,10 @@ def get_payment_entry(
|
|||||||
):
|
):
|
||||||
reference_doc = None
|
reference_doc = None
|
||||||
doc = frappe.get_doc(dt, dn)
|
doc = frappe.get_doc(dt, dn)
|
||||||
if dt in ("Sales Order", "Purchase Order") and flt(doc.per_billed, 2) >= 99.99:
|
over_billing_allowance = frappe.db.get_single_value("Accounts Settings", "over_billing_allowance")
|
||||||
|
if dt in ("Sales Order", "Purchase Order") and flt(doc.per_billed, 2) >= (
|
||||||
|
100.0 + over_billing_allowance
|
||||||
|
):
|
||||||
frappe.throw(_("Can only make payment against unbilled {0}").format(dt))
|
frappe.throw(_("Can only make payment against unbilled {0}").format(dt))
|
||||||
|
|
||||||
if not party_type:
|
if not party_type:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user