BETA for new DB
This commit is contained in:
@@ -956,10 +956,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "number",
|
||||
inputTrailing: "EUR",
|
||||
inputChangeFunction: function (row) {
|
||||
if(row.markupPercentage) {
|
||||
row.sellingPrice = (row.purchasePrice * (1+row.markupPercentage/100)).toFixed(4)
|
||||
if(row.markup_percentage) {
|
||||
row.seling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4)
|
||||
} else {
|
||||
row.sellingPrice = row.purchasePrice.toFixed(4)
|
||||
row.seling_price = row.purchase_price.toFixed(4)
|
||||
}
|
||||
}
|
||||
},{
|
||||
@@ -968,12 +968,12 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "number",
|
||||
inputTrailing: "%",
|
||||
inputChangeFunction: function (row) {
|
||||
if(row.purchasePrice && ! row.sellingPrice) {
|
||||
row.sellingPrice = (row.purchasePrice * (1+row.markupPercentage/100)).toFixed(4)
|
||||
} else if(row.sellingPrice && !row.purchasePrice) {
|
||||
row.purchasePrice = (row.sellingPrice / (1+row.markupPercentage/100)).toFixed(4)
|
||||
if(row.purchase_price && ! row.seling_price) {
|
||||
row.seling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4)
|
||||
} else if(row.seling_price && !row.purchase_price) {
|
||||
row.purchase_price = (row.seling_price / (1+row.markup_percentage/100)).toFixed(4)
|
||||
} else {
|
||||
row.sellingPrice = (row.purchasePrice * (1+row.markupPercentage/100)).toFixed(4)
|
||||
row.seling_price = (row.purchase_price * (1+row.markup_percentage/100)).toFixed(4)
|
||||
}
|
||||
}
|
||||
},{
|
||||
@@ -984,10 +984,10 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "number",
|
||||
inputTrailing: "EUR",
|
||||
inputChangeFunction: function (row) {
|
||||
if(row.purchasePrice ) {
|
||||
row.markupPercentage = ((row.sellingPrice / row.purchasePrice - 1) * 100 ).toFixed(2)
|
||||
if(row.purchase_price ) {
|
||||
row.markup_percentage = ((row.selling_price / row.purchase_price - 1) * 100 ).toFixed(2)
|
||||
} else{
|
||||
row.purchasePrice = (row.sellingPrice / (1+row.markupPercentage/100)).toFixed(4)
|
||||
row.purchase_price = (row.selling_price / (1+row.markup_percentage/100)).toFixed(4)
|
||||
}
|
||||
}
|
||||
},{
|
||||
@@ -1766,7 +1766,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "purchasePrice",
|
||||
key: "purchase_price",
|
||||
label: "Kaufpreis",
|
||||
inputType: "number",
|
||||
inputStepSize: "0.01",
|
||||
@@ -2108,7 +2108,7 @@ export const useDataStore = defineStore('data', () => {
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
key: "purchasePrice",
|
||||
key: "purchase_price",
|
||||
label: "Einkauspreis",
|
||||
inputType: "number",
|
||||
component: purchasePrice,
|
||||
|
||||
Reference in New Issue
Block a user