mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
[patch] delete gl entries for cancelled vouchers
This commit is contained in:
@@ -11,6 +11,7 @@ def execute():
|
|||||||
and docstatus=2""" % (entry['voucher_type'], "%s"), entry['voucher_no'])
|
and docstatus=2""" % (entry['voucher_type'], "%s"), entry['voucher_no'])
|
||||||
is_cancelled = docstatus and 'Yes' or None
|
is_cancelled = docstatus and 'Yes' or None
|
||||||
if is_cancelled:
|
if is_cancelled:
|
||||||
|
print entry['voucher_type'], entry['voucher_no']
|
||||||
webnotes.conn.sql("""update `tabGL Entry` set is_cancelled = 'Yes'
|
webnotes.conn.sql("""update `tabGL Entry` set is_cancelled = 'Yes'
|
||||||
where voucher_type = %s and voucher_no = %s""",
|
where voucher_type = %s and voucher_no = %s""",
|
||||||
(entry['voucher_type'], entry['voucher_no']))
|
(entry['voucher_type'], entry['voucher_no']))
|
||||||
|
|||||||
Reference in New Issue
Block a user