fix some bugs 2
This commit is contained in:
@@ -172,7 +172,13 @@ class WalletController extends Controller
|
||||
$record->title = $record->type_str;
|
||||
$record->unit = "گرم";
|
||||
|
||||
if (isset($record->wallet)) {
|
||||
if ((int) ($record->type ?? 0) === 22) {
|
||||
$record->title = 'تعدیل مانده پرگار';
|
||||
$record->unit = 'گرم';
|
||||
} elseif ((int) ($record->type ?? 0) === 12) {
|
||||
$record->title = 'برداشت وجه نقد';
|
||||
$record->unit = 'ریال';
|
||||
} elseif (isset($record->wallet)) {
|
||||
$wallet = Wallet::with('product')->where('id', $record->wallet)->first();
|
||||
|
||||
if (isset($wallet->product)) {
|
||||
@@ -192,7 +198,9 @@ class WalletController extends Controller
|
||||
$record->title = $record->type_str;
|
||||
}
|
||||
|
||||
$record->save();
|
||||
if (!empty($record->title) && $record->title !== 'تعریف نشده') {
|
||||
$record->save();
|
||||
}
|
||||
}
|
||||
|
||||
$this->applyAbshodeProductTransactionTitle($record);
|
||||
@@ -785,6 +793,14 @@ class WalletController extends Controller
|
||||
return self::mainMetalWithdrawTitle();
|
||||
}
|
||||
|
||||
if ((int) $record->type === 12) {
|
||||
return 'برداشت وجه نقد';
|
||||
}
|
||||
|
||||
if ((int) $record->type === 22) {
|
||||
return 'تعدیل مانده پرگار';
|
||||
}
|
||||
|
||||
return $record->type_str;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user