From 66302add17836c528c2b00a685e48830f0eadeae Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Wed, 28 Sep 2022 19:15:51 +0530 Subject: [PATCH] Entity Notification fixes : ps --- api/application/controllers/PD_Controller.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);