Fixed RecreationDays Compensation
This commit is contained in:
@@ -39,7 +39,7 @@ export async function generateTimesEvaluation(
|
||||
.select("date")
|
||||
.in("state_code", [profile.state_code, "DE"])
|
||||
.gte("date", startDate.format("YYYY-MM-DD"))
|
||||
.lte("date", endDate.format("YYYY-MM-DD"))
|
||||
.lte("date", endDate.add(1,"day").format("YYYY-MM-DD"))
|
||||
|
||||
if (holidaysError) throw new Error("Fehler beim Laden der Feiertage: " + holidaysError.message)
|
||||
|
||||
@@ -70,7 +70,7 @@ export async function generateTimesEvaluation(
|
||||
let sumWorkingMinutesRecreationDays = 0
|
||||
let sumRecreationDays = 0
|
||||
|
||||
if (profile.recreationDaysCompensation && holidays?.length) {
|
||||
if (profile.recreation_days_compensation && holidays?.length) {
|
||||
holidays.forEach(({ date }) => {
|
||||
const weekday = server.dayjs(date).day()
|
||||
const hours = profile.weekly_regular_working_hours?.[weekday] || 0
|
||||
|
||||
Reference in New Issue
Block a user