From aabf11403f008464b3949849d8585d12cc301894 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 13 Mar 2020 17:29:34 +0530 Subject: [PATCH] COMMON CONFIG API IMPLEMENTED --- api/application/config/routes.php | 1 + .../controllers/Common_Masters_Controller.php | 12 ++++++++++++ api/application/models/PD_Model.php | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/api/application/config/routes.php b/api/application/config/routes.php index 56b63fc5..f9c182f0 100644 --- a/api/application/config/routes.php +++ b/api/application/config/routes.php @@ -83,6 +83,7 @@ $route['getLender'] = 'Common_Masters_Controller/getLender'; $route['getProduct'] = 'Common_Masters_Controller/getProduct'; $route['getCustomerSegment'] = 'Common_Masters_Controller/getCustomerSegment'; $route['(checkAppVersion/:any)'] = 'Common_Masters_Controller/checkAppVersion'; +$route['getCommonConfig'] = 'Common_Masters_Controller/getCommonConfig'; diff --git a/api/application/controllers/Common_Masters_Controller.php b/api/application/controllers/Common_Masters_Controller.php index dc782001..b8bd9ec5 100644 --- a/api/application/controllers/Common_Masters_Controller.php +++ b/api/application/controllers/Common_Masters_Controller.php @@ -1189,4 +1189,16 @@ class Common_Masters_Controller extends REST_Controller { $this->response($data,REST_Controller::HTTP_OK); } } + + + public function getCommonConfig_post() + { + $config['default_pd_list_count']['count'] = '60'; + $config['default_pd_list_count']['factor'] = 'Days'; + + $data['dataStatus'] = true; + $data['status'] = REST_Controller::HTTP_OK; + $data['records'] = $config; + $this->response($data,REST_Controller::HTTP_OK); + } } \ No newline at end of file diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 3b87123b..c5197ba1 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -938,7 +938,7 @@ class PD_Model extends SPARQ_Model { if($result_array[0]['fk_product_id'] == "" || $result_array[0]['fk_product_id'] == null || $result_array[0]['fk_product_id'] == 0){ $mandatory_fields[] = 'fk_product_id'; } - if(($result_array[0]['lender_short_name'] != 'CLIX') && ($result_array[0]['lender_short_name'] != 'MWISE' && $result_array[0]['subproduct_abbr'] != "BL")) + if(($result_array[0]['lender_short_name'] != 'CLIX') && ($result_array[0]['lender_short_name'] != 'MWISE' && $result_array[0]['prod_catagory'] != "BL")) { if($result_array[0]['fk_subproduct_id'] == "" || $result_array[0]['fk_subproduct_id'] == null || $result_array[0]['fk_subproduct_id'] == 0){ $mandatory_fields[] = 'fk_subproduct_id'; }