From c7438edd799c5b5081a56dfbf679f9f22832ecb6 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Thu, 23 Jan 2025 14:19:56 +0700 Subject: [PATCH] refactor: handle price 0 baht --- .../components/employer/EmployerFormBusiness.vue | 2 +- src/pages/05_quotation/preview/ViewForm.vue | 2 +- src/pages/09_task-order/document_view/MainPage.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue b/src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue index c99ef26c..5f3ab63f 100644 --- a/src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue +++ b/src/pages/03_customer-management/components/employer/EmployerFormBusiness.vue @@ -71,7 +71,7 @@ watch( (newValue) => { if (newValue !== undefined && typeof newValue === 'string') { const numericValue = newValue.replace(/,/g, ''); - wageRateText.value = ThaiBahtText(numericValue); + wageRateText.value = ThaiBahtText(numericValue) || 'ศูนย์บาทถ้วน'; wageRate.value = parseFloat(numericValue); } }, diff --git a/src/pages/05_quotation/preview/ViewForm.vue b/src/pages/05_quotation/preview/ViewForm.vue index bdb3899c..cc80d367 100644 --- a/src/pages/05_quotation/preview/ViewForm.vue +++ b/src/pages/05_quotation/preview/ViewForm.vue @@ -448,7 +448,7 @@ function print() { class="column set-width bg-color full-height" style="padding: 12px" > - ({{ ThaiBahtText(summaryPrice.finalPrice) }}) + ({{ ThaiBahtText(summaryPrice.finalPrice) || 'ศูนย์บาทถ้วน' }})
- ({{ ThaiBahtText(summaryPrice.finalPrice) }}) + ({{ ThaiBahtText(summaryPrice.finalPrice) || 'ศูนย์บาทถ้วน' }})