fix(wallet,assets): fix 3 extra zeros in wallet rial value and handle closed market in asset calculations
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user