IIB notification : ps

This commit is contained in:
VE10-Sanjeev 2022-11-18 15:01:22 +05:30
parent 0ca43d5245
commit 1580feb628

View File

@ -558,22 +558,26 @@ class PD_Controller extends REST_Controller
$lender_short_name = $this->PD_Model->selectCustomRecords(array('*'), array('entity_id' => $pd_details['fk_lender_id'], 'isactive' => 1), ENTITY);
$lender_short_name = $lender_short_name[0]['short_name'];
$pd_details['is_notify_enabled'] = isset($pd_details['is_notify_enabled'])
? (!is_null($pd_details['is_notify_enabled']) ? $pd_details['is_notify_enabled'] : 1 )
: ($lender_short_name == 'IIB' ? 0 : 1 );
// $pd_details['is_notify_enabled'] = isset($pd_details['is_notify_enabled'])
// ? (!is_null($pd_details['is_notify_enabled']) ? $pd_details['is_notify_enabled'] : 1 )
// : ($lender_short_name == 'IIB' ? 0 : 1 );
if($lender_short_name == 'IIB'){
// IIB means 0
$pd_details['is_notify_enabled'] = 0;
log_message('ERROR', "in if cond. lender short name".$lender_short_name);
}else{
if(isset($pd_details['is_notify_enabled']) && (!is_null($pd_details['is_notify_enabled']))){
log_message('ERROR', "else if cond. lender short name".$lender_short_name);
$pd_details['is_notify_enabled'] = $pd_details['is_notify_enabled'];
}
else{
// Default 1
$pd_details['is_notify_enabled'] = 1;
log_message('ERROR', "else else cond. lender short name".$lender_short_name);
}
}
log_message('ERROR', "Notification Check = ",$pd_details['is_notify_enabled']);
$pd_id = $this->PD_Model->saveRecords($pd_details, PDTRIGGER);