Sortierung

This commit is contained in:
Moritz Utcke
2025-08-05 09:45:03 -04:00
parent 7b7a1f77a0
commit b3c84e1cb6
2 changed files with 11 additions and 11 deletions

View File

@@ -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();
}