2 Commits

Author SHA1 Message Date
birkeh 7796597832 corrected time calculation 2026-01-20 14:38:41 +01:00
birkeh 38a1c535a4 duplicates 2025-10-16 11:45:22 +02:00
9 changed files with 550 additions and 414 deletions
@@ -1,4 +1,4 @@
#Mon Oct 13 17:28:53 CEST 2025 #Thu Oct 16 11:43:56 CEST 2025
path.4=1/classes.dex path.4=1/classes.dex
path.3=11/classes.dex path.3=11/classes.dex
path.2=0/classes.dex path.2=0/classes.dex
Binary file not shown.
Binary file not shown.
+2 -1
View File
@@ -14,7 +14,8 @@ class MonthStart {
}); });
/// Basis für kumulierte Differenz /// Basis für kumulierte Differenz
int get carryBaseMinutes => startMinutes + overtimeMinutes + correctionMinutes; int get carryBaseMinutes =>
startMinutes + correctionMinutes - overtimeMinutes;
static MonthStart fromJson(Map<String, dynamic> json) { static MonthStart fromJson(Map<String, dynamic> json) {
final bookings = (json['bookings'] as List?) ?? const []; final bookings = (json['bookings'] as List?) ?? const [];
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -26,6 +26,8 @@ int effectiveWorkedMinutes(
if (worked <= 6 * 60) return worked; if (worked <= 6 * 60) return worked;
final maxRequiredBreak = (worked - 6 * 60).clamp(0, requiredBreakOver6h);
// Lücken summieren // Lücken summieren
int gaps = 0; int gaps = 0;
for (var i = 0; i < sorted.length - 1; i++) { for (var i = 0; i < sorted.length - 1; i++) {
@@ -33,7 +35,12 @@ int effectiveWorkedMinutes(
if (gap > 0) gaps += gap; if (gap > 0) gaps += gap;
} }
final extraBreak = (requiredBreakOver6h - gaps).clamp(0, requiredBreakOver6h); final extraBreak = (maxRequiredBreak - gaps).clamp(0, maxRequiredBreak);
final effective = worked - extraBreak; final effective = worked - extraBreak;
// int effective = worked - extraBreak;
// final diff = 30 - gaps;
// if (diff > 0) effective -= diff;
return effective < 0 ? 0 : effective; return effective < 0 ? 0 : effective;
} }