feat: shayegan inbound charges workflow and copper kilogram unit enforcement
This commit is contained in:
@@ -500,7 +500,7 @@ class Controller extends BaseController
|
||||
return self::isMainWalletProduct($productId) ? null : $productId;
|
||||
}
|
||||
|
||||
/** واحد وزن معاملات فلز — از ستینگ unit؛ پیشفرض گرم */
|
||||
/** واحد وزن معاملات فلز — در بورس مس پیشفرض کیلوگرم است */
|
||||
public static function tradeWeightUnit(): string
|
||||
{
|
||||
return self::resolveTradeWeightUnit(
|
||||
@@ -512,11 +512,11 @@ class Controller extends BaseController
|
||||
{
|
||||
$unit = trim((string) $value);
|
||||
|
||||
if ($unit === 'کیلوگرم' || $unit === 'kilogram' || $unit === 'kg') {
|
||||
return 'کیلوگرم';
|
||||
if ($unit === 'گرم' || $unit === 'gram' || $unit === 'g') {
|
||||
return 'گرم';
|
||||
}
|
||||
|
||||
return 'گرم';
|
||||
return 'کیلوگرم';
|
||||
}
|
||||
|
||||
public static function weightToGrams(float $value, ?string $fromUnit = null): float
|
||||
|
||||
Reference in New Issue
Block a user