Update added_extra_gst_custom_field_in_gstr2.py

This commit is contained in:
Nabin Hait 2018-02-22 18:17:57 +05:30 committed by GitHub
parent 00330f52bd
commit 7f49b57aaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,10 @@ def execute():
if not company:
return
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)
make_custom_fields()
frappe.db.sql("""
@ -14,6 +18,4 @@ def execute():
where fieldname = 'reason_for_issuing_document'
""")
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)