diff --git a/src/pages/05_quotation/PaymentForm.vue b/src/pages/05_quotation/PaymentForm.vue index 47ed2a6c..e8251077 100644 --- a/src/pages/05_quotation/PaymentForm.vue +++ b/src/pages/05_quotation/PaymentForm.vue @@ -3,6 +3,8 @@ import { baseUrl } from 'stores/utils'; import { storeToRefs } from 'pinia'; import { useConfigStore } from 'stores/config'; import { formatNumberDecimal } from 'stores/utils'; +import { MainButton } from 'components/button'; + import { reactive, ref } from 'vue'; import { useQuotationPayment } from 'src/stores/quotations'; import { @@ -11,7 +13,7 @@ import { QuotationFull, QuotationPaymentData, } from 'src/stores/quotations/types'; -import { dateFormat } from 'src/utils/datetime'; +import { dateFormatJS } from 'src/utils/datetime'; import { QFile, QMenu } from 'quasar'; import UploadFileCard from 'src/components/upload-file/UploadFileCard.vue'; import { onMounted } from 'vue'; @@ -60,10 +62,12 @@ const state = reactive({ payExpansion: [] as boolean[], }); +defineEmits<{ + (e: 'view', id: string): void; +}>(); + function monthDisplay(date: Date | string) { - const arr = dateFormat(date, true).split(' '); - arr.shift(); - return arr.join(' '); + return dateFormatJS({ date, monthStyle: 'long', locale: 'th-Th' }); } function pickFile(index: number) { @@ -463,83 +467,97 @@ onMounted(async () => { class="row full-width items-center surface-2 bordered-b q-px-md q-py-sm" > - {{ $t('quotation.receiptDialog.allInstallments') }} - {{ monthDisplay(p.date) }} - - {{ $t('quotation.receiptDialog.paymentDueDate') }} - {{ - data.payCondition !== 'BillFull' - ? dateFormat(p.date, true) - : dateFormat(data.payBillDate) - }} - + {{ $t('quotation.periodNo') }} {{ i + 1 }} + {{ monthDisplay(p.createdAt) }} + + + + + + + + + + + + - - - - {{ $t(`quotation.receiptDialog.${p.paymentStatus}`) }} - - - + - - + + + +
{{ $t('quotation.receiptDialog.amountToBePaid') }} diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index bb4d1f9a..54ca5ab4 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -845,6 +845,7 @@ function storeDataLocal() { 3: 'invoice', 4: 'payment', 6: 'receipt', + 7: 'receipt', }; const documentType = documentTypes[view.value] || ''; @@ -1221,6 +1222,7 @@ const view = ref(View.Quotation);