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