Compare commits
3 Commits
20250806-2
...
20250806-2
| Author | SHA1 | Date | |
|---|---|---|---|
| ea08aa94a6 | |||
| fdb5d99214 | |||
| b202835205 |
@@ -72,7 +72,20 @@ 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", (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
|
||||
};
|
||||
|
||||
|
||||
@@ -156,11 +156,11 @@ class OrderInfoService extends BaseService
|
||||
|
||||
for ($i = 1; $i <= (count($newOrderSkuList) ?? 0); $i++) {
|
||||
|
||||
$pickupCodeOneCopies = $pickupCodeArrList[$order['id']][$i]['pickup_code'] ?? null;
|
||||
$pickupCodeOneCopies = $pickupCodeList[$i] ?? null;
|
||||
$boxNum = 0;
|
||||
if (!empty($pickupCodeOneCopies)) {
|
||||
$pickupCodeOneCopiesArr = explode('-', $pickupCodeOneCopies);
|
||||
$boxNum = ceil(end($pickupCodeOneCopiesArr) ?? 0 / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
|
||||
$boxNum = ceil((int)(end($pickupCodeOneCopiesArr) ?? 0) / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
|
||||
}
|
||||
|
||||
$oneCopiesInfo = [
|
||||
|
||||
@@ -184,7 +184,7 @@ class OrderListService extends BaseService
|
||||
$boxNum = 0;
|
||||
if (!empty($pickupCodeOneCopies)) {
|
||||
$pickupCodeOneCopiesArr = explode('-', $pickupCodeOneCopies);
|
||||
$boxNum = ceil(end($pickupCodeOneCopiesArr) ?? 0 / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
|
||||
$boxNum = ceil((int)(end($pickupCodeOneCopiesArr) ?? 0) / (int)$this->configCache->getConfigValueByKey(ConfigCode::MAXIMUM_VALUE_IN_FULL_BOX));
|
||||
}
|
||||
$oneCopiesInfo = [
|
||||
'total_price' => '0.00',
|
||||
|
||||
Reference in New Issue
Block a user