hotfix in patch

This commit is contained in:
Nabin Hait 2015-04-17 16:15:25 +05:30
parent 4743cbe002
commit 0287b1f75c

View File

@ -8,6 +8,7 @@ def execute():
cancelled_invoices = frappe.db.sql_list("""select name from `tabSales Invoice`
where docstatus = 2 and ifnull(update_stock, 0) = 1""")
if cancelled_invoices:
frappe.db.sql("""delete from `tabGL Entry`
where voucher_type = 'Sales Invoice' and voucher_no in (%s)"""
% (', '.join(['%s']*len(cancelled_invoices))), tuple(cancelled_invoices))