This commit is contained in:
fhm 2025-06-16 00:40:01 +07:00
parent e009306325
commit a3a3aea351
2 changed files with 6 additions and 3 deletions

View File

@ -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' },

View File

@ -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>
@ -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) => {