Added TaxType automatic correction
Added Conditional Rendering for DocumentTotal in Editor
This commit is contained in:
@@ -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) => {
|
||||
<USelectMenu
|
||||
:options="['Standard','13b UStG','19 UStG']"
|
||||
v-model="itemInfo.taxType"
|
||||
@change="setTaxType"
|
||||
class="w-full"
|
||||
></USelectMenu>
|
||||
</UFormGroup>
|
||||
@@ -2238,7 +2247,7 @@ const setRowData = (row) => {
|
||||
<td class="font-bold">Netto:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalNet)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="itemInfo.taxType === 'Standard'">
|
||||
<td class="font-bold">zzgl. 19 % USt:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.total19)}}</td>
|
||||
</tr>
|
||||
@@ -2246,11 +2255,11 @@ const setRowData = (row) => {
|
||||
<td class="font-bold">Brutto:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalGross)}}</td>
|
||||
</tr>
|
||||
<tr v-if="documentTotal.totalGrossAlreadyPaid !== '0,00 €'">
|
||||
<tr v-if="documentTotal.totalGrossAlreadyPaid !== 0">
|
||||
<td class="font-bold">Bereits bezahlt:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalGrossAlreadyPaid)}}</td>
|
||||
</tr>
|
||||
<tr v-if="documentTotal.totalGrossAlreadyPaid !== '0,00 €'">
|
||||
<tr v-if="documentTotal.totalGrossAlreadyPaid !== 0">
|
||||
<td class="font-bold">Offene Summe:</td>
|
||||
<td class="text-right">{{renderCurrency(documentTotal.totalSumToPay)}}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user