diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index 247f4af0..13dcc601 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -59,10 +59,12 @@ export const useQuotationStore = defineStore('quotation-store', () => { return null; } - async function createQuotation(payload: QuotationPayload) { + async function createQuotation(data: QuotationPayload) { + const { _count, ...payload } = data; + const res = await api.post('/quotation', { ...payload, - productServiceList: payload.productServiceList.map((v) => ({ + productServiceList: data.productServiceList.map((v) => ({ vat: v.vat, amount: v.amount, pricePerUnit: v.pricePerUnit,