From b3c84e1cb6ea78011cecff5d00ed48bfc5aa3e26 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Tue, 5 Aug 2025 09:45:03 -0400 Subject: [PATCH] Sortierung --- src/pages/dashboard/abrechnung/index.astro | 16 ++++++++-------- .../dashboard/abrechnung/monatlich.pdf.astro | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pages/dashboard/abrechnung/index.astro b/src/pages/dashboard/abrechnung/index.astro index d3cb445c..b4c3375b 100644 --- a/src/pages/dashboard/abrechnung/index.astro +++ b/src/pages/dashboard/abrechnung/index.astro @@ -46,19 +46,19 @@ if (start.isValid() && end.isValid()) { ], AND: [ { - created_at: { + erstellt_am: { gte: startdatum, }, }, { - created_at: { + erstellt_am: { lte: enddatum, }, }, ], }, orderBy: { - created_at: "desc", + erstellt_am: "desc", }, include: { bedarfsausweis_wohnen: { @@ -113,7 +113,7 @@ if (start.isValid() && end.isValid()) { ], }, orderBy: { - created_at: "desc", + erstellt_am: "desc", }, include: { bedarfsausweis_wohnen: { @@ -152,7 +152,7 @@ if (!startdatum) { startdatum = ( await prisma.rechnung.findFirst({ select: { - created_at: true, + erstellt_am: true, }, where: { partner_code: benutzer.partner_code, @@ -173,15 +173,15 @@ if (!startdatum) { }, }, ], - created_at: { + erstellt_am: { gte: moment().set("year", 2020).set("dayOfYear", 1).toDate(), }, }, orderBy: { - created_at: "asc", + erstellt_am: "asc", }, }) -)?.created_at || moment().startOf("month").toDate(); +)?.erstellt_am || moment().startOf("month").toDate(); } diff --git a/src/pages/dashboard/abrechnung/monatlich.pdf.astro b/src/pages/dashboard/abrechnung/monatlich.pdf.astro index 708975dd..93d70be1 100644 --- a/src/pages/dashboard/abrechnung/monatlich.pdf.astro +++ b/src/pages/dashboard/abrechnung/monatlich.pdf.astro @@ -36,19 +36,19 @@ let bestellungen = await prisma.rechnung.findMany({ ], AND: [ { - created_at: { + erstellt_am: { gte: datum.startOf("month").toDate(), }, }, { - created_at: { + erstellt_am: { lte: datum.endOf("month").toDate(), }, }, ], }, orderBy: { - created_at: "desc", + erstellt_am: "desc", }, include: { bedarfsausweis_wohnen: {