对账明细导出:摘要增加 refund_inconsistent 标记
This commit is contained in:
@@ -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') ?? '')]);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user