From 80056f8e0bcf29843dd8a90eda4c23a2d90a369f Mon Sep 17 00:00:00 2001 From: net Date: Thu, 18 Sep 2025 15:39:25 +0700 Subject: [PATCH 1/3] fix: search date product --- src/pages/04_product-service/MainPage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 092566cd..48f1d1f5 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -1912,8 +1912,8 @@ async function triggerExport() { ? 'ACTIVE' : undefined, - startDate: new Date(searchDate.value[0]), - endDate: new Date(searchDate.value[1]), + startDate: searchDate.value[0] ? new Date(searchDate.value[0]) : undefined, + endDate: searchDate.value[1] ? new Date(searchDate.value[1]) : undefined, }); } From aa908f0c3dd9131d14b5491c5b711b9c32527ca9 Mon Sep 17 00:00:00 2001 From: net Date: Thu, 18 Sep 2025 16:41:41 +0700 Subject: [PATCH 2/3] fix: show summary price --- src/pages/05_quotation/QuotationForm.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 1846848a..7b293524 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -196,7 +196,7 @@ function getPrice( ) { if (filterHook) list = list.filter(filterHook); - return list.reduce( + const value = list.reduce( (a, c) => { if ( selectedInstallmentNo.value.length > 0 && @@ -236,6 +236,8 @@ function getPrice( finalPrice: 0, }, ); + + return value; } const summaryPrice = computed(() => getPrice(productServiceList.value)); @@ -1143,7 +1145,19 @@ watch(customerBranchOption, () => { // } 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( 'quotation-preview', @@ -1152,7 +1166,7 @@ function storeDataLocal() { codeInvoice: code.value, codePayment: firstCodePayment.value, ...quotationFormData.value, - productServiceList: productService.value, + productServiceList: tempProductService, }, meta: { source: { From 61dca12e5acb5dbb89622b87569983153eaafefe Mon Sep 17 00:00:00 2001 From: net Date: Thu, 18 Sep 2025 17:34:23 +0700 Subject: [PATCH 3/3] fix: no data --- src/pages/05_quotation/QuotationFormWorkerAddDialog.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/05_quotation/QuotationFormWorkerAddDialog.vue b/src/pages/05_quotation/QuotationFormWorkerAddDialog.vue index 89904bbf..64a7fbbf 100644 --- a/src/pages/05_quotation/QuotationFormWorkerAddDialog.vue +++ b/src/pages/05_quotation/QuotationFormWorkerAddDialog.vue @@ -341,12 +341,13 @@ watch(() => state.search, getWorkerList); >