Compare commits
1 Commits
20250806-2
...
20250806-2
| Author | SHA1 | Date | |
|---|---|---|---|
| ea08aa94a6 |
@@ -72,7 +72,20 @@ class ConfirmationOrderService extends BaseOrderService
|
|||||||
foreach ($filtered as &$value) {
|
foreach ($filtered as &$value) {
|
||||||
$value['amount'] = match ($value['coupon_type']) {
|
$value['amount'] = match ($value['coupon_type']) {
|
||||||
CouponCode::COUPON_TYPE_INSTANT_REDUCTION => $value['amount'],
|
CouponCode::COUPON_TYPE_INSTANT_REDUCTION => $value['amount'],
|
||||||
CouponCode::COUPON_TYPE_DISCOUNT => bcmul(bcsub("1", (string)$value['ratio'],2),(string)$orderMaxPrice,2),
|
// CouponCode::COUPON_TYPE_DISCOUNT => bcmul(bcsub("100", (string)$value['ratio'],2),(string)$orderMaxPrice,2),
|
||||||
|
CouponCode::COUPON_TYPE_DISCOUNT => bcmul(
|
||||||
|
bcdiv(
|
||||||
|
bcsub(
|
||||||
|
"100",
|
||||||
|
(string)$value['ratio'],
|
||||||
|
2
|
||||||
|
),
|
||||||
|
"100",
|
||||||
|
2
|
||||||
|
),
|
||||||
|
bcadd((string)max(array_column($this->orderRes['good'],'price')),(string)$this->orderRes['sundry_price'],2),
|
||||||
|
2
|
||||||
|
),
|
||||||
default => 0
|
default => 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user