style(salary-slip): fixed formatting
This commit is contained in:
parent
e9affd97ac
commit
75397b441f
@ -255,16 +255,19 @@ class SalarySlip(TransactionBase):
|
|||||||
for d in range(working_days):
|
for d in range(working_days):
|
||||||
dt = add_days(cstr(getdate(self.start_date)), d)
|
dt = add_days(cstr(getdate(self.start_date)), d)
|
||||||
leave = frappe.db.sql("""
|
leave = frappe.db.sql("""
|
||||||
select t1.name, case when t1.half_day_date = %(dt)s or t1.to_date = t1.from_date then t1.half_day else 0 end half_day
|
SELECT t1.name,
|
||||||
from `tabLeave Application` t1, `tabLeave Type` t2
|
CASE WHEN t1.half_day_date = %(dt)s or t1.to_date = t1.from_date
|
||||||
where t2.name = t1.leave_type
|
THEN t1.half_day else 0 END
|
||||||
and t2.is_lwp = 1
|
FROM `tabLeave Application` t1, `tabLeave Type` t2
|
||||||
and t1.docstatus = 1
|
WHERE t2.name = t1.leave_type
|
||||||
and t1.employee = %(employee)s
|
AND t2.is_lwp = 1
|
||||||
and CASE WHEN t2.include_holiday != 1 THEN %(dt)s not in ('{0}') and %(dt)s between from_date and to_date and ifnull(t1.salary_slip, '') = ''
|
AND t1.docstatus = 1
|
||||||
|
AND t1.employee = %(employee)s
|
||||||
|
AND CASE WHEN t2.include_holiday != 1 THEN %(dt)s not in ('{0}') and %(dt)s between from_date and to_date and ifnull(t1.salary_slip, '') = ''
|
||||||
WHEN t2.include_holiday THEN %(dt)s between from_date and to_date and ifnull(t1.salary_slip, '') = ''
|
WHEN t2.include_holiday THEN %(dt)s between from_date and to_date and ifnull(t1.salary_slip, '') = ''
|
||||||
END
|
END
|
||||||
""".format(holidays), {"employee": self.employee, "dt": dt})
|
""".format(holidays), {"employee": self.employee, "dt": dt})
|
||||||
|
|
||||||
if leave:
|
if leave:
|
||||||
lwp = cint(leave[0][1]) and (lwp + 0.5) or (lwp + 1)
|
lwp = cint(leave[0][1]) and (lwp + 0.5) or (lwp + 1)
|
||||||
return lwp
|
return lwp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user