This commit is contained in:
2020-09-21 08:15:51 +08:00
parent 539afccbc7
commit d2593d1c87
8 changed files with 20 additions and 22 deletions

View File

@ -38,12 +38,15 @@ class Settlements extends Base
// 5获得预获产品券为被扣手续费的100% buyerPreProductInProductHandlingFeeScale
// 6获得预获产品券为被扣税费的100% buyerPreProductInProductTaxFeeScale
$buyerPreProductNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1
// 购户获得预获产品券最高占产品额比例?%
$buyerPreProductNum = round(($totalMoney + $order->deliverMoney),2);//1
$buyerMaxCouponsNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1
$buyerPreCoupousNum = round($discountMoney * (dataConf('buyerPreCoupousInSaleScale')*0.01),2);//2
// $buyerPreProductNum += round($order->productHandlingFee * (dataConf('buyerPreProductInHandlingFeeScale')*0.01),2);//3
// $buyerPreProductNum += round($order->productTaxFee * (dataConf('buyerPreProductInTaxFeeScale')*0.01),2);//4
// $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;
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.'】购户购物所得');