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