|
@@ -269,7 +269,7 @@ class Refund
|
|
if ($state) {
|
|
if ($state) {
|
|
$this->notice($state, $order, $info['cash']);
|
|
$this->notice($state, $order, $info['cash']);
|
|
# 检查这个订单下的商品是不是都退了
|
|
# 检查这个订单下的商品是不是都退了
|
|
- $total = Dever::db($this->goods_table)->total(array('order_id' => $order['id'], 'status' => 1));
|
|
|
|
|
|
+ $total = Dever::db($this->goods_table)->getTotal(array('order_id' => $order['id'], 'status' => '1,2'));
|
|
|
|
|
|
if ($total <= 0) {
|
|
if ($total <= 0) {
|
|
$update['operdate'] = time();
|
|
$update['operdate'] = time();
|
|
@@ -304,6 +304,10 @@ class Refund
|
|
|
|
|
|
if ($cash && $this->type == 'buy' && $order['source_id'] && $order['source_id'] > 0) {
|
|
if ($cash && $this->type == 'buy' && $order['source_id'] && $order['source_id'] > 0) {
|
|
$order['num'] = $info['num'];
|
|
$order['num'] = $info['num'];
|
|
|
|
+ if (isset($update['status'])) {
|
|
|
|
+ $order['status'] = $update['status'];
|
|
|
|
+ }
|
|
|
|
+
|
|
Dever::load('cash/lib/order')->up($order, 2, 2, $info);
|
|
Dever::load('cash/lib/order')->up($order, 2, 2, $info);
|
|
}
|
|
}
|
|
}
|
|
}
|