diff --git a/src/components/11_credit-note/FormCredit.vue b/src/components/11_credit-note/FormCredit.vue index 68bb7ab2..d08c96dc 100644 --- a/src/components/11_credit-note/FormCredit.vue +++ b/src/components/11_credit-note/FormCredit.vue @@ -32,6 +32,9 @@ const quotationId = defineModel('quotationId', { class="col" v-model:value="quotationId" :label="$t('general.select', { msg: $t('quotation.title') })" + :params="{ + hasCancel: true, + }" /> diff --git a/src/components/12_debit-note/FormDebit.vue b/src/components/12_debit-note/FormDebit.vue index 1aa8e421..60bf596f 100644 --- a/src/components/12_debit-note/FormDebit.vue +++ b/src/components/12_debit-note/FormDebit.vue @@ -32,6 +32,9 @@ const quotationId = defineModel('quotationId', { class="col" v-model:value="quotationId" :label="$t('general.select', { msg: $t('quotation.title') })" + :params="{ + forDebitNote: true, + }" /> diff --git a/src/components/shared/select/SelectQuotation.vue b/src/components/shared/select/SelectQuotation.vue index 049e043e..15dfb89c 100644 --- a/src/components/shared/select/SelectQuotation.vue +++ b/src/components/shared/select/SelectQuotation.vue @@ -47,7 +47,6 @@ const { getOptions, setFirstValue, getSelectedOption, filter } = query, ...props.params, pageSize: 30, - hasCancel: true, includeRegisteredBranch: true, }); if (ret) return ret.result; @@ -151,6 +150,7 @@ function setDefaultValue() { class="surface-3 q-ml-sm" rounded style="color: var(--foreground)" + v-if="props.params?.hasCancel" > {{ scope.opt._count.canceledWork || 0 }} @@ -191,6 +191,7 @@ function setDefaultValue() { class="surface-3 q-ml-xs" rounded style="color: var(--foreground)" + v-if="props.params?.hasCancel" > {{ scope.opt._count.canceledWork || 0 }} diff --git a/src/stores/quotations/index.ts b/src/stores/quotations/index.ts index 775dc7ac..cb32cb6a 100644 --- a/src/stores/quotations/index.ts +++ b/src/stores/quotations/index.ts @@ -71,6 +71,7 @@ export const useQuotationStore = defineStore('quotation-store', () => { query?: string; hasCancel?: boolean; includeRegisteredBranch?: boolean; + forDebitNote?: boolean; }) { const res = await api.get>('/quotation', { params,