refactor: update summary price

This commit is contained in:
Methapon Metanipat 2024-10-11 14:14:19 +07:00
parent 913671aa5a
commit 712e3a8eb7

View file

@ -455,14 +455,7 @@ watch(
<div class="row">
{{ $t('general.total') }}
<span class="q-ml-auto">
{{
formatNumberDecimal(
summaryPrice.finalPrice +
summaryPrice.totalDiscount +
Number(finalDiscount),
2,
) || 0
}}
{{ formatNumberDecimal(summaryPrice.totalPrice, 2) }}
฿
</span>
</div>
@ -477,7 +470,7 @@ watch(
<span class="q-ml-auto">
{{
formatNumberDecimal(
summaryPrice.finalPrice + Number(finalDiscount),
summaryPrice.totalPrice - summaryPrice.totalDiscount,
2,
)
}}
@ -487,14 +480,7 @@ watch(
<div class="row">
{{ $t('general.totalVatExcluded') }}
<span class="q-ml-auto">
{{
formatNumberDecimal(
summaryPrice.finalPrice +
Number(finalDiscount) -
Number(summaryPrice.vat),
2,
) || 0
}}
{{ formatNumberDecimal(0, 2) || 0 }}
฿
</span>
</div>
@ -503,9 +489,9 @@ watch(
<span class="q-ml-auto">
{{
formatNumberDecimal(
summaryPrice.finalPrice + Number(finalDiscount),
summaryPrice.totalPrice - summaryPrice.totalDiscount,
2,
) || 0
)
}}
฿
</span>
@ -517,7 +503,7 @@ watch(
})
}}
<span class="q-ml-auto">
{{ formatNumberDecimal(summaryPrice.vat || 0, 2) }} ฿
{{ formatNumberDecimal(summaryPrice.vat, 2) }} ฿
</span>
</div>
<div class="row">