From 4d8dc866399d5e267061412d42b4ccc1310d3c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Fri, 13 Mar 2026 16:09:08 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=EF=BC=9A=E6=A0=87=E8=AE=B0=E6=94=AF=E4=BB=98=E5=9B=9E?= =?UTF-8?q?=E6=89=A7=E5=B7=AE=E9=A2=9D=E6=8F=90=E7=A4=BA=E6=8C=89=20amount?= =?UTF-8?q?s.tolerance=20=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/admin/platform_orders/show.blade.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/views/admin/platform_orders/show.blade.php b/resources/views/admin/platform_orders/show.blade.php index 1ffc6bf..a5bc474 100644 --- a/resources/views/admin/platform_orders/show.blade.php +++ b/resources/views/admin/platform_orders/show.blade.php @@ -137,7 +137,12 @@ $receiptCents = (int) round($receiptTotal * 100); $expectedCents = (int) round($expectedPaid * 100); $markPaidBlockedByRefund = $refundTotal > 0; - $markPaidBlockedByReceiptMismatch = $receiptCents > 0 && abs($receiptCents - $expectedCents) >= 1; + + $tol = (float) config('saasshop.amounts.tolerance', 0.01); + $tolCents = (int) round($tol * 100); + $tolCents = max(1, $tolCents); + + $markPaidBlockedByReceiptMismatch = $receiptCents > 0 && abs($receiptCents - $expectedCents) >= $tolCents; @endphp