fix : user site

This commit is contained in:
2025-03-31 16:22:44 +08:00
parent bfa35c5308
commit f7a529e315
3 changed files with 11 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ class ConfirmationOrderService extends BaseOrderService
foreach ($filtered as &$value) {
$value['amount'] = match ($value['coupon_type']) {
CouponCode::COUPON_TYPE_INSTANT_REDUCTION => $value['amount'],
CouponCode::COUPON_TYPE_DISCOUNT => bcmul(bcsub("1", $value['ratio'],2),$orderMaxPrice,2),
CouponCode::COUPON_TYPE_DISCOUNT => bcmul(bcsub("1", (string)$value['ratio'],2),(string)$orderMaxPrice,2),
default => 0
};