Subversion Repositories SmartDukaan

Rev

Rev 17374 | Rev 19466 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17374 Rev 19465
Line 217... Line 217...
217
		$dt   = new DateTime($dateval);
217
		$dt   = new DateTime($dateval);
218
		$url = $this->apihost."getSaleDetail/".$dt->getTimestamp();
218
		$url = $this->apihost."getSaleDetail/".$dt->getTimestamp();
219
		$result = $this->make_request($url,null);
219
		$result = $this->make_request($url,null);
220
		return json_encode($result);
220
		return json_encode($result);
221
	}
221
	}
-
 
222
	
-
 
223
	public function admin_pendingapproval($type = null,$id = null,$user_id = null,$amount = null){
-
 
224
		$page = $this->request->query('page');
-
 
225
		if(!isset($page)){
-
 
226
			$page = 1;
-
 
227
		}
-
 
228
		$limit = 20;
-
 
229
		$offset = ($page - 1)*$limit;
-
 
230
		$sendata = array();
-
 
231
		if($type != null){
-
 
232
			$senddata['user_id'] = $user_id;
-
 
233
			$senddata['_id'] = $id;
-
 
234
			$senddata['amount'] = $amount;
-
 
235
// 			$senddata = '{"user_id" : '.$user_id.' , "_id" : '.$id.'}';
-
 
236
			$sendurl = $this->apihost."updateRefundStatus?status=".$type;
-
 
237
			$this->make_request($sendurl, json_encode($senddata));
-
 
238
		}
-
 
239
		$url  = $this->apihost."refundToWallet?offset=".$offset."&limit=".$limit."&status=Pending";
-
 
240
		$pending = $this->make_request($url, null);;
-
 
241
		$this->set(compact('pending','page'));
-
 
242
	}
222
}
243
}
223
244