Merge branch 'develop'
This commit is contained in:
commit
5e13864d4a
3 changed files with 21 additions and 6 deletions
|
|
@ -1912,8 +1912,8 @@ async function triggerExport() {
|
||||||
? 'ACTIVE'
|
? 'ACTIVE'
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|
||||||
startDate: new Date(searchDate.value[0]),
|
startDate: searchDate.value[0] ? new Date(searchDate.value[0]) : undefined,
|
||||||
endDate: new Date(searchDate.value[1]),
|
endDate: searchDate.value[1] ? new Date(searchDate.value[1]) : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ function getPrice(
|
||||||
) {
|
) {
|
||||||
if (filterHook) list = list.filter(filterHook);
|
if (filterHook) list = list.filter(filterHook);
|
||||||
|
|
||||||
return list.reduce(
|
const value = list.reduce(
|
||||||
(a, c) => {
|
(a, c) => {
|
||||||
if (
|
if (
|
||||||
selectedInstallmentNo.value.length > 0 &&
|
selectedInstallmentNo.value.length > 0 &&
|
||||||
|
|
@ -236,6 +236,8 @@ function getPrice(
|
||||||
finalPrice: 0,
|
finalPrice: 0,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const summaryPrice = computed(() => getPrice(productServiceList.value));
|
const summaryPrice = computed(() => getPrice(productServiceList.value));
|
||||||
|
|
@ -1143,7 +1145,19 @@ watch(customerBranchOption, () => {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function storeDataLocal() {
|
function storeDataLocal() {
|
||||||
quotationFormData.value.productServiceList = productService.value;
|
const tempProductService = productService.value.map((v) => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
vat: v.product[agentPrice ? 'agentPriceCalcVat' : 'calcVat']
|
||||||
|
? precisionRound(
|
||||||
|
((v.pricePerUnit * (1 + (config?.value.vat || 0.07)) * v.amount -
|
||||||
|
v.discount) /
|
||||||
|
(1 + (config?.value.vat || 0.07))) *
|
||||||
|
0.07,
|
||||||
|
)
|
||||||
|
: 0,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'quotation-preview',
|
'quotation-preview',
|
||||||
|
|
@ -1152,7 +1166,7 @@ function storeDataLocal() {
|
||||||
codeInvoice: code.value,
|
codeInvoice: code.value,
|
||||||
codePayment: firstCodePayment.value,
|
codePayment: firstCodePayment.value,
|
||||||
...quotationFormData.value,
|
...quotationFormData.value,
|
||||||
productServiceList: productService.value,
|
productServiceList: tempProductService,
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
source: {
|
source: {
|
||||||
|
|
|
||||||
|
|
@ -341,12 +341,13 @@ watch(() => state.search, getWorkerList);
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style="display: inline-block; margin-inline: auto"
|
style="display: inline-block; margin-inline: auto"
|
||||||
v-if="workerList.length === 0"
|
v-if="workerList.length === 0 && state.search"
|
||||||
>
|
>
|
||||||
<NoData :not-found="!!state.search" />
|
<NoData :not-found="!!state.search" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TableWorker
|
<TableWorker
|
||||||
|
v-else
|
||||||
v-model:selected="workerSelected"
|
v-model:selected="workerSelected"
|
||||||
:rows="workerList"
|
:rows="workerList"
|
||||||
:disabledWorkerId
|
:disabledWorkerId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue