Pausenabzug standardmäßig voll: 6:10 wird 5:40 (0.15.1)
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
Claude
2026-10-20 21:26:46 +00:00
parent cee31b2864
commit 334cd9357e
7 changed files with 13 additions and 9 deletions

View File

@@ -610,11 +610,11 @@ describe.skipIf(!url)("Anmeldung und Rollen (U1, U2)", () => {
const v1 = ich.einsaetze[0];
expect(v1).toMatchObject({ name: "Abbund" });
// 7:00 bis 16:10 ohne Pause: 9:10 da, 40 Min Abzug bis zur Grenze → 8:30
// 7:00 bis 16:10 ohne Pause: 9:10 da, voller Abzug 45 Min → 8:25 (Standard „voll“)
const r = await als(jj, "PUT", `/api/ich/zeiten/${heute}`, { beginn: "7:00", ende: "16:10", anteile: [{ vorgang_id: v1.id, taetigkeit: "Abbund Sparren" }] });
expect(r.statusCode, r.body).toBe(200);
expect(r.json()).toMatchObject({ beginn: "07:00", ende: "16:10", pause_min: 0, abzug_min: 40, netto_min: 510, ueber_zehn: false });
expect(r.json().anteile).toMatchObject([{ vorgang_id: v1.id, projekt_id: v1.projekt_id, stunden: 8.5, taetigkeit: "Abbund Sparren" }]);
expect(r.json()).toMatchObject({ beginn: "07:00", ende: "16:10", pause_min: 0, abzug_min: 45, netto_min: 505, ueber_zehn: false });
expect(r.json().anteile).toMatchObject([{ vorgang_id: v1.id, projekt_id: v1.projekt_id, stunden: 8.42, taetigkeit: "Abbund Sparren" }]);
// gleicher Tag noch einmal: ersetzt, aufgeteilt auf zwei Baustellen
const p2 = ich.projekte.find((p: { nummer: string }) => p.nummer === "P-26-102");
const falsch = await als(jj, "PUT", `/api/ich/zeiten/${heute}`, { beginn: "07:00", ende: "15:30", pause_min: 30, anteile: [{ vorgang_id: v1.id, stunden: 4 }, { projekt_id: p2.id, stunden: 3 }] });

View File

@@ -31,7 +31,7 @@ describe("Pausenabzug nach M3", () => {
it("länger da sein ergibt bis zur Grenze nie weniger Stunden", () => {
let vorher = 0;
for (let m = 0; m <= 14 * 60; m++) {
const n = rechneTag(m, 0, true).netto;
const n = rechneTag(m, 0, true, "bis_grenze").netto;
expect(n).toBeGreaterThanOrEqual(vorher);
vorher = n;
}