2018-02-16 07:49:04 +00:00
|
|
|
import frappe
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2018-02-16 07:49:04 +00:00
|
|
|
from erpnext.regional.india.setup import make_custom_fields
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2018-02-16 07:49:04 +00:00
|
|
|
|
|
|
|
def execute():
|
|
|
|
company = frappe.get_all("Company", filters={"country": "India"})
|
|
|
|
if not company:
|
|
|
|
return
|
|
|
|
|
2020-06-19 13:47:57 +00:00
|
|
|
frappe.reload_doc("Payroll", "doctype", "payroll_period")
|
|
|
|
frappe.reload_doc("Payroll", "doctype", "employee_tax_exemption_declaration")
|
|
|
|
frappe.reload_doc("Payroll", "doctype", "employee_tax_exemption_proof_submission")
|
|
|
|
frappe.reload_doc("Payroll", "doctype", "employee_tax_exemption_declaration_category")
|
|
|
|
frappe.reload_doc("Payroll", "doctype", "employee_tax_exemption_proof_submission_detail")
|
2018-09-07 10:44:44 +00:00
|
|
|
|
2020-01-15 13:27:54 +00:00
|
|
|
frappe.reload_doc("accounts", "doctype", "tax_category")
|
|
|
|
|
2018-02-22 12:47:57 +00:00
|
|
|
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,
|
|
|
|
)
|
|
|
|
|
2018-09-07 10:44:44 +00:00
|
|
|
make_custom_fields()
|
2018-02-16 07:49:04 +00:00
|
|
|
|
|
|
|
frappe.db.sql(
|
|
|
|
"""
|
|
|
|
update `tabCustom Field`
|
|
|
|
set reqd = 0, `default` = ''
|
|
|
|
where fieldname = 'reason_for_issuing_document'
|
|
|
|
"""
|
|
|
|
)
|
2018-07-17 12:52:51 +00:00
|
|
|
|
2018-09-07 10:44:44 +00:00
|
|
|
frappe.db.sql(
|
|
|
|
"""
|
|
|
|
update tabAddress
|
|
|
|
set gst_state_number=concat("0", gst_state_number)
|
|
|
|
where ifnull(gst_state_number, '') != '' and gst_state_number<10
|
2020-01-15 13:27:54 +00:00
|
|
|
"""
|
|
|
|
)
|