2019-04-22 07:54:02 +00:00
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-04-22 07:54:02 +00:00
|
|
|
import frappe
|
|
|
|
from frappe import scrub
|
|
|
|
from frappe.model.utils.rename_field import rename_field
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-04-22 07:54:02 +00:00
|
|
|
def execute():
|
|
|
|
for doctype in ("Salary Component", "Salary Detail"):
|
|
|
|
if "depends_on_lwp" in frappe.db.get_table_columns(doctype):
|
2020-06-19 13:47:57 +00:00
|
|
|
frappe.reload_doc("Payroll", "doctype", scrub(doctype))
|
2019-04-22 07:54:02 +00:00
|
|
|
rename_field(doctype, "depends_on_lwp", "depends_on_payment_days")
|