Fixed Gebucht in IncomingInvoice Edit

This commit is contained in:
2025-07-15 16:28:36 +02:00
parent 6cfaf3fdbe
commit dcac52ff9d

View File

@@ -132,10 +132,13 @@ const updateIncomingInvoice = async (setBooked = false) => {
if(item.state === "Vorbereitet" && !setBooked) {
item.state = "Entwurf"
} else if(setBooked) {
} else if(item.state === "Vorbereitet" && setBooked) {
item.state = "Gebucht"
} else if(item.state === "Entwurf" && setBooked) {
item.state = "Gebucht"
} else {
item.state = "Entwurf"
}
const data = await dataStore.updateItem('incominginvoices',item)
}
@@ -169,7 +172,7 @@ const findIncomingInvoiceErrors = computed(() => {
<UDashboardNavbar :title="'Eingangsbeleg erstellen'">
<template #right>
<UButton
@click="updateIncomingInvoice"
@click="updateIncomingInvoice(false)"
>
Speichern
</UButton>