You've already forked qlg.tsgz.moe
计算
This commit is contained in:
@ -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.'】购户购物所得');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user