fix(pay-period): fix total_hours calculation
This commit is contained in:
parent
4a6eed1185
commit
a343ace0b7
|
|
@ -239,13 +239,20 @@ export class PayPeriodsQueryService {
|
||||||
const hours = computeHours(shift.start_time, shift.end_time);
|
const hours = computeHours(shift.start_time, shift.end_time);
|
||||||
const type = (shift.bank_code?.type ?? '').toUpperCase();
|
const type = (shift.bank_code?.type ?? '').toUpperCase();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "EVENING": record.evening_hours += hours; break;
|
case "EVENING": record.evening_hours += hours;
|
||||||
case "EMERGENCY": record.emergency_hours += hours; break;
|
record.total_hours += hours;
|
||||||
case "OVERTIME": record.overtime_hours += hours; break;
|
break;
|
||||||
case "REGULAR" : record.regular_hours += hours; break;
|
case "EMERGENCY": record.emergency_hours += hours;
|
||||||
|
record.total_hours += hours;
|
||||||
|
break;
|
||||||
|
case "OVERTIME": record.overtime_hours += hours;
|
||||||
|
record.total_hours += hours;
|
||||||
|
break;
|
||||||
|
case "REGULAR" : record.regular_hours += hours;
|
||||||
|
record.total_hours += hours;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
record.is_approved = record.is_approved && shift.timesheet.is_approved;
|
record.is_approved = record.is_approved && shift.timesheet.is_approved;
|
||||||
record.total_hours += hours;
|
|
||||||
record.is_remote = record.is_remote || !!shift.is_remote;
|
record.is_remote = record.is_remote || !!shift.is_remote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user