fix report
This commit is contained in:
@@ -476,9 +476,17 @@ class WalletController extends Controller
|
||||
}
|
||||
|
||||
if (preg_match('/^(موجودی|واریز)/u', (string) $record->title)) {
|
||||
$record->title = self::meltedGoldDepositTitle();
|
||||
if ((int) ($record->type ?? 0) === 7) {
|
||||
$record->title = self::mainMetalDepositTitle();
|
||||
} else {
|
||||
$record->title = self::meltedGoldDepositTitle();
|
||||
}
|
||||
} elseif (preg_match('/^برداشت /u', (string) $record->title)) {
|
||||
$record->title = self::meltedGoldWithdrawTitle();
|
||||
if ((int) ($record->type ?? 0) === 10) {
|
||||
$record->title = self::mainMetalWithdrawTitle();
|
||||
} else {
|
||||
$record->title = self::meltedGoldWithdrawTitle();
|
||||
}
|
||||
} elseif (preg_match('/^خرید /u', (string) $record->title)) {
|
||||
$record->title = self::meltedGoldBuyTitle();
|
||||
} elseif (preg_match('/^فروش /u', (string) $record->title)) {
|
||||
@@ -525,11 +533,19 @@ class WalletController extends Controller
|
||||
private function resolveMainWalletTransactionTitle($record): string
|
||||
{
|
||||
if ((int) $record->type === 1) {
|
||||
return self::meltedGoldBuyTitle();
|
||||
return self::mainMetalBuyTitle();
|
||||
}
|
||||
|
||||
if ((int) $record->type === 2) {
|
||||
return self::meltedGoldSellTitle();
|
||||
return self::mainMetalSellTitle();
|
||||
}
|
||||
|
||||
if ((int) $record->type === 7) {
|
||||
return self::mainMetalDepositTitle();
|
||||
}
|
||||
|
||||
if ((int) $record->type === 10) {
|
||||
return self::mainMetalWithdrawTitle();
|
||||
}
|
||||
|
||||
return $record->type_str;
|
||||
|
||||
Reference in New Issue
Block a user