Rechnungsdatum und Belegupload ueberarbeiten
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user