From 49c4733ddab58a6b367bef2c1555dbc3c2bf8092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Fri, 13 Mar 2026 21:14:43 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E6=98=8E=E7=BB=86=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=EF=BC=9A=E6=91=98=E8=A6=81=E5=A2=9E=E5=8A=A0=20refund?= =?UTF-8?q?=5Finconsistent=20=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/PlatformOrderController.php | 3 +++ tests/Feature/AdminPlatformOrderExportLedgerTest.php | 1 + 2 files changed, 4 insertions(+) diff --git a/app/Http/Controllers/Admin/PlatformOrderController.php b/app/Http/Controllers/Admin/PlatformOrderController.php index 381313a..e233cc2 100644 --- a/app/Http/Controllers/Admin/PlatformOrderController.php +++ b/app/Http/Controllers/Admin/PlatformOrderController.php @@ -480,7 +480,10 @@ class PlatformOrderController extends Controller fputcsv($out, ['refund_total', number_format($refundTotal, 2, '.', '')]); fputcsv($out, ['reconcile_delta', number_format($delta, 2, '.', '')]); fputcsv($out, ['amount_tolerance', number_format($tol, 2, '.', '')]); + $refundInconsistent = (bool) $order->isRefundInconsistent(); + fputcsv($out, ['reconcile_mismatch', $reconcileMismatch ? '1' : '0']); + fputcsv($out, ['refund_inconsistent', $refundInconsistent ? '1' : '0']); fputcsv($out, ['placed_at', (string) (optional($order->placed_at)->format('Y-m-d H:i:s') ?? '')]); fputcsv($out, ['paid_at', (string) (optional($order->paid_at)->format('Y-m-d H:i:s') ?? '')]); diff --git a/tests/Feature/AdminPlatformOrderExportLedgerTest.php b/tests/Feature/AdminPlatformOrderExportLedgerTest.php index 0a674a2..20011b3 100644 --- a/tests/Feature/AdminPlatformOrderExportLedgerTest.php +++ b/tests/Feature/AdminPlatformOrderExportLedgerTest.php @@ -115,6 +115,7 @@ class AdminPlatformOrderExportLedgerTest extends TestCase $this->assertStringContainsString('reconcile_delta,10.00', $content2); $this->assertStringContainsString('amount_tolerance,0.01', $content2); $this->assertStringContainsString('reconcile_mismatch,1', $content2); + $this->assertStringContainsString('refund_inconsistent,0', $content2); } public function test_show_page_should_render_export_ledger_link(): void