diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 6740f0ad..1223a27c 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -296,7 +296,9 @@ const productService = computed(() => { function isIssueInvoice() { return quotationFormData.value.paySplit.some( - (v) => selectedInstallmentNo.value.includes(v.no) && !!v.invoiceId, + (value) => + selectedInstallmentNo.value.includes(value.no) && + value.invoiceId !== undefined, ); } diff --git a/src/pages/05_quotation/form.ts b/src/pages/05_quotation/form.ts index ef81a395..3a51506c 100644 --- a/src/pages/05_quotation/form.ts +++ b/src/pages/05_quotation/form.ts @@ -136,7 +136,7 @@ export const useQuotationForm = defineStore('form-quotation', () => { payBillDate: data.payBillDate ? new Date(data.payBillDate) : undefined, paySplit: data.paySplit.map((p) => ({ no: p.no, - invoiceId: p.invoiceId, + invoiceId: p.invoiceId || undefined, name: p.name, amount: p.amount, })),