[patch] delete gl entries for cancelled vouchers

This commit is contained in:
Nabin Hait 2013-10-22 23:55:34 +05:30
parent 145e5e26fa
commit decf51de4a

View File

@ -11,6 +11,7 @@ def execute():
and docstatus=2""" % (entry['voucher_type'], "%s"), entry['voucher_no'])
is_cancelled = docstatus and 'Yes' or None
if is_cancelled:
print entry['voucher_type'], entry['voucher_no']
webnotes.conn.sql("""update `tabGL Entry` set is_cancelled = 'Yes'
where voucher_type = %s and voucher_no = %s""",
(entry['voucher_type'], entry['voucher_no']))