fix some bugs

This commit is contained in:
2026-06-23 22:30:51 +03:30
parent e07a4c9940
commit 69a39ff371
+4 -1
View File
@@ -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)