diff --git a/components/EntityShowSubCreatedDocuments.vue b/components/EntityShowSubCreatedDocuments.vue
index 4aba719..3c5d26f 100644
--- a/components/EntityShowSubCreatedDocuments.vue
+++ b/components/EntityShowSubCreatedDocuments.vue
@@ -107,7 +107,6 @@ const getAvailableQueryStringData = (keys) => {
returnString += `${key}=${value}`
} else {
returnString += `&${key}=${value}`
-
}
}
diff --git a/components/columnRenderings/purchasePrice.vue b/components/columnRenderings/purchasePrice.vue
index dfb1916..8b81b61 100644
--- a/components/columnRenderings/purchasePrice.vue
+++ b/components/columnRenderings/purchasePrice.vue
@@ -9,5 +9,5 @@ const props = defineProps({
- {{props.row.purchasePrice ? useCurrency(props.row.purchasePrice) : ''}}
+ {{props.row.purchase_price ? useCurrency(props.row.purchase_price) : ''}}
diff --git a/components/columnRenderings/sellingPrice.vue b/components/columnRenderings/sellingPrice.vue
index 6bfeeb1..a11b050 100644
--- a/components/columnRenderings/sellingPrice.vue
+++ b/components/columnRenderings/sellingPrice.vue
@@ -9,5 +9,5 @@ const props = defineProps({
- {{props.row.sellingPrice ? useCurrency(props.row.sellingPrice) : ''}}
+ {{props.row.selling_price ? useCurrency(props.row.selling_price) : ''}}
diff --git a/pages/createDocument/index.vue b/pages/createDocument/index.vue
index e16d2d7..81fb7b7 100644
--- a/pages/createDocument/index.vue
+++ b/pages/createDocument/index.vue
@@ -134,25 +134,19 @@
{{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}}
-
-
+
-
-
diff --git a/stores/data.js b/stores/data.js
index adb5f5e..dd805a7 100644
--- a/stores/data.js
+++ b/stores/data.js
@@ -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,