mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
fix: On cancel flow
This commit is contained in:
@@ -1019,12 +1019,15 @@ class PaymentEntry(AccountsController):
|
|||||||
|
|
||||||
gl_entries.append(gle)
|
gl_entries.append(gle)
|
||||||
|
|
||||||
def make_advance_gl_entries(self, cancel=0):
|
def make_advance_gl_entries(self, against_voucher_type=None, against_voucher=None, cancel=0):
|
||||||
if self.book_advance_payments_in_separate_party_account:
|
if self.book_advance_payments_in_separate_party_account:
|
||||||
gl_entries = []
|
gl_entries = []
|
||||||
for d in self.get("references"):
|
for d in self.get("references"):
|
||||||
if d.reference_doctype in ("Sales Invoice", "Purchase Invoice"):
|
if d.reference_doctype in ("Sales Invoice", "Purchase Invoice"):
|
||||||
self.make_invoice_liability_entry(gl_entries, d)
|
if not (against_voucher_type and against_voucher) or (
|
||||||
|
d.reference_doctype == against_voucher_type and d.reference_name == against_voucher
|
||||||
|
):
|
||||||
|
self.make_invoice_liability_entry(gl_entries, d)
|
||||||
|
|
||||||
if cancel:
|
if cancel:
|
||||||
for entry in gl_entries:
|
for entry in gl_entries:
|
||||||
|
|||||||
Reference in New Issue
Block a user