LENDER HIERARCHY API :IST AND OTHER ISSUES

This commit is contained in:
Velz2020 2019-08-23 20:34:58 +05:30
parent 5b36c708c7
commit 9322d2f777
5 changed files with 1220 additions and 1099 deletions

View File

@ -840,7 +840,10 @@ class PD_Controller extends REST_Controller {
// $client = new \GuzzleHttp\Client(); // $client = new \GuzzleHttp\Client();
// $response = $client->post($url); // $response = $client->post($url);
if($exist_pd_details[0]['is_otp_enabled'] == 1)
{
SMS_GUPSHUP::sendSMS($msg,$no,array('pd_id' => $pd_details['pd_id'],'status' => 'STARTED','msg' => 'Started OTP msg from PD controlller')); SMS_GUPSHUP::sendSMS($msg,$no,array('pd_id' => $pd_details['pd_id'],'status' => 'STARTED','msg' => 'Started OTP msg from PD controlller'));
}
} }
@ -1845,18 +1848,24 @@ public function assignPDTempalate($data)
public function listLessPDDetails_get() public function listLessPDDetails_get()
{ {
$page = 0;$limit = 1000;$sort = 'DESC';$pdofficerid = "";$datetype = "";$fdate ="";$tdate =""; $page = 0;$limit = 1000;$sort = 'DESC';$pdofficerid = "";$datetype = "";$fdate ="";$tdate ="";
$lenderid = "";$status=""; $lenderid = "";$status="";$lender_details = array();
if($this->get('page')) { $page = $this->get('page'); } if($this->get('page')) { $page = $this->get('page'); }
if($this->get('limit')){ $limit = $this->get('limit'); } if($this->get('limit')){ $limit = $this->get('limit'); }
if($this->get('sort')) { $sort = $this->get('sort'); } if($this->get('sort')) { $sort = $this->get('sort'); }
if($this->get('pdofficerid')) { $pdofficerid = $this->get('pdofficerid'); } if($this->get('pdofficerid')) { $pdofficerid = $this->get('pdofficerid'); }
if($this->get('lenderid')) { $lenderid = $this->get('lenderid'); } if($this->get('lenderid'))
{
$lenderid = $this->get('lenderid');
$lender_details = $this->getLenderHierarchyForPDListing($lenderid);
}
if($this->get('datetype')) { $datetype = $this->get('datetype'); } if($this->get('datetype')) { $datetype = $this->get('datetype'); }
if($this->get('fdate')) { $fdate = $this->get('fdate'); } if($this->get('fdate')) { $fdate = $this->get('fdate'); }
if($this->get('tdate')) { $tdate = $this->get('tdate'); } if($this->get('tdate')) { $tdate = $this->get('tdate'); }
if($this->get('status')) { $status = $this->get('status'); } if($this->get('status')) { $status = $this->get('status'); }
$result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status); $result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details);
if($result_data['data_status'] == true) if($result_data['data_status'] == true)
{ {
@ -1874,6 +1883,45 @@ public function assignPDTempalate($data)
} }
// PD listing based on lender role hierarchy
function getLenderHierarchyForPDListing($lender_user_id)
{
//get role of lender_user_id`
$user_role_details = $this->PD_Model->getLenderHierarchyForPDListing($lender_user_id);
//print_r($user_role_details);
if(count($user_role_details))
{
$role_id = $user_role_details[0]['user_role'];
switch($role_id)
{
case 11:// National Sales Head
case 12:// National Credit Head
//Get all PD's which were triggered in this entity id
return array('entity' => $user_role_details[0]['fk_entity_id']);
case 13:// Zonal Sales Head
case 14:// Zonal Credit Head
//Get all cities id's from m_entity_region_mapping table using region_id / zone id
$citiesInCurrentZone = $this->PD_Model->selectCustomRecords(array('fk_city_id'),ENTITYREGION,array('fk_region_id' => $user_role_details[0]['fk_region_id']));
//Get all PD's which were triggered in this entity id and city id's in current zone
return array('entity' => $user_role_details[0]['fk_entity_id'],'zone' => $citiesInCurrentZone);
case 15://Area Sales Head
case 16://Area Credit Head
//Get all PD's which were triggered in this entity id and city id's in current zone
return array('entity' => $user_role_details[0]['fk_entity_id'],'state' => $user_role_details[0]['fk_state']);
case 17://City Sales Head
case 18://City Credit Head
//Get all PD's which were triggered in this entity id and current city
return array('entity' => $user_role_details[0]['fk_entity_id'],'city' => $user_role_details[0]['fk_city']);
case 17://Branch Sales
case 18://Branch Credit
//Get all PD's which were triggered in this entity id and current branch
return array('entity' => $user_role_details[0]['fk_entity_id'],'branch' => $user_role_details[0]['entity_lender_branch_id']);
default:
return array();
}
}
}
public function filterPDList_post() public function filterPDList_post()
{ {
@ -5594,8 +5642,8 @@ public function getPDFormDetailsJSON_post()
//echo "*******************************************"; //echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//$t = $this->load->view('temp_html.html',null,true); //$t = $this->load->view('temp_html.html',null,true);
echo $t; // echo $t;
die(); // die();
$total_replaces = substr_count($t,'<span class="tooltip">'); $total_replaces = substr_count($t,'<span class="tooltip">');
//echo $total_replaces; //echo $total_replaces;
@ -8301,12 +8349,17 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{ {
$pdid = $this->post('pd_id'); $pdid = $this->post('pd_id');
//CHeck whether this PD is scoreable or not
$is_score_card_enabled = $this->PD_Model->getScoreCardEnabledStatusByPDID($pdid);
$t = '';
if(count($is_score_card_enabled) && $is_score_card_enabled[0]['is_score_card_enabled'] == 1)
{
$score = $this->calculateScore($pdid); $score = $this->calculateScore($pdid);
//print_r($score);die(); //print_r($score);die();
$score_questions_display = $this->PD_Model->getScoreableQuestionToDispaly($pdid); $score_questions_display = $this->PD_Model->getScoreableQuestionToDispaly($pdid);
$t = $this->load->view('report_templates/scorecard',array('pd_score' => $score,'score_questions_display' => $score_questions_display),true); $t = $this->load->view('report_templates/scorecard',array('pd_score' => $score,'score_questions_display' => $score_questions_display),true);
//echo $t;die(); //echo $t;die();
}
$data['dataStatus'] = true; $data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK; $data['status'] = REST_Controller::HTTP_OK;
$data['records'] = $t; $data['records'] = $t;

View File

@ -11,7 +11,7 @@ class PD_Model extends SPARQ_Model {
} }
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status)// $page represents mysql offset public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details)// $page represents mysql offset
{ {
//echo $status;die(); //echo $status;die();
$this->db->SELECT('PDTRIGGER.pd_id,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note'); $this->db->SELECT('PDTRIGGER.pd_id,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note');
@ -46,7 +46,34 @@ class PD_Model extends SPARQ_Model {
if($lenderid != "" || $lenderid != null) if($lenderid != "" || $lenderid != null)
{ {
$this->db->WHERE('PDTRIGGER.fk_createdby',$lenderid); //$this->db->WHERE('PDTRIGGER.fk_createdby',$lenderid);
//print_r($lender_details);die();
if(isset($lender_details['entity']))
{
$this->db->WHERE('PDTRIGGER.fk_lender_id',$lender_details['entity']);
}
if(isset($lender_details['zone']))
{
$this->db->WHERE_IN('PDTRIGGER.fk_city',$lender_details['zone']);
}
if(isset($lender_details['state']))
{
$this->db->WHERE('PDTRIGGER.fk_state',$lender_details['state']);
}
if(isset($lender_details['city']))
{
$this->db->WHERE('PDTRIGGER.fk_city',$lender_details['city']);
}
if(isset($lender_details['branch']))
{
$this->db->WHERE('PDTRIGGER.fk_city',$lender_details['pd_branch_id']);
}
} }
if($status != "" || $status != null) if($status != "" || $status != null)
@ -828,7 +855,7 @@ class PD_Model extends SPARQ_Model {
if($result_array[0]['fk_state'] == "" || $result_array[0]['fk_state'] == null){ $mandatory_fields[] = 'fk_state'; } if($result_array[0]['fk_state'] == "" || $result_array[0]['fk_state'] == null){ $mandatory_fields[] = 'fk_state'; }
if($result_array[0]['pincode'] == "" || $result_array[0]['pincode'] == null){ $mandatory_fields[] = 'pincode'; } if($result_array[0]['pincode'] == "" || $result_array[0]['pincode'] == null){ $mandatory_fields[] = 'pincode'; }
if($result_array[0]['short_name'] != 'IMGC') if($result_array[0]['lender_short_name'] != 'IMGC')
{ {
if($result_array[0]['pd_contact_person'] == "" || $result_array[0]['pd_contact_person'] == null){ $mandatory_fields[] = 'pd_contact_person'; } if($result_array[0]['pd_contact_person'] == "" || $result_array[0]['pd_contact_person'] == null){ $mandatory_fields[] = 'pd_contact_person'; }
@ -1816,6 +1843,16 @@ class PD_Model extends SPARQ_Model {
return $return_data; return $return_data;
} }
function getScoreCardEnabledStatusByPDID($pdid)
{
$this->db->SELECT('ENTITY.is_score_card_enabled');
$this->db->FROM(ENTITY.' as ENTITY');
$this->db->JOIN(PDTRIGGER.' as PDTRIGGER','ENTITY.entity_id = PDTRIGGER.fk_lender_id');
$this->db->WHERE('PDTRIGGER.pd_id',$pdid);
$res = $this->db->GET()->result_array();
return $res;
}
public function getScoreableQuestionToDispaly() public function getScoreableQuestionToDispaly()
{ {
@ -1879,4 +1916,20 @@ class PD_Model extends SPARQ_Model {
return $result; return $result;
} }
function getLenderHierarchyForPDListing($lender_user_id)
{
$this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as user_name,USERPROFILE.fk_entity_id,USERPROFILE.fk_city,USERPROFILE.fk_state,USERPROFILEROLES.user_role,USERPROFILE.fk_entity_type_id,ROLES.role_name,if( POSITION("credit" IN ROLES.role_name),"CREDIT","SALES") as role_type,ENTITYREGION.fk_region_id,ENTITYLENDERBRANCH.entity_lender_branch_id');
$this->db->from(USERPROFILE.' as USERPROFILE');
$this->db->join(USERPROFILEROLES. ' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive = 1');
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role');
$this->db->join(ENTITYREGION.' as ENTITYREGION','USERPROFILE.fk_city = ENTITYREGION.fk_city_id');
$this->db->join(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH',"USERPROFILE.fk_entity_id = ENTITYLENDERBRANCH.fk_entity_id and ENTITYLENDERBRANCH.isactive = 1 and ENTITYLENDERBRANCH.fk_city_id = USERPROFILE.fk_city");
$this->db->where('USERPROFILE.isactive',1);
$this->db->where('USERPROFILE.userid',$lender_user_id);
$result = $this->db->get()->result_array();
//print_r($this->db->last_query());
return $result;
}
} }

View File

@ -1 +1 @@
var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 81.7;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application//chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);}); var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 56.7;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application//chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

View File

@ -727,7 +727,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$general_form['general_remark'].'</p>'; echo '<p>'.$general_form['general_remark'].'</p>';
} }
?> ?>
<div id="page_break"> </div>
<!-- ########################### End of Cover Page Section ####################################--> <!-- ########################### End of Cover Page Section ####################################-->
@ -737,7 +737,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if( isset($pd_score) && count($pd_score)) if( isset($pd_score) && count($pd_score))
{ {
echo '<div id="page_break"> </div>';
echo '<h2 contenteditable="true">PD Score Summary</h2>'; echo '<h2 contenteditable="true">PD Score Summary</h2>';
?> ?>
@ -796,7 +796,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<div id='page_break'></div>"; echo "<div id='page_break'></div>";
//######################### CHART ########################### //######################### CHART ###########################
}
$business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>"); $business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>","owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>","stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>");
$general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>"); $general_captions = array("otp_done" => "OTP authentication done >>","person_met_is_applicant" => "Is person Met, a loan applicant >>","qualification" => "Qualification of Loan Applicants >>","comment_locality" => "Comment on Locality >>","pd_location_approach" => "Approach to PD location >>","customer_behaviour" => "Customer Behaviour >>","neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>","was_the_company_name_board_sighted" => "Business Board Sighted >>","value_of_other_assets" => "Asset Value by Loan Amount % >>");
@ -886,7 +886,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// //
} //end of is score card enabled for this pd
?> ?>
<!-- ####################### Address Details Section Statred ############################--> <!-- ####################### Address Details Section Statred ############################-->
@ -3747,7 +3747,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php if(count($familyResult)>0){ <?php if(count($familyResult)>0){
//print_r($familyResult); //print_r($familyResult);
?> ?>
<div id='page_break'></div> <!-- <div id='page_break'></div> -->
<?php foreach($familyResult as $fmKey => $fmValue) { ?> <?php foreach($familyResult as $fmKey => $fmValue) { ?>
<!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> --> <!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> -->
@ -3855,7 +3855,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// //
} }
else {?> else {?>
<p><b>As per loan applicant he does not have any existing loan obligations.</b></p> <p>As per loan applicant he does not have any existing loan obligations.</p>
<?php } ?> <?php } ?>
<?php <?php
if($existing_loan_form_common_remarks != ""){ echo '<p>'.$existing_loan_form_common_remarks.'</p>';} if($existing_loan_form_common_remarks != ""){ echo '<p>'.$existing_loan_form_common_remarks.'</p>';}
@ -3941,13 +3941,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// echo 'CREDIT ********************'; // echo 'CREDIT ********************';
// print_r($data['pd_processed_forms'][24]); // print_r($data['pd_processed_forms'][24]);
//print_r($credit_officier_specific_queries); //print_r($credit_officier_specific_queries);
if(count($credit_officier_specific_queries)) // if(count($credit_officier_specific_queries))
// {
echo '<br>';
echo '<h3>Credit Manager`s Specific Queries:</h3>';
//echo '<br>';
if(isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed']))
{ {
if(count($credit_officier_specific_queries['additional_requirements_processed']))
{
echo '<h3>A . Credit Manager`s Specific Queries:</h3>';
echo '<br>';
foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value)
{ {
@ -3956,11 +3957,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br>'; echo '<br><br>';
} }
} }
else
if(count($credit_officier_specific_queries['docs_to_be_sighted_processed']))
{ {
echo '<h3>B . Documents to be collected: </h3>'; echo 'There are no specific queries raised by Credit Manager.';
}
echo '<br>'; echo '<br>';
echo '<h3>Documents to be collected: </h3>';
//
if(isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed']))
{
foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value)
{ {
@ -3973,16 +3980,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br>'; echo '<br><br>';
} }
} }
else
{
echo 'There are no specific documents to be collect.';
} }
//}
?> ?>
<!-- #################End of Credit Manager Specific Query Section #################--> <!-- #################End of Credit Manager Specific Query Section #################-->
<!-- #################Final Remarks Section#################--> <!-- #################Final Remarks Section#################-->
<div class="page_break"></div> <div class="page_break"></div>
<h3 contenteditable="true">PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3> <br><h3 contenteditable="true">PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
<?php <?php
//print_r($final_remark_data); //print_r($final_remark_data);
$polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null; $polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null;

View File

@ -65,12 +65,16 @@
} }
else if(isset($_SERVER['HTTP_HOST']) && !strcasecmp($_SERVER['HTTP_HOST'],'pdgenie.com') && isset($_SERVER['REQUEST_URI']) && substr_count($_SERVER['REQUEST_URI'], 'sparqprod') == 1) else if(isset($_SERVER['HTTP_HOST']) && !strcasecmp($_SERVER['HTTP_HOST'],'pdgenie.com') && isset($_SERVER['REQUEST_URI']) && substr_count($_SERVER['REQUEST_URI'], 'sparqprod') == 1)
{ {
define('ENVIRONMENT','sparqprod'); define('ENVIRONMENT','production');
} }
else if(isset($_SERVER['HTTP_HOST']) && !strcasecmp($_SERVER['HTTP_HOST'],'localhost') && isset($_SERVER['REQUEST_URI']) && substr_count($_SERVER['REQUEST_URI'], 'sparqapi') == 1) else if(isset($_SERVER['HTTP_HOST']) && !strcasecmp($_SERVER['HTTP_HOST'],'localhost') && isset($_SERVER['REQUEST_URI']) && substr_count($_SERVER['REQUEST_URI'], 'sparqapi') == 1)
{ {
define('ENVIRONMENT','testing'); define('ENVIRONMENT','testing');
} }
else
{
define('ENVIRONMENT','development');
}
/* /*