mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
refactor: fetch correct hook variable
This commit is contained in:
@@ -349,9 +349,8 @@ class AccountsController(TransactionBase):
|
|||||||
adv = qb.DocType("Advance Payment Ledger Entry")
|
adv = qb.DocType("Advance Payment Ledger Entry")
|
||||||
qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run()
|
qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run()
|
||||||
|
|
||||||
advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
|
advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes")
|
||||||
"advance_payment_payable_doctypes"
|
|
||||||
)
|
|
||||||
if self.doctype in advance_payment_doctypes:
|
if self.doctype in advance_payment_doctypes:
|
||||||
qb.from_(adv).delete().where(
|
qb.from_(adv).delete().where(
|
||||||
adv.against_voucher_type.eq(self.doctype) & adv.against_voucher_no.eq(self.name)
|
adv.against_voucher_type.eq(self.doctype) & adv.against_voucher_no.eq(self.name)
|
||||||
@@ -2562,9 +2561,7 @@ class AccountsController(TransactionBase):
|
|||||||
repost_ledger.submit()
|
repost_ledger.submit()
|
||||||
|
|
||||||
def get_advance_payment_doctypes(self) -> list:
|
def get_advance_payment_doctypes(self) -> list:
|
||||||
return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
|
return frappe.get_hooks("advance_payment_doctypes")
|
||||||
"advance_payment_payable_doctypes"
|
|
||||||
)
|
|
||||||
|
|
||||||
def make_advance_payment_ledger_for_journal(self):
|
def make_advance_payment_ledger_for_journal(self):
|
||||||
advance_payment_doctypes = self.get_advance_payment_doctypes()
|
advance_payment_doctypes = self.get_advance_payment_doctypes()
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ from frappe.query_builder.custom import ConstantColumn
|
|||||||
|
|
||||||
|
|
||||||
def get_advance_doctypes() -> list:
|
def get_advance_doctypes() -> list:
|
||||||
return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
|
return frappe.get_hooks("advance_payment_doctypes")
|
||||||
"advance_payment_payable_doctypes"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_payments_with_so_po_reference() -> list:
|
def get_payments_with_so_po_reference() -> list:
|
||||||
|
|||||||
Reference in New Issue
Block a user