修复未对产品券上限的问题

This commit is contained in:
Your Name 2020-10-29 15:36:44 +08:00
parent 7477dda308
commit f40be77788

View File

@ -48,6 +48,7 @@ class Settlements extends Base
// $buyerPreProductNum += round($order->couponsHandlingFee * (dataConf('buyerPreProductInProductHandlingFeeScale')*0.01),2);//5
// $buyerPreProductNum += round($order->couponsTaxFee * (dataConf('buyerPreProductInProductTaxFeeScale')*0.01),2);//6
$buyerPreCoupousNum = $buyerPreCoupousNum > $buyerMaxCouponsNum ? $buyerMaxCouponsNum : $buyerPreCoupousNum;
$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.'】购户购物所得');