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