Salary Structure Assignment - remove to_date (#14642)

* Salary Structure Assignment - remove to_date

* fix Salary Assignment - remove to_date

* Salary Slip - fix codacy remove sting based query, add end_date to condition
This commit is contained in:
Ranjith Kurungadam
2018-06-25 10:29:54 +05:30
committed by Nabin Hait
parent 8044d09d50
commit b4ad3c3f77
5 changed files with 11 additions and 80 deletions

View File

@@ -303,9 +303,7 @@ def get_salary_assignment(employee, date):
select * from `tabSalary Structure Assignment`
where employee=%(employee)s
and docstatus = 1
and (
(%(on_date)s between from_date and ifnull(to_date, '2199-12-31'))
)""", {
and %(on_date)s >= from_date order by from_date desc limit 1""", {
'employee': employee,
'on_date': date,
}, as_dict=1)