@@ -34,6 +34,10 @@ class Manage
$status = 2;
}
+ if (!$shop_id || !$order_id) {
+ return;
+ }
+
return Dever::load('shop/lib/refund')->set('sell')->apply(2, $shop_id, $order_id, $order_goods_id, $status, $num, $desc, '', 2, $buy_status);
@@ -150,13 +150,22 @@ class Refund
$num = $info['num'];
Dever::db($this->goods_table)->update(array('where_id' => $info['id'], 'status' => 2));
- $info['total_price'] = $info['price'] * $num;
if (isset($info['coupon_cash']) && $info['coupon_cash']) {
$cash = $info['total_price'] - $info['coupon_cash'];
} else {
$cash = $info['total_price'];
+ $kou = $data['card_code_cash'] + $data['wallet_cash'];
+ $info['total_price'] = $info['price'] * $num;
+ if ($kou > 0) {
+ if ($info['total_price'] >= $kou) {
+ $cash = $info['total_price'] - $kou;
+ } else {
+ $cash = 0;
if (isset($info['p_price'])) {
$p_cash = $info['p_price'] * $num;