From 208ade8219f95ee2e6d3f1d48099020b6e5a2198 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Tue, 5 Aug 2025 11:48:19 -0400 Subject: [PATCH] Fix --- src/pages/dashboard/abrechnung/index.astro | 4 ++-- src/pages/dashboard/abrechnung/monatlich.pdf.astro | 2 +- src/templates/pdf/abrechnung.handlebars | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pages/dashboard/abrechnung/index.astro b/src/pages/dashboard/abrechnung/index.astro index bc0f7283..d98ab029 100644 --- a/src/pages/dashboard/abrechnung/index.astro +++ b/src/pages/dashboard/abrechnung/index.astro @@ -18,8 +18,8 @@ let enddatum = end.isValid() ? end.toDate() : moment().endOf("month").toDate(); // Wir dürfen die Abrechnung erst ab Juni starten lassen. if (startdatum < moment().set("year", 2025).set("month", 5).set("date", 1).toDate()) { - startdatum = moment().set("year", 2025).set("month", 5).set("date", 1).toDate(); - enddatum = moment().set("year", 2025).set("month", 5).set("date", 1).endOf("month").toDate(); + startdatum = moment().set("year", 2025).set("month", 5).set("date", 1).set("hour", 0).set("minute", 0).set("second", 0).toDate(); + enddatum = moment().set("year", 2025).set("month", 5).set("date", 1).set("hour", 0).set("minute", 0).set("second", 0).endOf("month").toDate(); } const benutzer = await getCurrentUser(Astro); diff --git a/src/pages/dashboard/abrechnung/monatlich.pdf.astro b/src/pages/dashboard/abrechnung/monatlich.pdf.astro index 7cb1178a..f0cefd3e 100644 --- a/src/pages/dashboard/abrechnung/monatlich.pdf.astro +++ b/src/pages/dashboard/abrechnung/monatlich.pdf.astro @@ -9,7 +9,7 @@ import { extrahiereAusweisAusFeldMitMehrerenAusweisen } from "#lib/server/auswei import { getProvision } from "#lib/provision"; moment.locale("de"); moment.tz.setDefault("Europe/Berlin"); -const datum = moment(Astro.url.searchParams.get("d")).set("date", 1); +const datum = moment(Astro.url.searchParams.get("d")).set("date", 1).set("hour", 0).set("minute", 0).set("second", 0); const benutzer = await getCurrentUser(Astro); diff --git a/src/templates/pdf/abrechnung.handlebars b/src/templates/pdf/abrechnung.handlebars index 18571332..a1aa8843 100644 --- a/src/templates/pdf/abrechnung.handlebars +++ b/src/templates/pdf/abrechnung.handlebars @@ -75,13 +75,11 @@ - {{#if @last}} - Gesamt {{ @root.gesamt }} € - {{/if}} {{/each}} + Gesamt {{ gesamt }} € \ No newline at end of file