This commit is contained in:
2020-10-19 19:18:38 +08:00
parent 2fc1d86204
commit 14107b2da6
2 changed files with 10 additions and 25 deletions

View File

@ -49,9 +49,17 @@ class Settlements extends Base
$buyerPreCoupousNum = $buyerPreCoupousNum > $buyerMaxCouponsNum ? $buyerMaxCouponsNum : $buyerPreCoupousNum;
if($buyerPreProductNum >= 0.01 || $buyerPreCoupousNum>=0.01){
if(3 == $order->goodsType){
Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum*((float)dataConf('helpSaleCouponsCalBase')/100),'交易订单【'.$order->orderNo.'】购户购物所得');
$get_from_coupon = $discountMoney*((float)dataConf('helpSaleCouponsCalBase')/100)*((float)dataConf('couponPercentCanUsetGet')/100);
if ($get_from_coupon > $order['goodsMoney']) {
$get_from_coupon = $order['goodsMoney'];
}
Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$get_from_coupon,'交易订单【'.$order->orderNo.'】购户购物所得');
}else{
Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum,'交易订单【'.$order->orderNo.'】购户购物所得');
$get_from_coupon = $discountMoney*((float)dataConf('couponPercentCanUsetGet')/100);
if ($get_from_coupon > $order['goodsMoney']) {
$get_from_coupon = $order['goodsMoney'];
}
Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$get_from_coupon,'交易订单【'.$order->orderNo.'】购户购物所得');
}
}
}