fix fallback base on show product

This commit is contained in:
2026-06-17 16:03:19 +03:30
parent b42b123957
commit 594ace25f1
8 changed files with 51 additions and 20 deletions
+2 -2
View File
@@ -300,7 +300,7 @@ import { isStoreClosed, getStoreClosedMessage } from '@/utils/storeHours'
import { formatCashWalletBalanceText, getWeightUnit } from '@/utils/productDealMethod'
import { formatProductWalletBalanceText, getCashWalletBalance, getProductInventoryQuantity } from '@/utils/productAssets'
import { useWalletAssets } from '@/composables/useWalletAssets'
import { isMeltedTradeGroup } from '@/utils/productCategories'
import { usesQuantityTrade } from '@/utils/productCategories'
import { useSettingsStore } from '@/store/settingsStore'
import { storeToRefs } from 'pinia'
import {
@@ -381,7 +381,7 @@ const sellPagination = ref<TableEngineInput>({
const unitPrice = computed(() => {
const product = props.ProductItem
if (isMeltedTradeGroup(product?.group_type)) {
if (usesQuantityTrade(product)) {
return isBuy.value ? getProductBuyPrice(product!) : getProductSellPrice(product!)
}
return isBuy.value ? getTradeBuyPrice(lastPrice.value) : getTradeSellPrice(lastPrice.value)