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.'】购户购物所得'); }