Merge pull request #39535 from ruthra-kumar/rename_advance_doctype_variable_hook

refactor: use generic name for advance doctypes variable
This commit is contained in:
ruthra kumar
2024-01-25 13:25:56 +05:30
committed by GitHub
6 changed files with 20 additions and 20 deletions

View File

@@ -1793,9 +1793,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)
@@ -1861,9 +1861,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: