feat(payment): add advance payment status to advance payment doctypes to better track advance payments

This commit is contained in:
David Arnold
2023-10-10 20:40:50 +02:00
parent b495e5a5a1
commit c809e61103
6 changed files with 54 additions and 4 deletions

View File

@@ -1689,6 +1689,12 @@ class AccountsController(TransactionBase):
)
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
frappe.db.set_value(
self.doctype,
self.name,
"advance_payment_status",
"Partially Paid" if advance_paid < order_total else "Paid",
)
@property
def company_abbr(self):