feat(export): add reconcile/refund inconsistent flags to platform order CSV
This commit is contained in:
@@ -1374,6 +1374,8 @@ class PlatformOrderController extends Controller
|
||||
'退款总额',
|
||||
'回执总额',
|
||||
'对账差额',
|
||||
'对账不一致',
|
||||
'退款不一致',
|
||||
];
|
||||
|
||||
if ($includeMeta) {
|
||||
@@ -1443,6 +1445,8 @@ class PlatformOrderController extends Controller
|
||||
(float) $order->refundTotal(),
|
||||
(float) $order->receiptTotal(),
|
||||
(float) $order->receiptTotal() - (float) ($order->paid_amount ?? 0),
|
||||
((bool) $order->isReconcileMismatch()) ? '1' : '0',
|
||||
((bool) $order->isRefundInconsistent()) ? '1' : '0',
|
||||
];
|
||||
|
||||
if ($includeMeta) {
|
||||
|
||||
@@ -129,6 +129,8 @@ class AdminPlatformOrderExportTest extends TestCase
|
||||
$this->assertStringContainsString('最近批量生效时间', $content);
|
||||
$this->assertStringContainsString('最近批量生效管理员', $content);
|
||||
$this->assertStringContainsString('退款总额', $content);
|
||||
$this->assertStringContainsString('对账不一致', $content);
|
||||
$this->assertStringContainsString('退款不一致', $content);
|
||||
|
||||
// include_meta=1 时应包含 meta(JSON) 列
|
||||
$res2 = $this->get('/admin/platform-orders/export?download=1&include_meta=1');
|
||||
|
||||
Reference in New Issue
Block a user