|
@@ -431,14 +431,18 @@ Class Manage
|
|
|
$data = Dever::db('active/order')->find($order_id);
|
|
|
$ids = $this->common($data,3,'',$code_id);
|
|
|
if ($ids) {
|
|
|
+ $admin = Dever::load('manage/auth.info');
|
|
|
$w['where_id'] = $code_id;
|
|
|
$w['status'] = 3;
|
|
|
+ $w['offdate'] = time();
|
|
|
+ $w['audit_admin'] = $admin['id'];
|
|
|
Dever::db('active/code')->update($w);
|
|
|
}
|
|
|
return 'reload';
|
|
|
}
|
|
|
|
|
|
public function common($data,$type,$num=false,$refund_id=false){
|
|
|
+ Dever::config('base')->hook = true;
|
|
|
$active = Dever::db('active/info')->find($data['active_id']);
|
|
|
$info = Dever::db('active/info_refund')->state(array('order_id'=>$data['id']));
|
|
|
if (time() > $active['act_start']) {
|
|
@@ -497,10 +501,10 @@ Class Manage
|
|
|
}
|
|
|
$where['refund_num'] = $refund_num + $data['refund_num'];
|
|
|
|
|
|
- if ($type == 1 || ($type == 2 && $price = $data['price'])) {
|
|
|
+ if ($type == 1 || ($price == $data['price'])) {
|
|
|
Dever::db('active/order')->update($where);
|
|
|
- } elseif (($type == 2 && $price != $data['price']) || $type == 3) {
|
|
|
- $where['status'] = 5;
|
|
|
+ } else {
|
|
|
+ $where['status'] = 2;
|
|
|
$ids = Dever::db('active/order')->update($where);
|
|
|
}
|
|
|
if ($type == 2) {
|