fix: update status handling in debit note list retrieval and remove unused issued stats calculation
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s

This commit is contained in:
puriphatt 2025-07-07 16:22:21 +07:00
parent 84591ae719
commit 34f5b6474b

View file

@ -66,9 +66,7 @@ async function getList(opts?: { page?: number; pageSize?: number }) {
page: opts?.page || page.value,
pageSize: opts?.pageSize || pageSize.value,
query: pageState.inputSearch === '' ? undefined : pageState.inputSearch,
status: (pageState.currentTab === DebitNoteStatus.Issued
? undefined
: pageState.currentTab) as DebitNoteStatus,
status: pageState.currentTab,
includeRegisteredBranch: true,
startDate: pageState.searchDate[0],
endDate: pageState.searchDate[1],
@ -137,10 +135,10 @@ onMounted(async () => {
if (res) {
stats.value = res;
stats.value['issued'] = Object.values(res).reduce(
(sum, value) => sum + value,
0,
);
// stats.value['issued'] = Object.values(res).reduce(
// (sum, value) => sum + value,
// 0,
// );
}
});