diff --git a/components/dashboard/dataset/products.vue b/components/dashboard/dataset/products.vue index dba5060..98ed54c 100644 --- a/components/dashboard/dataset/products.vue +++ b/components/dashboard/dataset/products.vue @@ -5,7 +5,6 @@ - {{ modal.update.data }} Sub Total: - {{ numeral(item.amount + item.price).format('0,0') }} + {{ numeral(calculateSubtotal(item)).format('0,0') }} @@ -129,7 +129,7 @@

Total: {{ numeral(storeCart.totalPrice).format('0,0') - }} + }}

Items: {{ storeCart.totalItem }}

@@ -201,6 +201,10 @@ function decrementQty(item: { amount: number }) { } } +function calculateSubtotal(product: { price: number, amount: number }) { + return product.price * product.amount; +} + const productIdWithoutSellingPrice = ref(undefined) const handleInputItem = (code: string) => {