feat: shayegan inbound charges workflow and copper kilogram unit enforcement

This commit is contained in:
2026-11-05 17:15:38 +03:30
parent e65b8053fd
commit 7dd5304638
13 changed files with 787 additions and 18 deletions
+4 -4
View File
@@ -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