getAdditionalRequirements api changes : ps
This commit is contained in:
parent
bebdce554d
commit
b9b528f480
@ -11367,12 +11367,24 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
|
|
||||||
function getAdditionalRequirements_get(){
|
function getAdditionalRequirements_get(){
|
||||||
$pdid = $this->get('pdid');
|
$pdid = $this->get('pdid');
|
||||||
$pd_additional_requirements = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
if(!isset($pdid) && empty($pdid)){
|
||||||
if(!empty($pd_additional_requirements))
|
$data['dataStatus'] = false;
|
||||||
|
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||||
|
$data['msg'] = 'PDID Not Found! Try again';
|
||||||
|
}
|
||||||
|
$result_data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||||
|
$result_data['docs_to_be_collected'] = $this->PD_Model->getDocsToBeCollected($pdid);
|
||||||
|
if(!empty($result_data))
|
||||||
{
|
{
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
$data['status'] = REST_Controller::HTTP_OK;
|
$data['status'] = REST_Controller::HTTP_OK;
|
||||||
$data['records'] = $pd_additional_requirements;
|
$data['records'] = $result_data;
|
||||||
|
}
|
||||||
|
else if(empty($result_data['pd_additional_requirements']) && empty($result_data['docs_to_be_collected']))
|
||||||
|
{
|
||||||
|
$data['dataStatus'] = false;
|
||||||
|
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||||
|
$data['msg'] = 'Data Not Found';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -120,15 +120,16 @@ class PD_Model extends SPARQ_Model {
|
|||||||
//$this->db->WHERE("if(vendor_status = 'TRIGGERED', if( pd_status in ('ALLOCATED'),1,0),0)=0");
|
//$this->db->WHERE("if(vendor_status = 'TRIGGERED', if( pd_status in ('ALLOCATED'),1,0),0)=0");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($is_smc_vendor == true && $status != "" || $status != null){
|
if($status != "" || $status != null){
|
||||||
|
if($is_smc_vendor == true){
|
||||||
|
// echo "in IF";
|
||||||
$this->db->WHERE('PDTRIGGER.vendor_status',strtoupper($status));
|
$this->db->WHERE('PDTRIGGER.vendor_status',strtoupper($status));
|
||||||
}else{
|
}else{
|
||||||
if($status != "" || $status != null)
|
// echo "in ELSE";
|
||||||
{
|
|
||||||
$this->db->WHERE('PDTRIGGER.pd_status',strtoupper($status));
|
$this->db->WHERE('PDTRIGGER.pd_status',strtoupper($status));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// die();
|
||||||
if($datetype != "" || $datetype != null)
|
if($datetype != "" || $datetype != null)
|
||||||
{
|
{
|
||||||
if($datetype == 1)
|
if($datetype == 1)
|
||||||
@ -275,11 +276,13 @@ class PD_Model extends SPARQ_Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($is_smc_vendor == true && $pd_status != "" || $pd_status != null){
|
if(!empty($pd_status)){
|
||||||
|
if($is_smc_vendor == true){
|
||||||
|
// if($is_smc_vendor == true && $pd_status != "" || $pd_status != null){
|
||||||
|
// echo "in IF";
|
||||||
$this->db->WHERE('PDTRIGGER.vendor_status',$status);
|
$this->db->WHERE('PDTRIGGER.vendor_status',$status);
|
||||||
}else{
|
}else{
|
||||||
if(!empty($pd_status))
|
// echo "in ELSE";
|
||||||
{
|
|
||||||
$this->db->WHERE_IN('PDTRIGGER.pd_status',$pd_status);
|
$this->db->WHERE_IN('PDTRIGGER.pd_status',$pd_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user