diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 306721e2..34187890 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -555,7 +555,12 @@ class PD_Controller extends REST_Controller // // $pd_details['is_notify_enabled'] = isset($pd_details['is_notify_enabled']) ? (!is_null($pd_details['is_notify_enabled']) ? $pd_details['is_notify_enabled'] : 1) : 1; // $pd_details['is_notify_enabled'] = 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) : 1; + $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_id = $this->PD_Model->saveRecords($pd_details, PDTRIGGER);