[salary slip] total no. of working days calculation [issue] webnotes/erpnext#285

This commit is contained in:
Anand Doshi
2013-08-02 19:31:41 +05:30
parent 6cd2ed88bb
commit e79d57ca19
18 changed files with 271 additions and 46 deletions

View File

View 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'""")

View File

@@ -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",
]