diff --git a/api/application/controllers/SMC_Credit_PD_Controller.php b/api/application/controllers/SMC_Credit_PD_Controller.php index f6148f87..f86c0876 100644 --- a/api/application/controllers/SMC_Credit_PD_Controller.php +++ b/api/application/controllers/SMC_Credit_PD_Controller.php @@ -309,7 +309,7 @@ class SMC_Credit_PD_Controller extends REST_Controller { log_message('ERROR', '#### upload SMC-Credit PDData To CETApp Function Called'); $columns = array('PDTRIGGER.pd_id'); $table = PDTRIGGER . ' as PDTRIGGER'; - $where_arr = array('PDTRIGGER.is_the_data_transfer_cet'=>0,'PDTRIGGER.pd_status' => COMPLETED,'PDTRIGGER.pd_id'=>$smc_credit_pd); + $where_arr = array('PDTRIGGER.is_the_data_transfer_cet'=>1,'PDTRIGGER.pd_status' => COMPLETED,'PDTRIGGER.pd_id'=>$smc_credit_pd); $details = $this->SMC_Credit_PD_Model->selectCustomRecords($columns, $where_arr, $table); if(!empty($details)){ $response = $this->dataSynchronization($smc_credit_pd,0); @@ -578,9 +578,10 @@ class SMC_Credit_PD_Controller extends REST_Controller { } # stock Duplication key - Fixes + if (!empty($CETAPP_creditPD_data['Stock details'])) { - if(isset($CETAPP_creditPD_data["Stock details"]["estimated_uom"]) && $CETAPP_creditPD_data["Business Assets"]["estimated_uom"] !=''){ - $CETAPP_creditPD_data["Stock details"]["estimated_uom_master"] = $CETAPP_creditPD_data["Business Assets"]["estimated_uom"]; + if(isset($CETAPP_creditPD_data["Stock details"]["estimated_uom"]) && $CETAPP_creditPD_data["Stock details"]["estimated_uom"] != ''){ + $CETAPP_creditPD_data["Stock details"]["estimated_uom_master"] = $CETAPP_creditPD_data["Stock details"]["estimated_uom"]; unset($CETAPP_creditPD_data["Stock details"]["estimated_uom"]) ;} }