fix(wallet): use kilogram as default unit for copper exchange
This commit is contained in:
@@ -1458,7 +1458,7 @@ class WalletController extends Controller
|
||||
'allows_decimal' => !$isCountBased,
|
||||
'unit' => $product
|
||||
? self::productQuantityUnit(self::productUnitPayload($product))
|
||||
: 'گرم',
|
||||
: 'کیلوگرم',
|
||||
];
|
||||
})->values();
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ class Controller extends BaseController
|
||||
return $unit;
|
||||
}
|
||||
|
||||
return 'گرم';
|
||||
return 'کیلوگرم';
|
||||
}
|
||||
|
||||
public static function productLineWeightToGrams($product, $quantity): float
|
||||
|
||||
@@ -183,14 +183,14 @@ class WalletController extends Controller
|
||||
if (empty($record->title) || $record->title == "تعریف نشده") {
|
||||
|
||||
$record->title = $record->type_str;
|
||||
$record->unit = "گرم";
|
||||
$record->unit = "کیلوگرم";
|
||||
|
||||
if ((int) ($record->type ?? 0) === 22) {
|
||||
$record->title = 'تعدیل حسابداری پرگار';
|
||||
$record->unit = 'گرم';
|
||||
$record->unit = 'کیلوگرم';
|
||||
} elseif ((int) ($record->type ?? 0) === 23) {
|
||||
$record->title = 'تعدیل حسابداری تهحساب';
|
||||
$record->unit = 'گرم';
|
||||
$record->unit = 'کیلوگرم';
|
||||
} elseif ((int) ($record->type ?? 0) === 12) {
|
||||
$record->title = 'برداشت وجه نقد';
|
||||
$record->unit = 'ریال';
|
||||
|
||||
Reference in New Issue
Block a user