mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge pull request #28600 from frappe/mergify/bp/version-13-hotfix/pr-28592
fix: do not add gst fields if no indian company (backport #28592)
This commit is contained in:
@@ -292,7 +292,7 @@ erpnext.patches.v13_0.rename_issue_status_hold_to_on_hold
|
|||||||
erpnext.patches.v13_0.bill_for_rejected_quantity_in_purchase_invoice
|
erpnext.patches.v13_0.bill_for_rejected_quantity_in_purchase_invoice
|
||||||
erpnext.patches.v13_0.update_job_card_details
|
erpnext.patches.v13_0.update_job_card_details
|
||||||
erpnext.patches.v13_0.update_level_in_bom #1234sswef
|
erpnext.patches.v13_0.update_level_in_bom #1234sswef
|
||||||
erpnext.patches.v13_0.create_gst_payment_entry_fields
|
erpnext.patches.v13_0.create_gst_payment_entry_fields #27-11-2021
|
||||||
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry
|
||||||
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
erpnext.patches.v13_0.update_subscription_status_in_memberships
|
||||||
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ def execute():
|
|||||||
frappe.reload_doc('accounts', 'doctype', 'advance_taxes_and_charges')
|
frappe.reload_doc('accounts', 'doctype', 'advance_taxes_and_charges')
|
||||||
frappe.reload_doc('accounts', 'doctype', 'payment_entry')
|
frappe.reload_doc('accounts', 'doctype', 'payment_entry')
|
||||||
|
|
||||||
|
if frappe.db.exists('Company', {'country': 'India'}):
|
||||||
custom_fields = {
|
custom_fields = {
|
||||||
'Payment Entry': [
|
'Payment Entry': [
|
||||||
dict(fieldname='gst_section', label='GST Details', fieldtype='Section Break', insert_after='deductions',
|
dict(fieldname='gst_section', label='GST Details', fieldtype='Section Break', insert_after='deductions',
|
||||||
@@ -30,3 +31,7 @@ def execute():
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_custom_fields(custom_fields, update=True)
|
create_custom_fields(custom_fields, update=True)
|
||||||
|
else:
|
||||||
|
fields = ['gst_section', 'company_address', 'company_gstin', 'place_of_supply', 'customer_address', 'customer_gstin']
|
||||||
|
for field in fields:
|
||||||
|
frappe.delete_doc_if_exists("Custom Field", f"Payment Entry-{field}")
|
||||||
Reference in New Issue
Block a user