getAdditionalRequirements api changes : ps
This commit is contained in:
parent
bebdce554d
commit
b9b528f480
@ -11367,13 +11367,25 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
|
||||
function getAdditionalRequirements_get(){
|
||||
$pdid = $this->get('pdid');
|
||||
$pd_additional_requirements = $this->PD_Model->getPDAdditionalRequirements($pdid);
|
||||
if(!empty($pd_additional_requirements))
|
||||
if(!isset($pdid) && empty($pdid)){
|
||||
$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['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
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
if($is_smc_vendor == true && $status != "" || $status != null){
|
||||
$this->db->WHERE('PDTRIGGER.vendor_status',strtoupper($status));
|
||||
}else{
|
||||
if($status != "" || $status != null)
|
||||
{
|
||||
$this->db->WHERE('PDTRIGGER.pd_status',strtoupper($status));
|
||||
if($status != "" || $status != null){
|
||||
if($is_smc_vendor == true){
|
||||
// echo "in IF";
|
||||
$this->db->WHERE('PDTRIGGER.vendor_status',strtoupper($status));
|
||||
}else{
|
||||
// echo "in ELSE";
|
||||
$this->db->WHERE('PDTRIGGER.pd_status',strtoupper($status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// die();
|
||||
if($datetype != "" || $datetype != null)
|
||||
{
|
||||
if($datetype == 1)
|
||||
@ -275,13 +276,15 @@ class PD_Model extends SPARQ_Model {
|
||||
}
|
||||
|
||||
|
||||
if($is_smc_vendor == true && $pd_status != "" || $pd_status != null){
|
||||
$this->db->WHERE('PDTRIGGER.vendor_status',$status);
|
||||
}else{
|
||||
if(!empty($pd_status))
|
||||
{
|
||||
$this->db->WHERE_IN('PDTRIGGER.pd_status',$pd_status);
|
||||
}
|
||||
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);
|
||||
}else{
|
||||
// echo "in ELSE";
|
||||
$this->db->WHERE_IN('PDTRIGGER.pd_status',$pd_status);
|
||||
}
|
||||
}
|
||||
if(($pd_from_date != "" || $pd_from_date != null) && ($pd_to_date != "" || $pd_to_date != null))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user