refactor: use generic name for advance doctypes variable

This commit is contained in:
ruthra kumar
2024-01-24 13:27:31 +05:30
parent 236c7e1e95
commit 9fcd89d456
6 changed files with 20 additions and 20 deletions

View File

@@ -1761,9 +1761,9 @@ class AccountsController(TransactionBase):
def set_total_advance_paid(self):
ple = frappe.qb.DocType("Payment Ledger Entry")
if self.doctype in frappe.get_hooks("advance_payment_customer_doctypes"):
if self.doctype in frappe.get_hooks("advance_payment_receivable_doctypes"):
party = self.customer
if self.doctype in frappe.get_hooks("advance_payment_supplier_doctypes"):
if self.doctype in frappe.get_hooks("advance_payment_payable_doctypes"):
party = self.supplier
advance = (
frappe.qb.from_(ple)
@@ -1829,9 +1829,9 @@ class AccountsController(TransactionBase):
"docstatus": 1,
},
)
if self.doctype in frappe.get_hooks("advance_payment_customer_doctypes"):
if self.doctype in frappe.get_hooks("advance_payment_receivable_doctypes"):
new_status = "Requested" if prs else "Not Requested"
if self.doctype in frappe.get_hooks("advance_payment_supplier_doctypes"):
if self.doctype in frappe.get_hooks("advance_payment_payable_doctypes"):
new_status = "Initiated" if prs else "Not Initiated"
if new_status == self.advance_payment_status: