进行了一些小优化
This commit is contained in:
@@ -251,6 +251,9 @@ endif; ?>
|
||||
$delta = (int) $row['delta_minor'];
|
||||
$delta_class = $delta >= 0 ? 'is-positive' : 'is-negative';
|
||||
$delta_txt = ($delta > 0 ? '+' : '-') . \AKSRT\Ledger\AssetAmount::from_minor(\AKSRT\Ledger\AssetType::BALANCE, abs($delta))->formatted();
|
||||
$record_note = in_array((string) $row['reason'], ['withdraw_hold', 'withdraw_refund'], true)
|
||||
? (string) ($row['withdrawal_number'] ?? '')
|
||||
: (string) ($row['remark'] ?? '');
|
||||
?>
|
||||
<div class="uc-transactions__item">
|
||||
<div class="uc-transactions__icon <?php echo esc_attr($delta_class); ?>">
|
||||
@@ -259,8 +262,8 @@ endif; ?>
|
||||
<div class="uc-transactions__info">
|
||||
<div class="uc-transactions__reason">
|
||||
<?php echo esc_html(aksrt_asset_reason_label((string) $row['reason'])); ?>
|
||||
<?php if (!empty($row['remark'])) : ?>
|
||||
<span class="uc-transactions__remark">(<?php echo esc_html((string) $row['remark']); ?>)</span>
|
||||
<?php if ($record_note !== '') : ?>
|
||||
<span class="uc-transactions__remark">(<?php echo esc_html($record_note); ?>)</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="uc-transactions__time"><?php echo esc_html(get_date_from_gmt((string) $row['created_at'], 'Y-m-d H:i')); ?></div>
|
||||
|
||||
@@ -82,9 +82,12 @@ if ($show_wallet || $show_credits) :
|
||||
$delta = (int) $row['delta_minor'];
|
||||
$delta_class = $delta >= 0 ? 'is-positive' : 'is-negative';
|
||||
$delta_txt = ($delta > 0 ? '+' : '-') . \AKSRT\Ledger\AssetAmount::from_minor(\AKSRT\Ledger\AssetType::BALANCE, abs($delta))->formatted();
|
||||
$record_note = (string) $row['reason'] === 'points_exchange'
|
||||
? (string) $row['ref_key']
|
||||
: (string) $row['remark'];
|
||||
$record_note = (string) $row['reason'] === 'points_exchange'
|
||||
? (string) $row['ref_key']
|
||||
: (string) $row['remark'];
|
||||
if (in_array((string) $row['reason'], ['withdraw_hold', 'withdraw_refund'], true)) {
|
||||
$record_note = (string) ($row['withdrawal_number'] ?? '');
|
||||
}
|
||||
?>
|
||||
<div class="uc-transactions__item">
|
||||
<div class="uc-transactions__icon <?php echo esc_attr($delta_class); ?>">
|
||||
|
||||
Reference in New Issue
Block a user