fix(wallet,assets): fix 3 extra zeros in wallet rial value and handle closed market in asset calculations

This commit is contained in:
2026-11-19 11:00:41 +03:30
parent ce9d62ffaa
commit 070acd52e0
5 changed files with 143 additions and 18 deletions
+5 -1
View File
@@ -47,7 +47,11 @@ class BalanceReportService
public function gramsToMetalDisplay(float $grams, int $metalId): float
{
return (int) $metalId === 3 ? $grams / 1000.0 : $grams;
if ((int) $metalId === 3 || (int) $metalId === 0 || $this->metalDisplayUnit($metalId) === 'کیلوگرم') {
return $grams / 1000.0;
}
return $grams;
}
/**