From 90efee3cc781ce3f6a1d8db8d8ec3f0064f4b470 Mon Sep 17 00:00:00 2001
From: Velz2020
Date: Thu, 24 Dec 2020 23:45:18 +0530
Subject: [PATCH] SMC USER CONFIG REPORT FEEDBACK
---
.../config/api_user_auth_config.php | 2 +-
api/application/config/constants.php | 1 +
.../User_Management_Controller.php | 4 ++-
.../models/User_Management_Model.php | 27 +++++++++++++++++++
.../views/smc_creditpd_reports/MWISE.php | 27 ++++++++++---------
5 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/api/application/config/api_user_auth_config.php b/api/application/config/api_user_auth_config.php
index 3320852d..0c06cfac 100644
--- a/api/application/config/api_user_auth_config.php
+++ b/api/application/config/api_user_auth_config.php
@@ -36,7 +36,7 @@ $config['api_user_auth_info'] = array(
//'updatePDMaster' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
'updatePDDocs' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
'updatePDApplicants' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
-'allocatePD' => array(2,3,4,5,10,21,22),
+'allocatePD' => array(2,3,4,5,10,21,22,25,26),
'schdulePD' => array(2,3,4,5,21,10,22,21),
'generatePDReport' => array(3,6,7,10),
'savePDPhotos' => array(3,4,5,6,7,10,21,22),
diff --git a/api/application/config/constants.php b/api/application/config/constants.php
index d0715f49..9bf49636 100644
--- a/api/application/config/constants.php
+++ b/api/application/config/constants.php
@@ -661,6 +661,7 @@ defined('SMC_CREDIT_PD_FORMS') OR define('SMC_CREDIT_PD_FORMS','m_smc_credit_pd_
defined('SMC_CREDITPD_IMGS') OR define('SMC_CREDITPD_IMGS','m_smc_creditpd_imgs');
defined('SALESVENDORLIST') OR define('SALESVENDORLIST','m_smcvendorlist');
defined('SALESEQUIPMENTLIST') OR define('SALESEQUIPMENTLIST','m_smc_equipmentlist');
+defined('USERCONFIG') OR define('USERCONFIG','m_user_config');
diff --git a/api/application/controllers/User_Management_Controller.php b/api/application/controllers/User_Management_Controller.php
index ae842168..c49d749f 100644
--- a/api/application/controllers/User_Management_Controller.php
+++ b/api/application/controllers/User_Management_Controller.php
@@ -305,7 +305,9 @@ class User_Management_Controller extends REST_Controller {
$userid = $this->post('userid');
$result = $this->User_Management_Model->getUserDetails($userid);
-
+ $user_config = $this->User_Management_Model->getUserConfigDetails($userid);
+ // print_r($result['data']);die();
+ $result['data'][0]['user_config'] = $user_config;
if($result['data_status'])
{
$data['dataStatus'] = true;
diff --git a/api/application/models/User_Management_Model.php b/api/application/models/User_Management_Model.php
index 3d025d8e..ba2354d6 100644
--- a/api/application/models/User_Management_Model.php
+++ b/api/application/models/User_Management_Model.php
@@ -97,6 +97,33 @@ class User_Management_Model extends SPARQ_Model {
}
+
+ function getUserConfigDetails($userid)
+ {
+
+ $return_data = array();
+ $this->db->select('*');
+ $this->db->where('USERCONFIG.fk_user_id',$userid);
+ $this->db->where('USERCONFIG.isactive',1);
+ $result = $this->db->get(USERCONFIG.' as USERCONFIG')->result_array();
+ // print_r($result);die();
+ if(count($result) !=0)
+ {
+ foreach ($result as $key => $value)
+ {
+ if($value['config_type'] == 1)//sales pd products
+ {
+ $return_data['salespd_products'] = (explode(",",$value['data']));
+ }
+ }
+
+ }
+
+ return $return_data;
+
+
+ }
+
public function pinDetails($records)
{
$this->db->select('*');
diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php
index 63bc6318..ab39a43c 100644
--- a/api/application/views/smc_creditpd_reports/MWISE.php
+++ b/api/application/views/smc_creditpd_reports/MWISE.php
@@ -212,7 +212,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| |
-
+
| Name of Person Met During Visit |
@@ -245,15 +245,19 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
$ownership_type = '';
- if( !strtolower($pd_section_data[8]['business_ownership_type']) == 'owned')
+ if( (strtolower($pd_section_data[8]['business_ownership_type'])) == 'owned')
{
$ownership_type = '( Owned )';
}
else
{
- $ownership_type = '( Rented ) - '.$pd_section_data[8]['business_monthly_rented_amt'];
+ $ownership_type = ' ( Rented ) - Rent paid '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($pd_section_data[8]['business_monthly_rented_amt']);
}
echo '
| Address Type / Ownership | '.$pd_section_data[2]['address_type']['address_type'].$ownership_type.' |
';
+ if(isset($pd_section_data[8]['is_business_address']) && strtolower($pd_section_data[8]['is_business_address']) == 'yes')
+ {
+ echo ' Business operating duration from this address | '.($pd_section_data[8]['business_years'].' Year(s)'.(isset($pd_section_data[8]['business_months']) && $pd_section_data[8]['business_months'] != '' ? ' & ' . $pd_section_data[8]['business_months'] .' Month(s)': '')).' |
';
+ }
echo ' | PD locality | '.$pd_section_data[2]['pd_locality']['locality_name'].' |
';
echo ' | Location Approach | '.$pd_section_data[2]['pd_location']['description'].' |
';
echo ' | Comment On Locality | '.$pd_section_data[2]['comment_locality']['rating'].' |
';
@@ -261,10 +265,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
?>
-
- Business operating duration from this address | |
-
-
@@ -273,7 +273,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| Satellite Image of PD Location |
|---|
GPS Coordinates of location where PD Visit was done :
-
+
Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown
';}
?>
@@ -510,7 +510,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
- | Other Family Members involved in the business |
+ Other Family Members involved in the Business |
@@ -541,7 +541,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
else
{
- echo '
| No other family member is involved in the business |
';
+ echo '| No Other Family Members are involved in the Business. |
';
}
if(isset($pd_section_data[16]['common_remarks']) && !empty($pd_section_data[16]['common_remarks']))
{
@@ -551,7 +551,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
+
@@ -721,7 +721,7 @@ $business_pd_visited_remark = (isset($pd_section_data[8]['business_pd_visited_re
-->
>
+
@@ -1096,7 +1096,8 @@ if(isset($pd_section_data[11]['common_remarks']) && !empty($pd_section_data[11][
else if(isset($pd_section_data[12]['client_not_available_reason'])){
echo '| Client Information Not available. Reason - '.$pd_section_data[12]['client_not_available_reason'] .' |
';}
if(isset($pd_section_data[12]['common_remarks']) && !empty($pd_section_data[12]['common_remarks'])){
- echo '| Remarks - '.$pd_section_data[12]['common_remarks'] .' |
';}
+ echo '| Remarks - '.$pd_section_data[12]['common_remarks'] .' |
';
+}
?>