Fixed Some Errors in IncomingInvoices

This commit is contained in:
2025-11-14 17:54:27 +01:00
parent da074df63c
commit 5f6df7c69d

View File

@@ -45,6 +45,8 @@ const setup = async () => {
itemInfo.value = await useEntities("incominginvoices").selectSingle(route.params.id, "*, files(*)") itemInfo.value = await useEntities("incominginvoices").selectSingle(route.params.id, "*, files(*)")
await loadFile(itemInfo.value.files[itemInfo.value.files.length-1].id) await loadFile(itemInfo.value.files[itemInfo.value.files.length-1].id)
if(itemInfo.value.date && !itemInfo.value.dueDate) itemInfo.value.dueDate = itemInfo.value.date
} }
setup() setup()
@@ -145,7 +147,7 @@ const findIncomingInvoiceErrors = computed(() => {
let errors = [] let errors = []
if(itemInfo.value.vendor === null) errors.push({message: "Es ist kein Lieferant ausgewählt", type: "breaking"}) if(itemInfo.value.vendor === null) errors.push({message: "Es ist kein Lieferant ausgewählt", type: "breaking"})
if(itemInfo.value.reference === null) errors.push({message: "Es ist keine Referenz angegeben", type: "breaking"}) if(itemInfo.value.reference === null || itemInfo.value.reference.length === 0) errors.push({message: "Es ist keine Referenz angegeben", type: "breaking"})
if(itemInfo.value.date === null) errors.push({message: "Es ist kein Datum ausgewählt", type: "breaking"}) if(itemInfo.value.date === null) errors.push({message: "Es ist kein Datum ausgewählt", type: "breaking"})
if(itemInfo.value.dueDate === null) errors.push({message: "Es ist kein Fälligkeitsdatum ausgewählt", type: "breaking"}) if(itemInfo.value.dueDate === null) errors.push({message: "Es ist kein Fälligkeitsdatum ausgewählt", type: "breaking"})
if(itemInfo.value.paymentType === null) errors.push({message: "Es ist keine Zahlart ausgewählt", type: "breaking"}) if(itemInfo.value.paymentType === null) errors.push({message: "Es ist keine Zahlart ausgewählt", type: "breaking"})
@@ -220,7 +222,6 @@ const findIncomingInvoiceErrors = computed(() => {
class="mx-5 documentPreview" class="mx-5 documentPreview"
/> />
<div class="w-3/5 mx-5"> <div class="w-3/5 mx-5">
<UAlert <UAlert
class="mb-5" class="mb-5"
title="Vorhandene Probleme und Informationen:" title="Vorhandene Probleme und Informationen:"
@@ -238,7 +239,7 @@ const findIncomingInvoiceErrors = computed(() => {
</UAlert> </UAlert>
<div class=" scrollContainer"> <div class="scrollContainer">
<InputGroup class="mb-3"> <InputGroup class="mb-3">
<UButton <UButton
:variant="itemInfo.expense ? 'solid' : 'outline'" :variant="itemInfo.expense ? 'solid' : 'outline'"
@@ -533,6 +534,7 @@ const findIncomingInvoiceErrors = computed(() => {
<USelectMenu <USelectMenu
:options="taxOptions" :options="taxOptions"
:disabled="mode === 'show'" :disabled="mode === 'show'"
:color="item.taxType === null || item.taxType === '0' ? 'rose' : 'primary'"
v-model="item.taxType" v-model="item.taxType"
value-attribute="key" value-attribute="key"
:ui-menu="{ width: 'min-w-max' }" :ui-menu="{ width: 'min-w-max' }"
@@ -588,8 +590,6 @@ const findIncomingInvoiceErrors = computed(() => {
.scrollContainer { .scrollContainer {
overflow-y: scroll; overflow-y: scroll;
padding-left: 1em;
padding-right: 1em;
height: 70vh; height: 70vh;
-ms-overflow-style: none; /* IE and Edge */ -ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */ scrollbar-width: none; /* Firefox */