平台订单详情:标记支付回执差额提示按 amounts.tolerance 判断
This commit is contained in:
@@ -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;">
|
||||
|
||||
Reference in New Issue
Block a user