289c82243f
* feat: Moved Document to Payroll Module * feat: Moved Reports to Payroll Module * feat: Moved Print fromat With Patch * feat: Moved Notifiction to Payroll Module and patches * feat: added dashboard and desk page to Payroll * feat: Payroll Dashboard * feat: Module onboarding * feat: Income tax Deductions Report * feat: Ecs Checklist Report * feat: Provident Fund Report * feat: Professional Fund report and commonified Code * feat: Total Payments Based On Payment Mode Report * fix: refactor and added chart Total Payments Based On Payment Mode * feat: Payroll Settings * fix: Bank remittance Report * feat(Payroll based on): Considered unmarked days * feat: Added Help for condition an formula in Salary structure * fix: requested changes * fix: rename report Ecs checklist to salary_payments_via_ecs * fix: renamed report report/total_payments_based_on_payment_mode * fix: added role via setup.py for regional report * feat: added All reports to desk page * fix: frappe.reload doc in all patches * fix: codacy * fix: frappe.reload_doctype for patches * patch: is_income_tax_component and component_type for salary component * fix: uncommented code * test: fixture * fix: test * test: test_payment_days_based_on_attendance
24 lines
1.2 KiB
Python
24 lines
1.2 KiB
Python
# Copyright (c) 2019, Frappe and Contributors
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe, erpnext
|
|
|
|
def execute():
|
|
frappe.reload_doc('Payroll', 'doctype', 'salary_structure')
|
|
|
|
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") |