diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue
index 62d0dea2..23a6221d 100644
--- a/src/pages/05_quotation/QuotationForm.vue
+++ b/src/pages/05_quotation/QuotationForm.vue
@@ -427,6 +427,7 @@ async function fetchQuotation() {
const id = currentQuotationId.value || quotationFormData.value.id || '';
await quotationForm.assignFormData(id, quotationFormState.value.mode);
+
tempPaySplitCount.value = quotationFormData.value.paySplitCount || 0;
tempPaySplit.value = JSON.parse(
JSON.stringify(quotationFormData.value.paySplit),
@@ -609,6 +610,7 @@ async function convertDataToFormSubmit() {
status: quotationFormData.value.status,
discount: quotationFormData.value.discount,
remark: quotationFormData.value.remark || '',
+ agentPrice: agentPrice.value,
};
newWorkerList.value = [];
diff --git a/src/pages/05_quotation/form.ts b/src/pages/05_quotation/form.ts
index f18997e7..5f54dc2c 100644
--- a/src/pages/05_quotation/form.ts
+++ b/src/pages/05_quotation/form.ts
@@ -39,6 +39,7 @@ export const DEFAULT_DATA: QuotationPayload = {
_count: { worker: 0 },
status: 'CREATED',
remark: '#[quotation-labor]
#[quotation-payment]',
+ agentPrice: false,
};
const DEFAULT_DATA_INVOICE: InvoicePayload = {
diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts
index 775dc7ac..f62339ae 100644
--- a/src/stores/quotations/index.ts
+++ b/src/stores/quotations/index.ts
@@ -119,7 +119,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
}
async function editQuotation(data: QuotationPayload & { id: string }) {
- const { _count, ...payload } = data;
+ const { _count, agentPrice, ...payload } = data;
const res = await api.put(`/quotation/${data.id}`, {
...payload,
quotationStatus:
diff --git a/src/stores/quotations/types.ts b/src/stores/quotations/types.ts
index 16db7bb5..be855586 100644
--- a/src/stores/quotations/types.ts
+++ b/src/stores/quotations/types.ts
@@ -371,6 +371,7 @@ export type QuotationPayload = {
status?: Status;
remark?: string;
quotationStatus?: QuotationStatus;
+ agentPrice?: boolean;
};
export type EmployeeWorker = {