Fixes : ps

This commit is contained in:
VE10-Sanjeev 2023-07-13 12:11:00 +05:30
parent 8a5376c9e9
commit 2d06e7e438

View File

@ -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"]) ;}
}