计算
This commit is contained in:
parent
2fc1d86204
commit
14107b2da6
@ -1502,13 +1502,6 @@ class Orders extends Base{
|
|||||||
}else{
|
}else{
|
||||||
$m->insertInfo(['userId'=>$userId,'ectNum'=>$order['realTotalMoney'],'ectType'=>1,'dataRemarks'=>'购户购物']);
|
$m->insertInfo(['userId'=>$userId,'ectNum'=>$order['realTotalMoney'],'ectType'=>1,'dataRemarks'=>'购户购物']);
|
||||||
}
|
}
|
||||||
$vm = new UserVouchers();
|
|
||||||
$get_from_coupon = $calBaseNum*((float)dataConf('couponPercentCanUsetGet')/100);
|
|
||||||
if ($get_from_coupon > $order['goodsMoney']) {
|
|
||||||
$get_from_coupon = $order['goodsMoney'];
|
|
||||||
}
|
|
||||||
$vm->insertVouchersNotice($userId, $orderId, $get_from_coupon, 0,
|
|
||||||
'交易订单【'.$order['orderNo'].'】购户从优惠款中获得',1);
|
|
||||||
}
|
}
|
||||||
elseif (3 == $order['goodsType']){//助购吧购物
|
elseif (3 == $order['goodsType']){//助购吧购物
|
||||||
|
|
||||||
@ -1580,22 +1573,6 @@ class Orders extends Base{
|
|||||||
"helpGetCount2"=>$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100),
|
"helpGetCount2"=>$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$get_from_coupon = $calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100)*((float)dataConf('couponPercentCanUsetGet')/100);
|
|
||||||
if ($get_from_coupon > $order['goodsMoney']) {
|
|
||||||
$get_from_coupon = $order['goodsMoney'];
|
|
||||||
}
|
|
||||||
$vm->insertVouchersNotice($userId, $orderId, $get_from_coupon, 0,
|
|
||||||
'交易订单【'.$order['orderNo'].'】购户从优惠款中获得',1);
|
|
||||||
}
|
|
||||||
elseif (1 == $order['goodsType']) {
|
|
||||||
$vm = new UserVouchers();
|
|
||||||
$get_from_coupon = $calBaseNum*((float)dataConf('couponPercentCanUsetGet')/100);
|
|
||||||
if ($get_from_coupon > $order['goodsMoney']) {
|
|
||||||
$get_from_coupon = $order['goodsMoney'];
|
|
||||||
}
|
|
||||||
$vm->insertVouchersNotice($userId, $orderId, $get_from_coupon, 0,
|
|
||||||
'交易订单【'.$order['orderNo'].'】购户从优惠款中获得',1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//新增订单日志
|
//新增订单日志
|
||||||
|
@ -49,9 +49,17 @@ class Settlements extends Base
|
|||||||
$buyerPreCoupousNum = $buyerPreCoupousNum > $buyerMaxCouponsNum ? $buyerMaxCouponsNum : $buyerPreCoupousNum;
|
$buyerPreCoupousNum = $buyerPreCoupousNum > $buyerMaxCouponsNum ? $buyerMaxCouponsNum : $buyerPreCoupousNum;
|
||||||
if($buyerPreProductNum >= 0.01 || $buyerPreCoupousNum>=0.01){
|
if($buyerPreProductNum >= 0.01 || $buyerPreCoupousNum>=0.01){
|
||||||
if(3 == $order->goodsType){
|
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{
|
}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.'】购户购物所得');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user