handle katod show insted of gold
This commit is contained in:
@@ -123,6 +123,8 @@ class WalletController extends Controller
|
||||
|
||||
$record->save();
|
||||
}
|
||||
|
||||
$this->applyMetalTypeTransactionTitle($record);
|
||||
}
|
||||
|
||||
return response()->json($records);
|
||||
@@ -340,4 +342,17 @@ class WalletController extends Controller
|
||||
return response()->json(true);
|
||||
}
|
||||
|
||||
private function applyMetalTypeTransactionTitle($record): void
|
||||
{
|
||||
$metalLabel = self::metalTypeLabel();
|
||||
$legacyDepositTitles = ['واریز طلای ابشده', 'واریز طلای آبشده'];
|
||||
$legacyWithdrawTitles = ['برداشت طلای ابشده', 'برداشت طلای آبشده'];
|
||||
|
||||
if (in_array($record->title, $legacyDepositTitles, true)) {
|
||||
$record->title = "موجودی {$metalLabel}";
|
||||
} elseif (in_array($record->title, $legacyWithdrawTitles, true)) {
|
||||
$record->title = "برداشت {$metalLabel}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user