Added Markup Percentage for Products
This commit is contained in:
@@ -903,14 +903,36 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
label: "Einkaufspreis",
|
label: "Einkaufspreis",
|
||||||
component: purchasePrice,
|
component: purchasePrice,
|
||||||
inputType: "number",
|
inputType: "number",
|
||||||
inputTrailing: "EUR"
|
inputTrailing: "EUR",
|
||||||
|
inputChangeFunction: function (row) {
|
||||||
|
if(row.markupPercentage) {
|
||||||
|
row.sellingPrice = row.purchasePrice * (1+row.markupPercentage/100);
|
||||||
|
} else {
|
||||||
|
row.sellingPrice = row.purchasePrice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
key: "markupPercentage",
|
||||||
|
label: "Aufschlag",
|
||||||
|
inputType: "number",
|
||||||
|
inputTrailing: "%",
|
||||||
|
inputChangeFunction: function (row) {
|
||||||
|
if(row.sellingPrice) {
|
||||||
|
row.sellingPrice = row.purchasePrice * (1+row.markupPercentage/100);
|
||||||
|
}
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
key: "sellingPrice",
|
key: "sellingPrice",
|
||||||
label: "Verkaufpreispreis",
|
label: "Verkaufpreispreis",
|
||||||
required: true,
|
required: true,
|
||||||
component: sellingPrice,
|
component: sellingPrice,
|
||||||
inputType: "number",
|
inputType: "number",
|
||||||
inputTrailing: "EUR"
|
inputTrailing: "EUR",
|
||||||
|
inputChangeFunction: function (row) {
|
||||||
|
if(row.markupPercentage) {
|
||||||
|
row.purchasePrice = (row.sellingPrice / (1+row.markupPercentage/100)).toFixed(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
key: "taxPercentage",
|
key: "taxPercentage",
|
||||||
label: "Umsatzsteuer",
|
label: "Umsatzsteuer",
|
||||||
|
|||||||
Reference in New Issue
Block a user