diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index ab8d7a0..8b4a68c 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -643,8 +643,11 @@ const renderCurrency = (value, currency = "€") => { const documentTotal = computed(() => { let totalNet = 0 let total19 = 0 + let totalNet19 = 0 let total7 = 0 + let totalNet7 = 0 let total0 = 0 + let totalNet0 = 0 itemInfo.value.rows.filter(i => !i.optional && !i.alternative).forEach(row => { if(!['pagebreak','title','text'].includes(row.mode)){ @@ -653,8 +656,12 @@ const documentTotal = computed(() => { if(row.taxPercent === 19) { total19 = total19 + Number(rowPrice * 0.19) + totalNet19 += Number(rowPrice) } else if(row.taxPercent === 7) { total7 = total7 + Number(rowPrice * 0.07) + totalNet7 += Number(rowPrice) + } else if(row.taxPercent === 0) { + totalNet0 += Number(rowPrice) } } }) @@ -698,8 +705,11 @@ const documentTotal = computed(() => { titleSums: titleSums, totalNet: totalNet, total19: total19, + totalNet19: totalNet19, total7: total7, + totalNet7: totalNet7, total0: total0, + totalNet0: totalNet0, totalGross: totalGross, totalGrossAlreadyPaid: totalGrossAlreadyPaid, totalSumToPay: sumToPay @@ -1021,15 +1031,15 @@ const getDocumentData = () => { content: renderCurrency(documentTotal.value.totalNet), }, ... rows.find(i => i.taxPercent === 19) ? [{ - label: "zzgl. 19% USt", + label: `zzgl. 19% USt auf ${renderCurrency(documentTotal.value.totalNet19)}`, content: renderCurrency(documentTotal.value.total19), }] : [], ... rows.find(i => i.taxPercent === 7) ? [{ - label: "zzgl. 7% USt", + label: `zzgl. 7% USt auf ${renderCurrency(documentTotal.value.totalNet7)}`, content: renderCurrency(documentTotal.value.total7), }]: [], ...rows.find(i => i.taxPercent === 0) ? [{ - label: "zzgl. 0% USt", + label: `zzgl. 0% USt auf ${renderCurrency(documentTotal.value.totalNet0)}`, content: renderCurrency(documentTotal.value.total0), }] : [], { @@ -2719,15 +2729,15 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { {{renderCurrency(documentTotal.totalNet)}} - zzgl. 19 % USt: + zzgl. 19 % USt auf {{renderCurrency(documentTotal.totalNet19)}}: {{renderCurrency(documentTotal.total19)}} - zzgl. 7 % USt: + zzgl. 7 % USt auf {{renderCurrency(documentTotal.totalNet7)}}: {{renderCurrency(documentTotal.total7)}} - zzgl. 0 % USt: + zzgl. 0 % USt auf {{renderCurrency(documentTotal.totalNet0)}}: {{renderCurrency(documentTotal.total0)}}