Styling
This commit is contained in:
@@ -210,25 +210,15 @@ function registerVerwaltungRoutes(app) {
|
||||
vacationDays += 0.5;
|
||||
vacationHours += 4; // Halber Tag = 4 Stunden
|
||||
// Bei halbem Tag Urlaub können noch Arbeitsstunden vorhanden sein
|
||||
// WICHTIG: total_hours enthält bereits Wochenend-Prozentsätze (aus timesheet.js)
|
||||
if (entry.total_hours) {
|
||||
let hours = entry.total_hours;
|
||||
// Wochenend-Prozentsatz anwenden (nur auf tatsächlich gearbeitete Stunden)
|
||||
const weekendPercentage = getWeekendPercentage(entry.date);
|
||||
if (weekendPercentage >= 100 && hours > 0 && !entry.sick_status) {
|
||||
hours = hours * (weekendPercentage / 100);
|
||||
}
|
||||
totalHours += hours;
|
||||
totalHours += parseFloat(entry.total_hours) || 0;
|
||||
}
|
||||
} else {
|
||||
// Kein Urlaub - zähle nur Arbeitsstunden
|
||||
// WICHTIG: total_hours enthält bereits Wochenend-Prozentsätze (aus timesheet.js)
|
||||
if (entry.total_hours) {
|
||||
let hours = entry.total_hours;
|
||||
// Wochenend-Prozentsatz anwenden (nur auf tatsächlich gearbeitete Stunden, nicht auf Krankheit)
|
||||
const weekendPercentage = getWeekendPercentage(entry.date);
|
||||
if (weekendPercentage > 0 && hours > 0 && !entry.sick_status) {
|
||||
hours = hours * (1 + weekendPercentage / 100);
|
||||
}
|
||||
totalHours += hours;
|
||||
totalHours += parseFloat(entry.total_hours) || 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user