mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-09 21:37:38 +00:00
Added date filters for the Timesheet query in Salary Slip
This commit is contained in:
@@ -64,8 +64,8 @@ class SalarySlip(TransactionBase):
|
||||
if self.salary_slip_based_on_timesheet and not self.get('timesheets'):
|
||||
self.set("timesheets", [])
|
||||
|
||||
timesheets = frappe.db.sql(""" select * from `tabTimesheet` where employee = %(employee)s and (status = 'Submitted' or
|
||||
status = 'Billed')""", {'employee': self.employee}, as_dict=1)
|
||||
timesheets = frappe.db.sql(""" select * from `tabTimesheet` where employee = %(employee)s and start_date BETWEEN %(start_date)s AND %(end_date)s and (status = 'Submitted' or
|
||||
status = 'Billed')""", {'employee': self.employee, 'start_date': self.start_date, 'end_date': self.end_date}, as_dict=1)
|
||||
|
||||
for data in timesheets:
|
||||
self.append('timesheets', {
|
||||
|
||||
Reference in New Issue
Block a user