Sortierung
This commit is contained in:
@@ -46,19 +46,19 @@ if (start.isValid() && end.isValid()) {
|
|||||||
],
|
],
|
||||||
AND: [
|
AND: [
|
||||||
{
|
{
|
||||||
created_at: {
|
erstellt_am: {
|
||||||
gte: startdatum,
|
gte: startdatum,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
created_at: {
|
erstellt_am: {
|
||||||
lte: enddatum,
|
lte: enddatum,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: "desc",
|
erstellt_am: "desc",
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
bedarfsausweis_wohnen: {
|
bedarfsausweis_wohnen: {
|
||||||
@@ -113,7 +113,7 @@ if (start.isValid() && end.isValid()) {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: "desc",
|
erstellt_am: "desc",
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
bedarfsausweis_wohnen: {
|
bedarfsausweis_wohnen: {
|
||||||
@@ -152,7 +152,7 @@ if (!startdatum) {
|
|||||||
startdatum = (
|
startdatum = (
|
||||||
await prisma.rechnung.findFirst({
|
await prisma.rechnung.findFirst({
|
||||||
select: {
|
select: {
|
||||||
created_at: true,
|
erstellt_am: true,
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
partner_code: benutzer.partner_code,
|
partner_code: benutzer.partner_code,
|
||||||
@@ -173,15 +173,15 @@ if (!startdatum) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
created_at: {
|
erstellt_am: {
|
||||||
gte: moment().set("year", 2020).set("dayOfYear", 1).toDate(),
|
gte: moment().set("year", 2020).set("dayOfYear", 1).toDate(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: "asc",
|
erstellt_am: "asc",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
)?.created_at || moment().startOf("month").toDate();
|
)?.erstellt_am || moment().startOf("month").toDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,19 +36,19 @@ let bestellungen = await prisma.rechnung.findMany({
|
|||||||
],
|
],
|
||||||
AND: [
|
AND: [
|
||||||
{
|
{
|
||||||
created_at: {
|
erstellt_am: {
|
||||||
gte: datum.startOf("month").toDate(),
|
gte: datum.startOf("month").toDate(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
created_at: {
|
erstellt_am: {
|
||||||
lte: datum.endOf("month").toDate(),
|
lte: datum.endOf("month").toDate(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
created_at: "desc",
|
erstellt_am: "desc",
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
bedarfsausweis_wohnen: {
|
bedarfsausweis_wohnen: {
|
||||||
|
|||||||
Reference in New Issue
Block a user