[patch] delete gl entries for cancelled vouchers
This commit is contained in:
parent
145e5e26fa
commit
decf51de4a
@ -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']))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user