CM91 - RMA update
This commit is contained in:
@@ -34,7 +34,7 @@ if(isset($get_content) && $get_content!=''){
|
||||
$ye = ((isset($criterias['year']) && $criterias['year'] !='' )? $criterias['year'] : $curYear);
|
||||
$mo = ((isset($criterias['month']) && $criterias['month'] !='')? $criterias['month'] : $curMonth);
|
||||
$qu = ((isset($criterias['month']) ? (int)ceil($mo / 3): $curQuarter));
|
||||
$da = $ye.'-'.$mo.'-01';
|
||||
$da = $ye.'-'.$mo.'-'.date("d");
|
||||
|
||||
//CALL TO API TO GET ALL ACTIVE CONTRACTS
|
||||
$api_url = '/v2/contracts/'.$GET_VALUES;
|
||||
|
||||
@@ -60,7 +60,7 @@ if(isset($get_content) && $get_content!=''){
|
||||
$v = explode("=", $y);
|
||||
//INCLUDE VARIABLES IN ARRAY
|
||||
$criterias[$v[0]] = $v[1];
|
||||
if ($v[0] == 'page' || $v[0] =='p' || $v[0] =='products' || $v[0] =='totals' || $v[0] =='history' || $v[0] =='success_msg' || $v[0] =='download' || $v[0] =='sort'){
|
||||
if ($v[0] == 'page' || $v[0] =='p' || $v[0] =='products' || $v[0] =='list' || $v[0] =='totals' || $v[0] =='history' || $v[0] =='success_msg' || $v[0] =='download' || $v[0] =='sort'){
|
||||
//do nothing
|
||||
}
|
||||
elseif ($v[0] == 'equipmentid') {
|
||||
@@ -179,6 +179,10 @@ elseif (isset($criterias['totals']) && $criterias['totals'] =='' && !isset($crit
|
||||
//Request for total rows
|
||||
$sql = 'SELECT count(*) as count from equipment e LEFT JOIN products p ON e.productrowid = p.rowID '.$whereclause.'';
|
||||
}
|
||||
elseif (isset($criterias['list']) && $criterias['list'] =='') {
|
||||
//SQL for Paging
|
||||
$sql = 'SELECT e.rowID, e.serialnumber FROM equipment e '.$whereclause.'';
|
||||
}
|
||||
elseif (isset($criterias['products']) && $criterias['products'] ==''){
|
||||
//Request for all products in equipment view
|
||||
$sql = 'SELECT distinct(p.productcode), p.productname from equipment e LEFT JOIN products p ON e.productrowid = p.rowID '.$whereclause.' ORDER BY p.productcode';
|
||||
@@ -315,7 +319,7 @@ if(isset($criterias['totals']) && $criterias['totals']==''){
|
||||
$messages = $stmt->fetch();
|
||||
$messages = $messages[0];
|
||||
}
|
||||
elseif ((isset($criterias['history']) && $criterias['history'] !='') || (isset($criterias['products']) && $criterias['products'] =='') || (isset($criterias['download']) && $criterias['download'] =='')){
|
||||
elseif ((isset($criterias['history']) && $criterias['history'] !='') || (isset($criterias['list']) && $criterias['list']=='') || (isset($criterias['products']) && $criterias['products'] =='') || (isset($criterias['download']) && $criterias['download'] =='')){
|
||||
//Excute Query
|
||||
$stmt->execute();
|
||||
//Get results
|
||||
|
||||
@@ -69,6 +69,10 @@ if(isset($get_content) && $get_content!=''){
|
||||
$filter_key_2 = '"ServiceReport"';
|
||||
$clause .= ' AND h.type = '.$filter_key_2.' AND h.description like '.$filter_key_1;
|
||||
}
|
||||
elseif ($v[0] == 'created') {
|
||||
//build up search
|
||||
$clause .= ' AND h.created > :'.$v[0];
|
||||
}
|
||||
else {//create clause
|
||||
$clause .= ' AND '.$v[0].' = :'.$v[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user