diff --git a/resources/views/admin/platform_orders/show.blade.php b/resources/views/admin/platform_orders/show.blade.php index 6cfa865..d60c9a4 100644 --- a/resources/views/admin/platform_orders/show.blade.php +++ b/resources/views/admin/platform_orders/show.blade.php @@ -129,6 +129,15 @@ $canMarkPaid = ($order->payment_status !== 'paid') || ($order->status !== 'activated'); $syncError = data_get($order->meta, 'subscription_activation_error.message'); $syncErrorAt = data_get($order->meta, 'subscription_activation_error.at'); + + // 治理提示:标记支付并生效的安全阀(后端也会阻断) + $refundTotal = (float) $order->refundTotal(); + $receiptTotal = (float) $order->receiptTotal(); + $expectedPaid = (float) (((float) ($order->paid_amount ?? 0)) > 0 ? (float) $order->paid_amount : (float) ($order->payable_amount ?? 0)); + $receiptCents = (int) round($receiptTotal * 100); + $expectedCents = (int) round($expectedPaid * 100); + $markPaidBlockedByRefund = $refundTotal > 0; + $markPaidBlockedByReceiptMismatch = $receiptCents > 0 && abs($receiptCents - $expectedCents) >= 1; @endphp