fix: paysplit assign & info display

This commit is contained in:
puriphatt 2024-10-17 14:51:42 +07:00
parent b55437fa7e
commit 3a192c0d77
3 changed files with 17 additions and 3 deletions

View file

@ -109,6 +109,11 @@ export const useQuotationForm = defineStore('form-quotation', () => {
})),
dueDate: new Date(data.dueDate),
payBillDate: data.payBillDate ? new Date(data.payBillDate) : undefined,
paySplit: data.paySplit.map((p, index) => ({
no: index + 1,
date: p.date,
amount: p.amount,
})),
worker: data.worker.map((v) =>
Object.assign(v.employee, {
dateOfBirth: new Date(v.employee.dateOfBirth),