[fix] update_salary_slip.py

This commit is contained in:
Rushabh Mehta 2017-01-19 12:51:37 +05:30
parent 683d98fd54
commit d69fd1b8c0

View File

@ -13,7 +13,9 @@ def execute():
(end_date is null or end_date = '') and docstatus != 2""", as_dict=True) (end_date is null or end_date = '') and docstatus != 2""", as_dict=True)
for salary_slip in salary_slips: for salary_slip in salary_slips:
get_start_end_date = get_month_details(salary_slip.fiscal_year, cint(salary_slip.month) + 1) if not cint(salary_slip.month):
continue
get_start_end_date = get_month_details(salary_slip.fiscal_year, cint(salary_slip.month))
start_date = get_start_end_date['month_start_date'] start_date = get_start_end_date['month_start_date']
end_date = get_start_end_date['month_end_date'] end_date = get_start_end_date['month_end_date']
frappe.db.sql("""update `tabSalary Slip` set start_date = %s, end_date = %s where name = %s""", frappe.db.sql("""update `tabSalary Slip` set start_date = %s, end_date = %s where name = %s""",