-
原因:订单命中「对账不一致/退款不一致」。为避免把“带病订单”同步到订阅,请先完成金额/状态治理。
-
+
当前订单命中「对账不一致/退款不一致」。为避免把“带病订单”同步到订阅,请先完成金额/状态治理。
+
@if($order->isReconcileMismatch())
@php
$fixReceiptUrl = '/admin/platform-orders/' . $order->id . '?' . \Illuminate\Support\Arr::query(['back' => $orderShowSelf]) . '#add-payment-receipt';
diff --git a/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php b/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php
new file mode 100644
index 0000000..0bca826
--- /dev/null
+++ b/tests/Feature/AdminPlatformOrderToolsReceiptNoneHintTest.php
@@ -0,0 +1,69 @@
+seed();
+
+ $this->post('/admin/login', [
+ 'email' => 'platform.admin@demo.local',
+ 'password' => 'Platform@123456',
+ ])->assertRedirect('/admin');
+ }
+
+ public function test_tools_page_shows_receipt_none_hint_when_receipt_status_none_and_syncable_only_present(): void
+ {
+ $this->loginAsPlatformAdmin();
+
+ $merchant = Merchant::query()->firstOrFail();
+ $plan = Plan::query()->create([
+ 'code' => 'receipt_none_tools_hint_plan',
+ 'name' => '无回执工具区提示测试套餐',
+ 'billing_cycle' => 'monthly',
+ 'price' => 10,
+ 'list_price' => 10,
+ 'status' => 'active',
+ 'sort' => 10,
+ 'published_at' => now(),
+ ]);
+
+ PlatformOrder::query()->create([
+ 'merchant_id' => $merchant->id,
+ 'plan_id' => $plan->id,
+ 'order_no' => 'PO_RCPT_NONE_TOOLS_HINT_0001',
+ 'order_type' => 'renewal',
+ 'status' => 'activated',
+ 'payment_status' => 'paid',
+ 'plan_name' => $plan->name,
+ 'billing_cycle' => $plan->billing_cycle,
+ 'period_months' => 1,
+ 'quantity' => 1,
+ 'payable_amount' => 10,
+ 'paid_amount' => 10,
+ 'placed_at' => now(),
+ 'paid_at' => now(),
+ 'activated_at' => now(),
+ // 无 payment_summary/payment_receipts,即“无回执”集合
+ 'meta' => [],
+ ]);
+
+ $res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
+ $res->assertOk();
+
+ $res->assertSee('回执缺失提示', false);
+ $res->assertSee('当前集合为「无回执」且已勾选「只看可同步」', false);
+ $res->assertSee('切到有回执集合', false);
+ $res->assertSee('取消只看可同步(先治理)', false);
+ }
+}