feat(platform-orders): 退款总额统计(详情页+导出)
This commit is contained in:
@@ -537,6 +537,7 @@ class PlatformOrderController extends Controller
|
||||
'最近退款时间',
|
||||
'最近退款金额',
|
||||
'最近退款渠道',
|
||||
'退款总额',
|
||||
];
|
||||
|
||||
if ($includeMeta) {
|
||||
@@ -596,6 +597,13 @@ class PlatformOrderController extends Controller
|
||||
(string) (data_get($latestRefund, 'refunded_at') ?? ''),
|
||||
(float) (data_get($latestRefund, 'amount') ?? 0),
|
||||
(string) (data_get($latestRefund, 'channel') ?? ''),
|
||||
(function () use ($refunds) {
|
||||
$total = 0.0;
|
||||
foreach ($refunds as $r) {
|
||||
$total += (float) (data_get($r, 'amount') ?? 0);
|
||||
}
|
||||
return $total;
|
||||
})(),
|
||||
];
|
||||
|
||||
if ($includeMeta) {
|
||||
|
||||
Reference in New Issue
Block a user