refactor: simplify total calculation logic in quotation and debit note pages

This commit is contained in:
puriphatt 2025-02-20 11:08:33 +07:00
parent a8f11d158b
commit 8dd3268738
2 changed files with 7 additions and 10 deletions

View file

@ -172,7 +172,12 @@ watch(
color: hsl(var(--info-bg));
"
>
{{ pageState.total }}
{{
Object.entries(stats).reduce(
(sum, [key, value]) => (key === 'canceled' ? sum : sum + value),
0,
)
}}
</q-badge>
<q-btn
class="q-ml-sm"