|
|
@@ -1261,6 +1261,9 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //后端开单,涉及花材满减,关键词 back_order_reach_discount_price
|
|
|
+ $post['reachDiscountPrice'] = 0;
|
|
|
+
|
|
|
if (floatval($currentPrice) != floatval($systemPrice)) {
|
|
|
$diff[] = [
|
|
|
'name' => $name,
|
|
|
@@ -1268,7 +1271,7 @@ class OrderController extends BaseController
|
|
|
'kdPrice' => $currentPrice,
|
|
|
];
|
|
|
} else {
|
|
|
- //后端开单,如果没有改价格,并且数量达到花材满减要求,则自动给减价格
|
|
|
+ //后端开单,如果没有改价格,并且数量达到花材满减要求,则自动给减价格,关键词 back_order_reach_discount_price
|
|
|
$bigNum = $currentProduct['bigNum'] ?? 0;
|
|
|
$reachNum = $systemInfo['reachNum'] ?? 0;
|
|
|
if ($reachNum > 0 && $bigNum >= $reachNum) {
|
|
|
@@ -1281,6 +1284,7 @@ class OrderController extends BaseController
|
|
|
if ($calcPrice > 0 && isset($post['modifyPrice']) && $post['modifyPrice'] > $calcPrice) {
|
|
|
//提交给后端的总金额也要减掉,否则会有问题
|
|
|
$post['modifyPrice'] = bcsub($post['modifyPrice'], $calcPrice, 2);
|
|
|
+ $post['reachDiscountPrice'] = bcadd($post['reachDiscountPrice'], $calcPrice, 2);
|
|
|
}
|
|
|
}
|
|
|
}
|