58ee6c1e08
* Feat: Multiple tax as per new taxation rule * patch:for multiple tax slab, fix: payroll and exemption validation * Test: Fixture * feat: income tax slab with other charges and tax exempted deduction components * fix: added missing init file * fix: Patch fixed * fix: Patch fixed * fix: test fixes * fix: validate duplicate exemption declaration * fix: payment entry test case Co-authored-by: Anurag Mishra <mishranaman123@gmail.com>
16 lines
752 B
Python
16 lines
752 B
Python
from __future__ import unicode_literals
|
|
import frappe
|
|
|
|
def execute():
|
|
frappe.reload_doc('hr', 'doctype', 'salary_detail')
|
|
frappe.reload_doc('hr', 'doctype', 'salary_component')
|
|
|
|
frappe.db.sql("update `tabSalary Component` set is_tax_applicable=1 where type='Earning'")
|
|
|
|
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')""") |