fix(wallet,assets): fix 3 extra zeros in wallet rial value and handle closed market in asset calculations
This commit is contained in:
@@ -219,7 +219,11 @@ class ProductPriceSyncService
|
||||
}
|
||||
|
||||
if ($product->reading_method == 'مس' && $CP) {
|
||||
ProductPriceService::syncFromReference($product, (int) $CP, 0);
|
||||
$unitCp = (int) $CP;
|
||||
if ($unitCp > 500_000_000) {
|
||||
$unitCp = (int) round($unitCp / 1000);
|
||||
}
|
||||
ProductPriceService::syncFromReference($product, $unitCp, 0);
|
||||
Product::where('id', $product->id)->update(['show' => $show]);
|
||||
$synced = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user