Update added_extra_gst_custom_field_in_gstr2.py
diff --git a/erpnext/patches/v10_0/added_extra_gst_custom_field_in_gstr2.py b/erpnext/patches/v10_0/added_extra_gst_custom_field_in_gstr2.py
index d48c288..7b65a65 100644
--- a/erpnext/patches/v10_0/added_extra_gst_custom_field_in_gstr2.py
+++ b/erpnext/patches/v10_0/added_extra_gst_custom_field_in_gstr2.py
@@ -6,6 +6,10 @@
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 @@
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)
\ No newline at end of file
+