Update delivery and billing status in SO

This commit is contained in:
nabinhait 2014-07-07 18:02:53 +05:30
parent 2c0c66e756
commit 6c40079139

View File

@ -6,7 +6,7 @@ import frappe
def execute():
frappe.db.sql("""update `tabSales Order` set delivery_status = 'Not Delivered'
where delivery_status = 'Delivered' and ifnull(per_delivered, 0) = 0""")
where delivery_status = 'Delivered' and ifnull(per_delivered, 0) = 0 and docstatus = 0""")
frappe.db.sql("""update `tabSales Order` set billing_status = 'Not Billed'
where billing_status = 'Billed' and ifnull(per_billed, 0) = 0""")
where billing_status = 'Billed' and ifnull(per_billed, 0) = 0 and docstatus = 0""")