2018-06-29 14:35:58 +05:30
|
|
|
import frappe
|
|
|
|
|
2021-09-02 16:44:59 +05:30
|
|
|
|
2018-06-29 14:35:58 +05:30
|
|
|
def execute():
|
2020-06-19 19:17:57 +05:30
|
|
|
frappe.reload_doc("Payroll", "doctype", "salary_detail")
|
|
|
|
frappe.reload_doc("Payroll", "doctype", "salary_component")
|
2018-06-29 14:35:58 +05:30
|
|
|
|
2020-04-26 17:45:57 +05:30
|
|
|
frappe.db.sql("update `tabSalary Component` set is_tax_applicable=1 where type='Earning'")
|
2018-06-29 14:35:58 +05:30
|
|
|
|
2018-06-29 17:30:29 +05:30
|
|
|
frappe.db.sql(
|
|
|
|
"""update `tabSalary Component` set variable_based_on_taxable_salary=1
|
|
|
|
where type='Deduction' and name in ('TDS', 'Tax Deducted at Source')"""
|
|
|
|
)
|
|
|
|
|
|
|
|
frappe.db.sql(
|
|
|
|
"""update `tabSalary Detail` set is_tax_applicable=1
|
|
|
|
where parentfield='earnings' and statistical_component=0"""
|
|
|
|
)
|
|
|
|
frappe.db.sql(
|
|
|
|
"""update `tabSalary Detail` set variable_based_on_taxable_salary=1
|
|
|
|
where parentfield='deductions' and salary_component in ('TDS', 'Tax Deducted at Source')"""
|
|
|
|
)
|