平台订单详情:标记支付回执差额提示按 amounts.tolerance 判断

This commit is contained in:
萝卜
2026-03-13 16:09:08 +00:00
parent 87a78d379d
commit 4d8dc86639

View File

@@ -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
<div style="margin-top:16px; display:flex; gap:12px; flex-wrap:wrap; align-items:center;">