refactor(billing): unify BMPA audit to use snapshot fields

This commit is contained in:
萝卜
2026-03-17 12:07:15 +08:00
parent 549cf4f5ac
commit d6d95a5cb0
3 changed files with 80 additions and 4 deletions

View File

@@ -865,8 +865,12 @@
$snapPaid = data_get($snap, 'paid_amount');
$snapRefund = data_get($snap, 'refund_total');
if ($snapPaid !== null || $snapRefund !== null) {
$pairs[] = 'paid=¥' . number_format((float) ($snapPaid ?? 0), 2);
$pairs[] = 'refund=¥' . number_format((float) ($snapRefund ?? 0), 2);
if ($snapPaid !== null) {
$pairs[] = 'paid=¥' . number_format((float) $snapPaid, 2);
}
if ($snapRefund !== null) {
$pairs[] = 'refund=¥' . number_format((float) $snapRefund, 2);
}
// 剩余字段key=value
foreach ($snap as $k => $v) {