From 425f0037472f40b3a3856f31e5b099359f1ddc07 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 24 Sep 2020 21:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E5=BA=A65=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/common/model/Settlements.php | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hyhproject/common/model/Settlements.php b/hyhproject/common/model/Settlements.php index 3442abd..62a2529 100755 --- a/hyhproject/common/model/Settlements.php +++ b/hyhproject/common/model/Settlements.php @@ -24,7 +24,7 @@ class Settlements extends Base //$discountMoney += ($v['goodsPrice']*$v['goodsNum'] + $v['freight']) * ($v['discountRate']*0.01);//优惠款 $discountMoney += ($v['goodsPrice']*$v['goodsNum']) * ($v['discountRate']*0.01);//优惠款 } - $discountMoney = round($discountMoney,2); + $discountMoney = round($discountMoney,5); //加入快代付值 Model('SysSummary')->addToPayFast($orderId,$discountMoney,'订单【'.($order['orderNo']?:'--').'】优惠款加入'); //获取产品额 @@ -39,9 +39,9 @@ class Settlements extends Base // 6,获得预获产品券为被扣税费的100% buyerPreProductInProductTaxFeeScale // 购户获得预获产品券最高占产品额比例?% - $buyerPreProductNum = round(($totalMoney + $order->deliverMoney),2);//1 - $buyerMaxCouponsNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1 - $buyerPreCoupousNum = round($discountMoney * (dataConf('buyerPreCoupousInSaleScale')*0.01),2);//2 + $buyerPreProductNum = round(($totalMoney + $order->deliverMoney),5);//1 + $buyerMaxCouponsNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),5);//1 + $buyerPreCoupousNum = round($discountMoney * (dataConf('buyerPreCoupousInSaleScale')*0.01),5);//2 // $buyerPreProductNum += round($order->productHandlingFee * (dataConf('buyerPreProductInHandlingFeeScale')*0.01),2);//3 // $buyerPreProductNum += round($order->productTaxFee * (dataConf('buyerPreProductInTaxFeeScale')*0.01),2);//4 // $buyerPreProductNum += round($order->couponsHandlingFee * (dataConf('buyerPreProductInProductHandlingFeeScale')*0.01),2);//5 @@ -62,8 +62,8 @@ class Settlements extends Base // 2,商户获得预获优惠券占优惠款比例 100% sellerPreCoupousInSaleScale // 3,优惠款-产品-优惠券-旺旺券,大于0是商户需付公司的钱,小于0是公司需付给商户的钱,即旺旺券 // $discountMoney-$order->productNum-$order->couponsNum-$order->wangNum-$order->moneyNum - $sellerPreProductNum = round($discountMoney * (dataConf('sellerPreProductInProductScale')*0.01),2);//1 - $sellerPreCoupousNum = round($discountMoney * (dataConf('sellerPreCoupousInSaleScale')*0.01),2);//2 + $sellerPreProductNum = round($discountMoney * (dataConf('sellerPreProductInProductScale')*0.01),5);//1 + $sellerPreCoupousNum = round($discountMoney * (dataConf('sellerPreCoupousInSaleScale')*0.01),5);//2 $calBaseNum = Db::table("__ORDERS__ o")->join("__ORDER_GOODS__ g", "g.orderId=o.orderId", 'inner') ->where(['o.orderId'=>$orderId])->sum('g.goodsPrice*g.goodsNum*g.discountRate*0.01'); if($sellerPreProductNum >= 0.01 || $sellerPreCoupousNum>=0.01){ @@ -120,7 +120,7 @@ class Settlements extends Base //旺旺券结算 $payVouchersNum = ($order->productNum - $order->productHandlingFee - $order->productTaxFee) + ($order->couponsNum - $order->couponsHandlingFee - $order->couponsTaxFee) + $order->wangNum;////3个券的付款总额+$order->moneyNum; - $giveWangNum = round($payVouchersNum - $discountMoney,2); + $giveWangNum = round($payVouchersNum - $discountMoney,5); $m->setTable('orders'); if($giveWangNum > 0){ $m->updateInfo(['orderId'=>$orderId],['certificateStatus'=>1,'payable'=>$giveWangNum]); @@ -143,9 +143,9 @@ class Settlements extends Base $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney'); $agentProductMoney = 0; if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值 - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),2);//1 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1 }else{ - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),2);//2 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2 } if($agentProductMoney >= 0.01){ Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'交易订单【'.$order->orderNo.'】商超所得'); @@ -160,9 +160,9 @@ class Settlements extends Base $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney'); $agentProductMoney = 0; if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值 - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),2);//1 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1 }else{ - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),2);//2 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2 } if($agentProductMoney >= 0.01){ Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'交易订单【'.$order->orderNo.'】商厦所得'); @@ -176,9 +176,9 @@ class Settlements extends Base $yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($agentUserId,'realTotalMoney'); $agentProductMoney = 0; if($yesterdayBuyMoney >= dataConf('shopPreCoupousYdGTMoney')){//大于设定值 - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),2);//1 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousYesInProductScale')*0.01),5);//1 }else{ - $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),2);//2 + $agentProductMoney = round($totalMoney * (dataConf('shopPreCoupousNoInProductScale')*0.01),5);//2 } if($agentProductMoney >= 0.01){ Model('common/UserVouchers')->insertVouchersNotice($agentUserId,$orderId,0,$agentProductMoney,'交易订单【'.$order->orderNo.'】商都所得');