Commit dcb2c438 authored by liuyuzhen's avatar liuyuzhen

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

parents 9b5503a3 02170f3e
......@@ -232,8 +232,8 @@ class OrderGoodsModel extends \DAO\AbstractModel
public function getMustReduceAmount($orderGoodses, $discountAmount, $orderGoods)
{
$allNumbers = array_column($orderGoodses, 'goodsNum');
$allGoodsPrice = array_column($orderGoodses, 'goodsPrice');
$allNumbers = array_sum($orderGoodses, 'goodsNum');
$allGoodsPrice = array_sum($orderGoodses, 'goodsPrice');
$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