KI-AGENT: Datum bei Kassenbucheintrag erlauben
This commit is contained in:
@@ -58,6 +58,7 @@ const dateRange = ref({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const cashbookForm = reactive({
|
const cashbookForm = reactive({
|
||||||
|
date: $dayjs().format("YYYY-MM-DD"),
|
||||||
direction: "expense",
|
direction: "expense",
|
||||||
amount: null
|
amount: null
|
||||||
})
|
})
|
||||||
@@ -257,8 +258,8 @@ const currentCashbookBalance = computed(() => {
|
|||||||
return openingBalance + movementSum
|
return openingBalance + movementSum
|
||||||
})
|
})
|
||||||
const saveCashbookBooking = async () => {
|
const saveCashbookBooking = async () => {
|
||||||
if (!selectedCashbookAccount.value || !cashbookForm.amount) {
|
if (!selectedCashbookAccount.value || !cashbookForm.date || !cashbookForm.amount) {
|
||||||
toast.add({ title: "Bitte Kasse und Betrag auswählen.", color: "warning" })
|
toast.add({ title: "Bitte Kasse, Datum und Betrag auswählen.", color: "warning" })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,6 +268,7 @@ const saveCashbookBooking = async () => {
|
|||||||
const created = await $api(`/api/banking/cashbooks/${selectedCashbookAccount.value.id}/bookings`, {
|
const created = await $api(`/api/banking/cashbooks/${selectedCashbookAccount.value.id}/bookings`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: {
|
body: {
|
||||||
|
date: cashbookForm.date,
|
||||||
direction: cashbookForm.direction,
|
direction: cashbookForm.direction,
|
||||||
amount: Number(cashbookForm.amount)
|
amount: Number(cashbookForm.amount)
|
||||||
}
|
}
|
||||||
@@ -785,6 +787,9 @@ onMounted(() => {
|
|||||||
|
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
|
<UFormField label="Buchungsdatum">
|
||||||
|
<UInput v-model="cashbookForm.date" type="date" />
|
||||||
|
</UFormField>
|
||||||
<UFormField label="Betrag">
|
<UFormField label="Betrag">
|
||||||
<UInput v-model="cashbookForm.amount" type="number" min="0" step="0.01" placeholder="0,00" />
|
<UInput v-model="cashbookForm.amount" type="number" min="0" step="0.01" placeholder="0,00" />
|
||||||
</UFormField>
|
</UFormField>
|
||||||
|
|||||||
Reference in New Issue
Block a user