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