Merge branch 'devCorrected' into 'beta'
BETA for new DB See merge request fedeo/software!41
This commit is contained in:
@@ -107,7 +107,6 @@ const getAvailableQueryStringData = (keys) => {
|
||||
returnString += `${key}=${value}`
|
||||
} else {
|
||||
returnString += `&${key}=${value}`
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.purchasePrice ? useCurrency(props.row.purchasePrice) : ''}}</span>
|
||||
<span>{{props.row.purchase_price ? useCurrency(props.row.purchase_price) : ''}}</span>
|
||||
</template>
|
||||
|
||||
@@ -9,5 +9,5 @@ const props = defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span>{{props.row.sellingPrice ? useCurrency(props.row.sellingPrice) : ''}}</span>
|
||||
<span>{{props.row.selling_price ? useCurrency(props.row.selling_price) : ''}}</span>
|
||||
</template>
|
||||
|
||||
@@ -134,25 +134,19 @@
|
||||
<span v-if="row.documentDate">{{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}}</span>
|
||||
</template>
|
||||
<template #dueDate-data="{row}">
|
||||
<!--
|
||||
<span v-if="row.state === 'Gebucht' && row.paymentDays && ['invoices','advanceInvoices'].includes(row.type) && !items.find(i => i.linkedDocument && i.linkedDocument.id === row.id)" :class="dayjs(row.documentDate).add(row.paymentDays,'day').diff(dayjs()) <= 0 && !isPaid(row) ? ['text-rose-500'] : '' ">{{row.documentDate ? dayjs(row.documentDate).add(row.paymentDays,'day').format("DD.MM.YY") : ''}}</span>
|
||||
-->
|
||||
</template>
|
||||
<template #paid-data="{row}">
|
||||
<!-- <div v-if="(row.type === 'invoices' ||row.type === 'advanceInvoices') && row.state === 'Gebucht' && !items.find(i => i.linkedDocument && i.linkedDocument.id === row.id)">
|
||||
<div v-if="(row.type === 'invoices' ||row.type === 'advanceInvoices') && row.state === 'Gebucht' && !items.find(i => i.linkedDocument && i.linkedDocument.id === row.id)">
|
||||
<span v-if="useSum().getIsPaid(row,items)" class="text-primary-500">Bezahlt</span>
|
||||
<span v-else class="text-rose-600">Offen</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</template>
|
||||
<template #amount-data="{row}">
|
||||
<!--
|
||||
<span v-if="row.type !== 'deliveryNotes'">{{displayCurrency(useSum().getCreatedDocumentSum(row,items))}}</span>
|
||||
-->
|
||||
</template>
|
||||
<template #amountOpen-data="{row}">
|
||||
<!--
|
||||
<span v-if="!['deliveryNotes','cancellationInvoices','quotes','confirmationOrders'].includes(row.type) && row.state !== 'Entwurf' && !useSum().getIsPaid(row,items) && !items.find(i => i.linkedDocument && i.linkedDocument.id === row.id) ">{{displayCurrency(useSum().getCreatedDocumentSum(row, items) - row.statementallocations.reduce((n,{amount}) => n + amount, 0))}}</span>
|
||||
-->
|
||||
</template>
|
||||
</UTable>
|
||||
</div>
|
||||
|
||||
@@ -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