diff --git a/src/utils/productAssets.ts b/src/utils/productAssets.ts index e60ae7c..c0b5572 100644 --- a/src/utils/productAssets.ts +++ b/src/utils/productAssets.ts @@ -327,7 +327,10 @@ export function buildBoursecuHomeAssetRows( const metalTotals = summary.metal_totals ?? [] const copperMetal = findMetalTotalById(metalTotals, METAL_COPPER) const weightUnit = copperMetal?.unit || 'کیلوگرم' - const totalCopperWeight = sumBoursecuHomeProductInventories(inventoryCards, countProducts) + const totalCopperWeight = + copperMetal != null + ? Number(copperMetal.total_weight ?? 0) + : sumBoursecuHomeProductInventories(inventoryCards, countProducts) const cash = Number(summary.cash_wallet ?? 0) const metalRial = resolveAssetsRialValue(summary, liveCopperPrice)