Change weekend deduction from 1.0 to 2.0 units

Co-authored-by: Kenearos <86194771+Kenearos@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-12 11:36:24 +00:00
parent 86cd0ae4a7
commit d6372fe2e2
11 changed files with 32 additions and 32 deletions

View file

@ -20,7 +20,7 @@ Same as the Python/Excel implementation:
- **WT-Tag** (Weekday): All other days
- **WT compensation**: Always 250€ per unit
- **WE compensation**: Only paid if monthly total ≥ 2.0 WE units
- If threshold reached: 450€ per WE unit, then deduct exactly 1.0 WE unit
- If threshold reached: 450€ per WE unit, then deduct exactly 2.0 WE units
- Deduction priority: Friday first, then other WE days
- Below threshold: 0€ for WE shifts
@ -123,7 +123,7 @@ Edit `PayrollCalculator.kt` and modify the constants:
- `RATE_WT`: Weekday rate (default 250€)
- `RATE_WE`: Weekend rate (default 450€)
- `WE_THRESHOLD`: Threshold for WE compensation (default 2.0)
- `DEDUCTION_AFTER_THRESHOLD`: Deduction amount (default 1.0)
- `DEDUCTION_AFTER_THRESHOLD`: Deduction amount (default 2.0)
### Adding Holidays

View file

@ -14,7 +14,7 @@ import kotlin.math.min
* - WT-Tag (Weekday): All other days
* - WT compensation: Always 250 per unit
* - WE compensation: Only paid if monthly total >= 2.0 WE units (threshold)
* - If threshold reached: 450 per WE unit, then deduct exactly 1.0 WE unit
* - If threshold reached: 450 per WE unit, then deduct exactly 2.0 WE units
* - Deduction priority: Friday first, then other WE days
* - Below threshold: 0 for WE shifts (NOT converted to WT)
*/
@ -24,7 +24,7 @@ class PayrollCalculator {
private const val RATE_WT = 250.0 // Satz_WT
private const val RATE_WE = 450.0 // Satz_WE
private const val WE_THRESHOLD = 2.0 // WE_Schwelle
private const val DEDUCTION_AFTER_THRESHOLD = 1.0 // Abzug_nach_WE_Schwelle
private const val DEDUCTION_AFTER_THRESHOLD = 2.0 // Abzug_nach_WE_Schwelle
private const val TOLERANCE = 0.0001 // For floating-point comparisons
}