diff --git a/frontend/pages/banking/index.vue b/frontend/pages/banking/index.vue index d220bb9..591cf7e 100644 --- a/frontend/pages/banking/index.vue +++ b/frontend/pages/banking/index.vue @@ -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(() => {
+ + +