Fixed Gebucht in IncomingInvoice Edit
This commit is contained in:
@@ -132,10 +132,13 @@ const updateIncomingInvoice = async (setBooked = false) => {
|
|||||||
|
|
||||||
if(item.state === "Vorbereitet" && !setBooked) {
|
if(item.state === "Vorbereitet" && !setBooked) {
|
||||||
item.state = "Entwurf"
|
item.state = "Entwurf"
|
||||||
} else if(setBooked) {
|
} else if(item.state === "Vorbereitet" && setBooked) {
|
||||||
item.state = "Gebucht"
|
item.state = "Gebucht"
|
||||||
|
} else if(item.state === "Entwurf" && setBooked) {
|
||||||
|
item.state = "Gebucht"
|
||||||
|
} else {
|
||||||
|
item.state = "Entwurf"
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await dataStore.updateItem('incominginvoices',item)
|
const data = await dataStore.updateItem('incominginvoices',item)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +172,7 @@ const findIncomingInvoiceErrors = computed(() => {
|
|||||||
<UDashboardNavbar :title="'Eingangsbeleg erstellen'">
|
<UDashboardNavbar :title="'Eingangsbeleg erstellen'">
|
||||||
<template #right>
|
<template #right>
|
||||||
<UButton
|
<UButton
|
||||||
@click="updateIncomingInvoice"
|
@click="updateIncomingInvoice(false)"
|
||||||
>
|
>
|
||||||
Speichern
|
Speichern
|
||||||
</UButton>
|
</UButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user