fix: travis
This commit is contained in:
parent
0ec01d98d6
commit
8ed7535e8a
@ -424,12 +424,11 @@ def make_status_as_paid(doc, method):
|
|||||||
"docstatus": 1})
|
"docstatus": 1})
|
||||||
|
|
||||||
if payment_request_name:
|
if payment_request_name:
|
||||||
outstanding_amt = frappe.get_value(ref.reference_doctype, ref.reference_name, 'outstanding_amount')
|
|
||||||
doc = frappe.get_doc("Payment Request", payment_request_name)
|
doc = frappe.get_doc("Payment Request", payment_request_name)
|
||||||
if doc.status != "Paid" and outstanding_amt <= 0:
|
if doc.status != "Paid" and ref.outstanding_amount <= ref.allocated_amount:
|
||||||
doc.db_set('status', 'Paid')
|
doc.db_set('status', 'Paid')
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
elif doc.status != "Partially Paid" and outstanding_amt != doc.grand_total:
|
elif doc.status != "Partially Paid" and ref.outstanding_amount != ref.allocated_amount:
|
||||||
doc.db_set('status', 'Partially Paid')
|
doc.db_set('status', 'Partially Paid')
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user