Commit 6349cb89 authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz

parents defdae9f 2482c918
......@@ -232,8 +232,10 @@ class OrderGoodsModel extends \DAO\AbstractModel
public function getMustReduceAmount($orderGoodses, $discountAmount, $orderGoods)
{
$allNumbers = array_sum($orderGoodses, 'goodsNum');
$allGoodsPrice = array_sum($orderGoodses, 'goodsPrice');
$allNumbers = array_column($orderGoodses, 'goodsNum');
$allNumbers=array_sum($allNumbers);
$allGoodsPrice = array_column($orderGoodses, 'goodsPrice');
$allGoodsPrice=array_sum($allGoodsPrice);
$allMoney = $allNumbers * $allGoodsPrice;
$thisOrderGoodsAmount = $orderGoods['goodsNum'] * $orderGoods['goodsPrice'];
$reduceAmount=($discountAmount*$thisOrderGoodsAmount)/($allMoney);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment