mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: resolve dunning
This commit is contained in:
@@ -84,8 +84,9 @@ def resolve_dunning(doc, state):
|
|||||||
resolve = True
|
resolve = True
|
||||||
dunning = frappe.get_doc("Dunning", dunning_name)
|
dunning = frappe.get_doc("Dunning", dunning_name)
|
||||||
for overdue_payment in dunning.overdue_payments:
|
for overdue_payment in dunning.overdue_payments:
|
||||||
outstanding = frappe.get_value("Payment Schedule", overdue_payment.payment_schedule, "outstanding")
|
outstanding_inv = frappe.get_value("Sales Invoice", overdue_payment.sales_invoice, "outstanding_amount")
|
||||||
if outstanding >= 0:
|
outstanding_ps = frappe.get_value("Payment Schedule", overdue_payment.payment_schedule, "outstanding")
|
||||||
|
if outstanding_ps > 0 and outstanding_inv > 0:
|
||||||
resolve = False
|
resolve = False
|
||||||
|
|
||||||
if resolve:
|
if resolve:
|
||||||
|
|||||||
Reference in New Issue
Block a user