Added Multiple Tax Percentages
Fixed Pagebreak colspan
This commit is contained in:
@@ -644,6 +644,7 @@ const documentTotal = computed(() => {
|
||||
let totalNet = 0
|
||||
let total19 = 0
|
||||
let total7 = 0
|
||||
let total0 = 0
|
||||
|
||||
itemInfo.value.rows.filter(i => !i.optional && !i.alternative).forEach(row => {
|
||||
if(!['pagebreak','title','text'].includes(row.mode)){
|
||||
@@ -698,6 +699,7 @@ const documentTotal = computed(() => {
|
||||
totalNet: totalNet,
|
||||
total19: total19,
|
||||
total7: total7,
|
||||
total0: total0,
|
||||
totalGross: totalGross,
|
||||
totalGrossAlreadyPaid: totalGrossAlreadyPaid,
|
||||
totalSumToPay: sumToPay
|
||||
@@ -1013,9 +1015,32 @@ const getDocumentData = () => {
|
||||
endText: templateEndText(generateContext(itemInfo.value, contactData)),
|
||||
startText: templateStartText(generateContext(itemInfo.value, contactData)),
|
||||
rows: rows,
|
||||
totalArray: [
|
||||
{
|
||||
label: "Nettobetrag",
|
||||
content: renderCurrency(documentTotal.value.totalNet),
|
||||
},
|
||||
... rows.find(i => i.taxPercent === 19) ? [{
|
||||
label: "zzgl. 19% USt",
|
||||
content: renderCurrency(documentTotal.value.total19),
|
||||
}] : [],
|
||||
... rows.find(i => i.taxPercent === 7) ? [{
|
||||
label: "zzgl. 7% USt",
|
||||
content: renderCurrency(documentTotal.value.total7),
|
||||
}]: [],
|
||||
...rows.find(i => i.taxPercent === 0) ? [{
|
||||
label: "zzgl. 0% USt",
|
||||
content: renderCurrency(documentTotal.value.total0),
|
||||
}] : [],
|
||||
{
|
||||
label: "Gesamtbetrag",
|
||||
content: renderCurrency(documentTotal.value.totalGross),
|
||||
},
|
||||
],
|
||||
total: {
|
||||
totalNet: renderCurrency(documentTotal.value.totalNet),
|
||||
total19: renderCurrency(documentTotal.value.total19),
|
||||
total0: renderCurrency(documentTotal.value.total0),
|
||||
totalGross: renderCurrency(documentTotal.value.totalGross),
|
||||
totalGrossAlreadyPaid: renderCurrency(documentTotal.value.totalGrossAlreadyPaid),
|
||||
totalSumToPay: renderCurrency(documentTotal.value.totalSumToPay),
|
||||
@@ -2064,7 +2089,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
</td>
|
||||
<td
|
||||
v-if="row.mode === 'pagebreak'"
|
||||
colspan="9"
|
||||
colspan="7"
|
||||
>
|
||||
<UDivider/>
|
||||
</td>
|
||||
@@ -2693,10 +2718,18 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
<td class="font-bold">Netto:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalNet)}}</td>
|
||||
</tr>
|
||||
<tr v-if="itemInfo.taxType === 'Standard'">
|
||||
<tr v-if="itemInfo.taxType === 'Standard' && itemInfo.rows.find(i => i.taxPercent === 19)">
|
||||
<td class="font-bold">zzgl. 19 % USt:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.total19)}}</td>
|
||||
</tr>
|
||||
<tr v-if="itemInfo.taxType === 'Standard' && itemInfo.rows.find(i => i.taxPercent === 7)">
|
||||
<td class="font-bold">zzgl. 7 % USt:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.total7)}}</td>
|
||||
</tr>
|
||||
<tr v-if="itemInfo.taxType === 'Standard' && itemInfo.rows.find(i => i.taxPercent === 0)">
|
||||
<td class="font-bold">zzgl. 0 % USt:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.total0)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-bold">Brutto:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalGross)}}</td>
|
||||
|
||||
Reference in New Issue
Block a user