Fix: Incentives was not working
This commit is contained in:
parent
c3bd22fc9f
commit
4f907e965b
@ -221,10 +221,13 @@ def get_employees(
|
||||
db: Session,
|
||||
) -> List[schema_in.IncentiveEmployee]:
|
||||
details = []
|
||||
employees = db.execute(
|
||||
select(Employee)
|
||||
.where(Employee.joining_date <= finish_date, or_(Employee.is_active, Employee.leaving_date >= start_date))
|
||||
.order_by(Employee.cost_centre_id, Employee.designation, Employee.name)
|
||||
employees = (
|
||||
db.execute(
|
||||
select(Employee)
|
||||
.where(Employee.joining_date <= finish_date, or_(Employee.is_active, Employee.leaving_date >= start_date))
|
||||
.order_by(Employee.cost_centre_id, Employee.designation, Employee.name)
|
||||
)
|
||||
.scalars()
|
||||
.all()
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user