[fix] remove gstr2 fields from Sales Invoice and Delivery Note too (#13047)

This commit is contained in:
Saurabh 2018-02-22 18:05:40 +05:30 committed by Nabin Hait
parent 2949e9c5dc
commit d8cd54dfd0

View File

@ -14,5 +14,6 @@ def execute():
where fieldname = 'reason_for_issuing_document'
""")
frappe.db.sql("""delete from `tabCustom Field` where dt = 'Purchase Invoice'
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""")
for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]:
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)