diff --git a/src/pages/10_invoice/MainPage.vue b/src/pages/10_invoice/MainPage.vue index fd21a427..d2a96c74 100644 --- a/src/pages/10_invoice/MainPage.vue +++ b/src/pages/10_invoice/MainPage.vue @@ -53,6 +53,8 @@ async function fetchList(opts?: { rotateFlowId?: boolean }) { : pageState.statusFilter === PaymentDataStatus.Wait ? false : undefined, + quotationOnly: true, + debitNoteOnly: false, }); if (ret) { data.value = ret.result; @@ -64,7 +66,10 @@ async function fetchList(opts?: { rotateFlowId?: boolean }) { } async function fetchStats() { - const ret = await invoiceStore.getInvoiceStats(); + const ret = await invoiceStore.getInvoiceStats({ + quotationOnly: true, + debitNoteOnly: false, + }); if (ret) stats.value = ret; } diff --git a/src/stores/payment/index.ts b/src/stores/payment/index.ts index 10280b7c..e85de252 100644 --- a/src/stores/payment/index.ts +++ b/src/stores/payment/index.ts @@ -128,7 +128,12 @@ export const useInvoice = defineStore('invoice-store', () => { [PaymentDataStatus.Wait]: 0, }); - async function getInvoiceStats(params?: { quotationId?: string }) { + async function getInvoiceStats(params?: { + quotationId?: string; + quotationOnly?: boolean; + debitNoteId?: string; + debitNoteOnly?: boolean; + }) { const res = await api.get>( '/invoice/stats', { params }, @@ -149,8 +154,11 @@ export const useInvoice = defineStore('invoice-store', () => { page?: number; pageSize?: number; query?: string; - quotationId?: string; pay?: boolean; + quotationOnly?: boolean; + debitNoteOnly?: boolean; + quotationId?: string; + debitNoteId?: string; }) { const res = await api.get>('/invoice', { params,