Skip to content

Commit 7f49b57

Browse files
authored
Update added_extra_gst_custom_field_in_gstr2.py
1 parent 00330f5 commit 7f49b57

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

erpnext/patches/v10_0/added_extra_gst_custom_field_in_gstr2.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ def execute():
66
if not company:
77
return
88

9+
for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]:
10+
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
11+
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)
12+
913
make_custom_fields()
1014

1115
frappe.db.sql("""
@@ -14,6 +18,4 @@ def execute():
1418
where fieldname = 'reason_for_issuing_document'
1519
""")
1620

17-
for doctype in ["Sales Invoice", "Delivery Note", "Purchase Invoice"]:
18-
frappe.db.sql("""delete from `tabCustom Field` where dt = %s
19-
and fieldname in ('port_code', 'shipping_bill_number', 'shipping_bill_date')""", doctype)
21+

0 commit comments

Comments
 (0)