fix: delete PLE containing invoice in against
This commit is contained in:
parent
408ea0432b
commit
c1e1fd8829
@ -345,6 +345,7 @@ class AccountsController(TransactionBase):
|
|||||||
ple = frappe.qb.DocType("Payment Ledger Entry")
|
ple = frappe.qb.DocType("Payment Ledger Entry")
|
||||||
frappe.qb.from_(ple).delete().where(
|
frappe.qb.from_(ple).delete().where(
|
||||||
(ple.voucher_type == self.doctype) & (ple.voucher_no == self.name)
|
(ple.voucher_type == self.doctype) & (ple.voucher_no == self.name)
|
||||||
|
| ((ple.against_voucher_type == self.doctype) & (ple.against_voucher_no == self.name))
|
||||||
).run()
|
).run()
|
||||||
frappe.db.sql(
|
frappe.db.sql(
|
||||||
"delete from `tabGL Entry` where voucher_type=%s and voucher_no=%s", (self.doctype, self.name)
|
"delete from `tabGL Entry` where voucher_type=%s and voucher_no=%s", (self.doctype, self.name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user