From 896d91a0e39dd1b20ec761cbcc3f95a14714d482 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 2 Dec 2020 16:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=95=B0=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/common/model/Settlements.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hyhproject/common/model/Settlements.php b/hyhproject/common/model/Settlements.php index 662f4ed..2092293 100755 --- a/hyhproject/common/model/Settlements.php +++ b/hyhproject/common/model/Settlements.php @@ -41,7 +41,7 @@ class Settlements extends Base // 购户获得预获产品券最高占产品额比例?% // $buyerPreProductNum = round(($totalMoney + $order->deliverMoney),5);//1 $buyerPreProductNum = round(($discountMoney * (dataConf('couponPercentCanUsetGet')*0.01)),5);//1 - $buyerMaxCouponsNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),5);//1 + $buyerMaxCouponsNum = round(($totalMoney)* (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 @@ -51,7 +51,8 @@ class Settlements extends Base $buyerPreProductNum = $buyerPreProductNum > $totalMoney ? $totalMoney : $buyerPreProductNum; if($buyerPreProductNum > 0 || $buyerPreCoupousNum > 0){ if(3 == $order->goodsType){ - Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum*((float)dataConf('helpSaleCouponsCalBase')/100),'交易订单【'.$order->orderNo.'】购户购物所得'); + // helpSaleCouponsCalBase == 基数 + Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum*((float)dataConf('helpSaleCouponsCalBase')/100),$buyerPreCoupousNum*((float)dataConf('helpSaleCouponsCalBase')/100),'交易订单【'.$order->orderNo.'】购户购物所得'); }else{ Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum,'交易订单【'.$order->orderNo.'】购户购物所得'); }