KI-AGENT: E-Rechnungen in der Belegvorbereitung verarbeiten
This commit is contained in:
@@ -149,6 +149,18 @@ const bankBookingDateLabel = computed(() => {
|
||||
return bankBookingDates.value.map(formatDate).join(", ")
|
||||
})
|
||||
const vendorName = computed(() => vendors.value.find((vendor) => vendor.id === itemInfo.value.vendor)?.name || "-")
|
||||
const eInvoiceValidation = computed(() => itemInfo.value.eInvoiceValidation || null)
|
||||
const eInvoiceSourceLabel = computed(() => {
|
||||
if (itemInfo.value.preparationSource !== "e-invoice") return null
|
||||
if (itemInfo.value.eInvoiceSyntax === "cii") {
|
||||
return String(itemInfo.value.eInvoiceProfile || "").toLowerCase().includes("xrechnung")
|
||||
? "XRechnung (CII)"
|
||||
: "ZUGFeRD / Factur-X (CII)"
|
||||
}
|
||||
if (itemInfo.value.eInvoiceSyntax === "ubl-credit-note") return "XRechnung / UBL-Gutschrift"
|
||||
return "XRechnung / UBL"
|
||||
})
|
||||
const eInvoiceProfileLabel = computed(() => itemInfo.value.eInvoiceProfile || "Profil nicht angegeben")
|
||||
const getAccountLabel = (item) => {
|
||||
const account = accounts.value.find((entry) => entry.id === item.account)
|
||||
|
||||
@@ -356,6 +368,35 @@ const hasBlockingIncomingInvoiceErrors = computed(() => blockingIncomingInvoiceE
|
||||
Dokument andocken
|
||||
</UButton>
|
||||
|
||||
<UAlert
|
||||
v-if="eInvoiceSourceLabel"
|
||||
:title="eInvoiceSourceLabel"
|
||||
color="primary"
|
||||
variant="soft"
|
||||
icon="i-heroicons-document-check"
|
||||
>
|
||||
<template #description>
|
||||
<div class="mt-1 space-y-2 text-sm">
|
||||
<p class="break-all">{{ eInvoiceProfileLabel }}</p>
|
||||
<div v-if="eInvoiceValidation?.errors?.length">
|
||||
<p class="font-semibold">Validierungsfehler</p>
|
||||
<ul class="list-inside list-disc">
|
||||
<li v-for="error in eInvoiceValidation.errors" :key="error">{{ error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="eInvoiceValidation?.warnings?.length">
|
||||
<p class="font-semibold">Hinweise</p>
|
||||
<ul class="list-inside list-disc">
|
||||
<li v-for="warning in eInvoiceValidation.warnings" :key="warning">{{ warning }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p v-if="!eInvoiceValidation?.errors?.length && !eInvoiceValidation?.warnings?.length">
|
||||
Pflichtfelder und Rechnungssummen wurden erfolgreich geprüft.
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</UAlert>
|
||||
|
||||
<UAlert
|
||||
v-if="mode !== 'show' && findIncomingInvoiceErrors.length > 0"
|
||||
title="Prüfung erforderlich"
|
||||
|
||||
Reference in New Issue
Block a user