4. Zwischenstand
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 15s
Build and Push Docker Images / build-frontend (push) Successful in 1m0s

This commit is contained in:
2026-03-22 17:43:41 +01:00
parent 9f665fc3b8
commit 11a242d70d
7 changed files with 724 additions and 420 deletions

View File

@@ -86,7 +86,8 @@ const documentTypeItems = computed(() => Object.keys(dataStore.documentTypesForC
const taxTypeItems = [
{ key: 'Standard', label: 'Standard' },
{ key: '13b UStG', label: '13b UStG' },
{ key: '19 UStG', label: '19 UStG Kleinunternehmer' }
{ key: '19 UStG', label: '19 UStG Kleinunternehmer' },
{ key: '12.3 UStG', label: '12.3 UStG' }
]
const deliveryDateTypeItems = ['Lieferdatum', 'Lieferzeitraum', 'Leistungsdatum', 'Leistungszeitraum', 'Kein Lieferdatum anzeigen']
const paymentTypeItems = [
@@ -115,6 +116,11 @@ const formatNumberLikeValue = (value) => {
return '-'
}
const normalizeTaxTypeValue = (value) => {
const normalized = typeof value === "string" ? value.trim() : value
return taxTypeItems.find((item) => item.key === normalized)?.key || "Standard"
}
const getCalendarValue = (value) => {
if (!value) return undefined
@@ -174,6 +180,7 @@ const setupPage = async () => {
if (route.params.id) {
console.log(route.params)
itemInfo.value = await useEntities("createddocuments").selectSingle(route.params.id,'',false)
itemInfo.value.taxType = normalizeTaxTypeValue(itemInfo.value.taxType)
await setContactPersonData()
checkCompatibilityWithInputPrice()
}
@@ -357,7 +364,7 @@ const setupPage = async () => {
console.log(optionsToImport)
console.log(linkedDocument)
if (optionsToImport.taxType) itemInfo.value.taxType = linkedDocument.taxType
if (optionsToImport.taxType) itemInfo.value.taxType = normalizeTaxTypeValue(linkedDocument.taxType)
if (optionsToImport.customer) itemInfo.value.customer = linkedDocument.customer
if (optionsToImport.letterhead) itemInfo.value.letterhead = linkedDocument.letterhead
if (optionsToImport.contact) itemInfo.value.contact = linkedDocument.contact
@@ -382,7 +389,7 @@ const setupPage = async () => {
if (process.dev) console.log(linkedDocument)
itemInfo.value.taxType = linkedDocument.taxType
itemInfo.value.taxType = normalizeTaxTypeValue(linkedDocument.taxType)
itemInfo.value.customer = linkedDocument.customer
await setCustomerData(null, true)
itemInfo.value.letterhead = linkedDocument.letterhead
@@ -545,7 +552,7 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => {
if (!loadOnlyAdress && customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays
if (!loadOnlyAdress && customer.custom_payment_type) itemInfo.value.payment_type = customer.custom_payment_type
if (!loadOnlyAdress) {
itemInfo.value.taxType = customer.customTaxType || "Standard"
itemInfo.value.taxType = normalizeTaxTypeValue(customer.customTaxType)
setTaxType()
}
@@ -1459,7 +1466,7 @@ const saveDocument = async (state, resetup = false) => {
let createData = {
type: itemInfo.value.type,
taxType: ['invoices', 'cancellationInvoices', 'advanceInvoices', 'qoutes', 'confirmationOrders'].includes(itemInfo.value.type) ? itemInfo.value.taxType : null,
taxType: ['invoices', 'cancellationInvoices', 'advanceInvoices', 'quotes', 'confirmationOrders'].includes(itemInfo.value.type) ? normalizeTaxTypeValue(itemInfo.value.taxType) : null,
state: itemInfo.value.state || "Entwurf",
customer: itemInfo.value.customer,
contact: itemInfo.value.contact,