mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
[salary slip] total no. of working days calculation [issue] webnotes/erpnext#285
This commit is contained in:
0
patches/august_2013/__init__.py
Normal file
0
patches/august_2013/__init__.py
Normal file
16
patches/august_2013/p01_hr_settings.py
Normal file
16
patches/august_2013/p01_hr_settings.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("hr", "doctype", "hr_settings")
|
||||
webnotes.reload_doc("setup", "doctype", "global_defaults")
|
||||
|
||||
hr = webnotes.bean("HR Settings", "HR Settings")
|
||||
hr.doc.emp_created_by = webnotes.conn.get_value("Global Defaults", "Global Defaults", "emp_created_by")
|
||||
|
||||
if webnotes.conn.sql("""select name from `tabSalary Slip` where docstatus=1 limit 1"""):
|
||||
hr.doc.include_holidays_in_total_working_days = 1
|
||||
|
||||
hr.save()
|
||||
|
||||
webnotes.conn.sql("""delete from `tabSingles` where doctype = 'Global Defaults'
|
||||
and field = 'emp_created_by'""")
|
||||
@@ -264,4 +264,5 @@ patch_list = [
|
||||
"patches.july_2013.p10_change_partner_user_to_website_user",
|
||||
"patches.july_2013.p11_update_price_list_currency",
|
||||
"execute:webnotes.bean('Selling Settings').save() #2013-07-29",
|
||||
"patches.august_2013.p01_hr_settings",
|
||||
]
|
||||
Reference in New Issue
Block a user