From bb7cd71a0744f2d92314d0babda3d6bac2c0f90b Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Thu, 27 Feb 2025 08:49:41 +0100 Subject: [PATCH] Added TaxType automatic correction Added Conditional Rendering for DocumentTotal in Editor --- pages/createDocument/edit/[[id]].vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index ce7ba9c..bce8d07 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -312,6 +312,14 @@ const setDocumentTypeConfig = (withTexts = false) => { } +const setTaxType = () => { + if(itemInfo.value.taxType === "19 UStG") { + itemInfo.value.rows.forEach(row => { + row.taxPercent = 0 + }) + } +} + const setCustomerData = () => { let customer = customers.value.find(i => i.id === itemInfo.value.customer) @@ -1266,6 +1274,7 @@ const setRowData = (row) => { @@ -2238,7 +2247,7 @@ const setRowData = (row) => { Netto: {{renderCurrency(documentTotal.totalNet)}} - + zzgl. 19 % USt: {{renderCurrency(documentTotal.total19)}} @@ -2246,11 +2255,11 @@ const setRowData = (row) => { Brutto: {{renderCurrency(documentTotal.totalGross)}} - + Bereits bezahlt: {{renderCurrency(documentTotal.totalGrossAlreadyPaid)}} - + Offene Summe: {{renderCurrency(documentTotal.totalSumToPay)}}