fix(sick-hours): fix issue where sicks hours are not properly being deducted nor reimbursed
This commit is contained in:
parent
14db036a69
commit
afa8694e1e
|
|
@ -143,11 +143,11 @@ export class SickLeaveService {
|
|||
await tx.paidTimeOff.update({
|
||||
where: { employee_id: employee.id },
|
||||
data: {
|
||||
banked_hours: { decrement: asked_hours },
|
||||
sick_hours: { decrement: asked_hours },
|
||||
last_updated: new Date(),
|
||||
},
|
||||
select: { banked_hours: true },
|
||||
});
|
||||
|
||||
return { success: true, data: asked_hours } as Result<number, string>;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user