Korrektur: Bonus nur bei WE-Schwelle ≥ 2,0
- Gesamter Bonus (WT + WE) wird nur gezahlt, wenn >= 2,0 WE-Tage erreicht - Unter Schwelle: Auszahlung = 0€ (weder WT noch WE) - Abzug mit Freitag-Priorität implementiert - Testfälle und Dokumentation aktualisiert Betrifft: - webapp/calculator.js: Korrekte Berechnung mit Freitag-Priorität - src/calculate.py: WT-Auszahlung nur bei Schwelle - SPECIFICATION.md: Regeln, Testfälle und Changelog aktualisiert
This commit is contained in:
parent
034b398c2c
commit
736d160586
3 changed files with 65 additions and 26 deletions
|
|
@ -117,18 +117,21 @@ def calculate_verguetung(plan_data, holidays):
|
|||
# Abzug von 1.0 WE-Einheit (Freitag zuerst)
|
||||
abzug_freitag = min(ABZUG, we_fri)
|
||||
abzug_andere = max(0, ABZUG - abzug_freitag)
|
||||
|
||||
|
||||
# Bezahlte WE-Einheiten
|
||||
we_bezahlt = (we_fri - abzug_freitag) + (we_other - abzug_andere)
|
||||
|
||||
# Auszahlungen - nur wenn Schwelle erreicht
|
||||
auszahlung_wt = wt * SATZ_WT
|
||||
auszahlung_we = we_bezahlt * SATZ_WE
|
||||
else:
|
||||
# Schwelle nicht erreicht - keine WE-Vergütung
|
||||
# Schwelle nicht erreicht - kein Bonus (weder WT noch WE)
|
||||
abzug_freitag = 0
|
||||
abzug_andere = 0
|
||||
we_bezahlt = 0
|
||||
|
||||
# Auszahlungen
|
||||
auszahlung_wt = wt * SATZ_WT
|
||||
auszahlung_we = we_bezahlt * SATZ_WE
|
||||
auszahlung_wt = 0
|
||||
auszahlung_we = 0
|
||||
|
||||
auszahlung_gesamt = auszahlung_wt + auszahlung_we
|
||||
|
||||
results.append({
|
||||
|
|
|
|||
Reference in a new issue