Ejemplo n.º 1
0
def execute():
    frappe.reload_doc("stock", "doctype", "item")
    frappe.reload_doc("stock", "doctype", "customs_tariff_number")
    frappe.reload_doc("accounts", "doctype", "payment_terms_template")
    frappe.reload_doc("accounts", "doctype", "payment_schedule")

    company = frappe.get_all("Company", filters={"country": "India"})
    if not company:
        return

    frappe.reload_doc("regional", "doctype", "gst_settings")
    frappe.reload_doc("regional", "doctype", "gst_hsn_code")

    for report_name in (
            "GST Sales Register",
            "GST Purchase Register",
            "GST Itemised Sales Register",
            "GST Itemised Purchase Register",
    ):

        frappe.reload_doc("regional", "report", frappe.scrub(report_name))

    from erpnext.regional.india.setup import setup

    delete_custom_field_tax_id_if_exists()
    setup(patch=True)
    send_gst_update_email()
Ejemplo n.º 2
0
def execute():
    company = frappe.get_all('Company', filters={'country': 'India'})
    if not company:
        return

    # call setup for india
    setup(patch=True)
Ejemplo n.º 3
0
def execute():
	company = frappe.get_all('Company', filters = {'country': 'India'})
	if not company:
		return

	# call setup for india
	setup(patch=True)
Ejemplo n.º 4
0
def execute():
	frappe.reload_doc('regional', 'doctype', 'gst_settings')
	frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')

	for report_name in ('GST Sales Register', 'GST Purchase Register',
		'GST Itemised Sales Register', 'GST Itemised Purchase Register'):

		frappe.reload_doc('regional', 'report', frappe.scrub(report_name))

	if frappe.db.get_single_value('System Settings', 'country')=='India':
		from erpnext.regional.india.setup import setup
		delete_custom_field_tax_id_if_exists()
		setup(patch=True)
		send_gst_update_email()
Ejemplo n.º 5
0
def execute():
	frappe.reload_doc('regional', 'doctype', 'gst_settings')
	frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
	frappe.reload_doc('stock', 'doctype', 'item')
	frappe.reload_doc("stock", "doctype", "customs_tariff_number")

	for report_name in ('GST Sales Register', 'GST Purchase Register',
		'GST Itemised Sales Register', 'GST Itemised Purchase Register'):

		frappe.reload_doc('regional', 'report', frappe.scrub(report_name))

	if frappe.db.get_single_value('System Settings', 'country')=='India':
		from erpnext.regional.india.setup import setup
		delete_custom_field_tax_id_if_exists()
		setup(patch=True)
		send_gst_update_email()
Ejemplo n.º 6
0
def execute():
	frappe.reload_doc('stock', 'doctype', 'item')
	frappe.reload_doc("stock", "doctype", "customs_tariff_number")

	company = frappe.get_all('Company', filters = {'country': 'India'})
	if not company:
		return

	frappe.reload_doc('regional', 'doctype', 'gst_settings')
	frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')

	for report_name in ('GST Sales Register', 'GST Purchase Register',
		'GST Itemised Sales Register', 'GST Itemised Purchase Register'):

		frappe.reload_doc('regional', 'report', frappe.scrub(report_name))

	from erpnext.regional.india.setup import setup
	delete_custom_field_tax_id_if_exists()
	setup(patch=True)
	send_gst_update_email()
Ejemplo n.º 7
0
def execute():

    doctypes = [
        'salary_component', 'Employee Tax Exemption Declaration',
        'Employee Tax Exemption Proof Submission',
        'Employee Tax Exemption Declaration Category',
        'Employee Tax Exemption Proof Submission Detail'
    ]

    for doctype in doctypes:
        frappe.reload_doc('Payroll', 'doctype', doctype)

    reports = ['Professional Tax Deductions', 'Provident Fund Deductions']
    for report in reports:
        frappe.reload_doc('Regional', 'Report', report)
        frappe.reload_doc('Regional', 'Report', report)

    if erpnext.get_region() == "India":
        setup(patch=True)

    if frappe.db.exists("Salary Component", "Income Tax"):
        frappe.db.set_value("Salary Component", "Income Tax",
                            "is_income_tax_component", 1)
    if frappe.db.exists("Salary Component", "TDS"):
        frappe.db.set_value("Salary Component", "TDS",
                            "is_income_tax_component", 1)

    components = frappe.db.sql(
        "select name from `tabSalary Component` where variable_based_on_taxable_salary = 1",
        as_dict=1)
    for component in components:
        frappe.db.set_value("Salary Component", component.name,
                            "is_income_tax_component", 1)

    if erpnext.get_region() == "India":
        if frappe.db.exists("Salary Component", "Provident Fund"):
            frappe.db.set_value("Salary Component", "Provident Fund",
                                "component_type", "Provident Fund")
        if frappe.db.exists("Salary Component", "Professional Tax"):
            frappe.db.set_value("Salary Component", "Professional Tax",
                                "component_type", "Professional Tax")
Ejemplo n.º 8
0
def execute():
    frappe.reload_doc('stock', 'doctype', 'item')
    frappe.reload_doc("stock", "doctype", "customs_tariff_number")

    company = frappe.get_all('Company', filters={'country': 'India'})
    if not company:
        return

    frappe.reload_doc('regional', 'doctype', 'gst_settings')
    frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')

    for report_name in ('GST Sales Register', 'GST Purchase Register',
                        'GST Itemised Sales Register',
                        'GST Itemised Purchase Register'):

        frappe.reload_doc('regional', 'report', frappe.scrub(report_name))

    from erpnext.regional.india.setup import setup
    delete_custom_field_tax_id_if_exists()
    setup(patch=True)
    send_gst_update_email()