Fixed TaxType, Added Taxtype to Quotes and Confirmation Orders
This commit is contained in:
@@ -404,6 +404,12 @@ const addPosition = (mode) => {
|
|||||||
if(row.id > lastId) lastId = row.id
|
if(row.id > lastId) lastId = row.id
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let taxPercentage = 19
|
||||||
|
|
||||||
|
if(['13b UStG','19 UStG'].includes(itemInfo.value.taxType)) {
|
||||||
|
taxPercentage = 0
|
||||||
|
}
|
||||||
|
|
||||||
if(mode === 'free'){
|
if(mode === 'free'){
|
||||||
let rowData = {
|
let rowData = {
|
||||||
id: uuidv4(),
|
id: uuidv4(),
|
||||||
@@ -412,7 +418,7 @@ const addPosition = (mode) => {
|
|||||||
quantity: 1,
|
quantity: 1,
|
||||||
unit: 1,
|
unit: 1,
|
||||||
price: 0,
|
price: 0,
|
||||||
taxPercent: 19,
|
taxPercent: taxPercentage,
|
||||||
discountPercent: 0
|
discountPercent: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +430,7 @@ const addPosition = (mode) => {
|
|||||||
mode: "normal",
|
mode: "normal",
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
price: 0,
|
price: 0,
|
||||||
taxPercent: 19,
|
taxPercent: taxPercentage,
|
||||||
discountPercent: 0,
|
discountPercent: 0,
|
||||||
unit: 1
|
unit: 1
|
||||||
})
|
})
|
||||||
@@ -434,7 +440,7 @@ const addPosition = (mode) => {
|
|||||||
mode: "service",
|
mode: "service",
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
price: 0,
|
price: 0,
|
||||||
taxPercent: 19,
|
taxPercent: taxPercentage,
|
||||||
discountPercent: 0,
|
discountPercent: 0,
|
||||||
unit: 1
|
unit: 1
|
||||||
}
|
}
|
||||||
@@ -1134,14 +1140,24 @@ const setRowData = (row) => {
|
|||||||
row.unit = services.value.find(i => i.id === row.service).unit
|
row.unit = services.value.find(i => i.id === row.service).unit
|
||||||
row.price = (services.value.find(i => i.id === row.service).sellingPriceComposed.total || services.value.find(i => i.id === row.service).sellingPrice) * (1 + itemInfo.value.customSurchargePercentage /100)
|
row.price = (services.value.find(i => i.id === row.service).sellingPriceComposed.total || services.value.find(i => i.id === row.service).sellingPrice) * (1 + itemInfo.value.customSurchargePercentage /100)
|
||||||
row.description = services.value.find(i => i.id === row.service).description
|
row.description = services.value.find(i => i.id === row.service).description
|
||||||
row.taxPercent = services.value.find(i => i.id === row.service).taxPercentage
|
|
||||||
|
if(['13b UStG','19 UStG'].includes(itemInfo.value.taxType)) {
|
||||||
|
row.taxPercent = 0
|
||||||
|
} else {
|
||||||
|
row.taxPercent = services.value.find(i => i.id === row.service).taxPercentage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(row.product) {
|
if(row.product) {
|
||||||
row.unit = products.value.find(i => i.id === row.product).unit
|
row.unit = products.value.find(i => i.id === row.product).unit
|
||||||
row.price = products.value.find(i => i.id === row.product).sellingPrice * (1 + itemInfo.value.customSurchargePercentage /100)
|
row.price = products.value.find(i => i.id === row.product).sellingPrice * (1 + itemInfo.value.customSurchargePercentage /100)
|
||||||
row.description = products.value.find(i => i.id === row.product).description
|
row.description = products.value.find(i => i.id === row.product).description
|
||||||
row.taxPercent = products.value.find(i => i.id === row.product).taxPercentage
|
|
||||||
|
if(['13b UStG','19 UStG'].includes(itemInfo.value.taxType)) {
|
||||||
|
row.taxPercent = 0
|
||||||
|
} else {
|
||||||
|
row.taxPercent = products.value.find(i => i.id === row.product).taxPercentage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1299,7 +1315,7 @@ const setRowData = (row) => {
|
|||||||
|
|
||||||
<UFormGroup
|
<UFormGroup
|
||||||
label="Steuertyp:"
|
label="Steuertyp:"
|
||||||
v-if="itemInfo.type === 'invoices'"
|
v-if="['invoices','quotes','confirmationOrders'].includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:options="['Standard','13b UStG','19 UStG']"
|
:options="['Standard','13b UStG','19 UStG']"
|
||||||
|
|||||||
Reference in New Issue
Block a user