|
@@ -251,21 +251,7 @@ Class Manage
|
|
|
$bili = round($val['price']*$dnum /$heji,2);#比例
|
|
|
// print_R($bili);die;
|
|
|
$price_money = $val['price']*$dnum*$v['discount_cash'];#支付
|
|
|
- // if ($v['discount_id']>0) {
|
|
|
- // $youhui = round($val['price']*$dnum-$price_money,2);
|
|
|
- // } else {
|
|
|
- // $youhui = 0;
|
|
|
- // }
|
|
|
|
|
|
-
|
|
|
- // $card_price = round(($v['card_code_cash']/$v['oprice']*($val['price']*$dnum *$bili)),2);
|
|
|
- // // print_R($card_price);die;
|
|
|
- // $wallet_price = round(($v['wallet_cash']/$heji*($val['price']*$dnum*$bili)),2);
|
|
|
-
|
|
|
- // // print_R($price_money);die;
|
|
|
- // $goodsfu = $val['price']*$dnum-$youhui-$card_price-$wallet_price;
|
|
|
- // $youhui = 0;
|
|
|
- // print_R($v1);die;
|
|
|
if ($v['card_code_cash'] && $v['card_code_cash']>0){
|
|
|
$card_price = round(($v['card_code_cash']/$v['oprice']*($val['price']*$dnum)),2);
|
|
|
} else {
|
|
@@ -389,6 +375,16 @@ Class Manage
|
|
|
$body[] = $d;
|
|
|
}
|
|
|
} else {
|
|
|
+ if ($ka > 0 || $money > 0) {
|
|
|
+ $st = Dever::db('shop/sell_order_goods')->find(Array('order_id'=>$v['id'],'status'=>3));
|
|
|
+ if ($v1['goods_id'] == $st['goods_id']) {
|
|
|
+ $ka = round($ka,2);
|
|
|
+ $money = round($money,2);
|
|
|
+ } else {
|
|
|
+ $ka = 0;
|
|
|
+ $money = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
if ($k1 == 0 ) {
|
|
|
$discount_cash = round($v['discount_cash'],2);
|
|
|
$card_code_cash = round($v['card_code_cash'],2);
|
|
@@ -398,8 +394,8 @@ Class Manage
|
|
|
$order_num = $v['num'];//订单总数量
|
|
|
$oprice = round($v['oprice'],2);#订单总金额
|
|
|
$coupon_cash = round($v['coupon_cash'],2);
|
|
|
- $ka = round($ka,2);
|
|
|
- $money = round($money,2);
|
|
|
+ // $ka = round($ka,2);
|
|
|
+ // $money = round($money,2);
|
|
|
} else {
|
|
|
$discount_cash = 0;
|
|
|
$card_code_cash = 0;
|
|
@@ -409,8 +405,8 @@ Class Manage
|
|
|
$order_num = 0;
|
|
|
$oprice = 0;
|
|
|
$coupon_cash = 0;
|
|
|
- $ka = 0;
|
|
|
- $money = 0;
|
|
|
+ // $ka = 0;
|
|
|
+ // $money = 0;
|
|
|
}
|
|
|
$dyouhui = round($v1['discount_cash'],2);
|
|
|
$dcard_price = $v['card_code_cash']/$v['oprice']*($v1['price']*$v1['num']);
|
|
@@ -421,6 +417,7 @@ Class Manage
|
|
|
if ($dgoodsfu<0){
|
|
|
$dgoodsfu = 0;
|
|
|
}
|
|
|
+ // print_R($ka);
|
|
|
$d = array
|
|
|
(
|
|
|
$shop_type,
|