Rechnungsdatum und Belegupload ueberarbeiten
All checks were successful
CI / Build (push) Successful in 1m59s
CI / Deploy (push) Successful in 2m2s

This commit is contained in:
jan
2026-05-01 16:51:27 +02:00
parent 549c8f16c6
commit 796e134ea2
14 changed files with 165 additions and 95 deletions

View File

@@ -35,6 +35,10 @@ export async function POST(_: Request, { params }: Context) {
return NextResponse.json({ error: "Bezahlt ist erst nach Freigabe moeglich." }, { status: 400 });
}
if (!expense.proofUrl || !expense.invoiceDate || !expense.documentedAt) {
return NextResponse.json({ error: "Bitte zuerst Rechnung mit Rechnungsdatum abgeben." }, { status: 400 });
}
const updatedExpense = await prisma.expense.update({
where: { id },
data: {