fixed amount

This commit is contained in:
2026-07-04 12:06:02 +03:30
parent 0bcd9ce551
commit 212bfb1cc1
5 changed files with 51 additions and 50 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
import type { Product } from '@/models/products'
import { formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
import { formatGoldAmount, formatWeightAmount, usePriceWithoutType } from '@/utils/usePrice'
import type { UserWalletLine } from '@/models/wallet'
import type { ProductFile } from '@/utils/file'
import type { WalletInventoryCard, WalletMetalTotal } from '@/models/walletAssets'
@@ -587,8 +587,10 @@ export function formatProductWalletBalanceText(
const quantity = card ? Number(card.quantity ?? 0) : Number(mainWalletGold ?? 0)
const unit = card?.unit ?? getProductQuantityUnit(product)
const title = product?.title?.trim() || 'محصول'
const formattedQty =
unit === 'عدد' ? usePriceWithoutType(quantity, false) : formatGoldAmount(quantity)
return `موجودی کیف ${title}: ${quantity} ${unit}`
return `موجودی کیف ${title}: ${formattedQty} ${unit}`
}
export function isSingleMetalCatalog(metalIds: number[]): boolean {