This commit is contained in:
parent
e009306325
commit
a3a3aea351
|
@ -5,7 +5,6 @@
|
|||
<DashboardDatasetProductModalAdd @created="() => refresh()" />
|
||||
<DashboardDatasetProductModalCategory />
|
||||
</div>
|
||||
{{ modal.update.data }}
|
||||
<NuxtUiTable :loading="status === 'pending'" :rows="data?.data?.data" :columns="[
|
||||
{ key: 'actions', label: 'Actions' },
|
||||
{ key: 'category_name', label: 'Category' },
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<div class="flex justify-between">
|
||||
<span class="inline-block pe-3 w-fit">Sub Total:</span>
|
||||
<span class="inline-block text-green-500 font-semibold">
|
||||
{{ numeral(item.amount + item.price).format('0,0') }}
|
||||
{{ numeral(calculateSubtotal(item)).format('0,0') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<p class="dark:text-white">
|
||||
Total: <span class="text-green-500 font-semibold">{{
|
||||
numeral(storeCart.totalPrice).format('0,0')
|
||||
}}</span>
|
||||
}}</span>
|
||||
</p>
|
||||
<p class="text-sm text-gray-500">Items: {{ storeCart.totalItem }}</p>
|
||||
</div>
|
||||
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue