PD REPORT SATELLITE SCRIPTS

This commit is contained in:
velz 2019-05-09 23:14:41 +05:30
parent 5efb3f606e
commit 2af1ad0610
19 changed files with 653 additions and 400 deletions

View File

@ -93,15 +93,19 @@ defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getPDOfficerCurrentLocat
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic'); defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
if(ENVIRONMENT == 'development') if(ENVIRONMENT == 'development')
{ {
defined('SATELLITE_IMAGE_LOCATION') OR define('SATELLITE_IMAGE_LOCATION','phantomjs_dev');
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','lender'); defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','lender');
defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_dev'); defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_dev');
defined('LOGTOBOT') OR define('LOGTOBOT',0); defined('LOGTOBOT') OR define('LOGTOBOT',0);
defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg');
} }
else if(ENVIRONMENT == 'testing') else if(ENVIRONMENT == 'testing')
{ {
defined('SATELLITE_IMAGE_LOCATION') OR define('SATELLITE_IMAGE_LOCATION','phantomjs_test');
defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','len'); defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','len');
defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_test'); defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_test');
defined('LOGTOBOT') OR define('LOGTOBOT',0); defined('LOGTOBOT') OR define('LOGTOBOT',0);
defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg');
} }
/*********************END of AWS resources Constants*************************************************/ /*********************END of AWS resources Constants*************************************************/

View File

@ -618,6 +618,7 @@ class PD_Controller extends REST_Controller {
if($pd_id != null || $pd_id != '' && $count != 0) if($pd_id != null || $pd_id != '' && $count != 0)
{ {
// CALL pdnotification Helper function to send pd alerts @ params pdid,pdstatus // CALL pdnotification Helper function to send pd alerts @ params pdid,pdstatus
$logger->info("NEW PD Trigged : ".$pd_id,array('ENV'=>ENVIRONMENT,'DATA' => $pd_details));
PDALERTS::pdnotification($pd_id); PDALERTS::pdnotification($pd_id);
$data['dataStatus'] = true; $data['dataStatus'] = true;
@ -708,17 +709,17 @@ class PD_Controller extends REST_Controller {
$pd_details['random_string'] = $randomString; $pd_details['random_string'] = $randomString;
$ch = curl_init(); /* $ch = curl_init();
$timeout = 5; $timeout = 5;
$url = 'https://ssa.sineedge.com/officertracking/#/officertracking/'.$randomString; $url = 'https://ssa.sineedge.com/ot/#/officertracking/'.$randomString;
//echo "$url"; //echo "$url";
curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url); curl_setopt($ch,CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$tinyurl = curl_exec($ch); $tinyurl = curl_exec($ch);
curl_close($ch); curl_close($ch); */
$pd_details['encrypted_url'] = $tinyurl; $pd_details['encrypted_url'] = $url;
//echo $tinyurl; //echo $tinyurl;
/************ASSIGN Random URL******************/ /************ASSIGN Random URL******************/
@ -752,6 +753,9 @@ class PD_Controller extends REST_Controller {
unset($pd_details['link']); unset($pd_details['link']);
} }
//get satellite image blob and store it in DB
$pd_details['satellite_image_base64_blob'] = $this->getSatelliteImage($pd_details['pd_id']);
//If it is Addtional PD ,then update 'COMPLETE' status for primary and all other addtional PD's //If it is Addtional PD ,then update 'COMPLETE' status for primary and all other addtional PD's
if($exist_pd_details[0]['is_child'] == 1) if($exist_pd_details[0]['is_child'] == 1)
{ {
@ -776,6 +780,8 @@ class PD_Controller extends REST_Controller {
$this->PD_Model->updateRecords($single_pd,PDTRIGGER,array('pd_id' => $single_pd['pd_id'])); $this->PD_Model->updateRecords($single_pd,PDTRIGGER,array('pd_id' => $single_pd['pd_id']));
} }
} }
} }
@ -2294,8 +2300,8 @@ class PD_Controller extends REST_Controller {
break; break;
case 11: //In Stock UOM Only - also coming Text - right now No need to convert. case 11: //In Stock UOM Only - also coming Text - right now No need to convert.
//$processed_json = GETPROCESSEDJSON::convertStockDetailsForm($records,$formid); $processed_json = GETPROCESSEDJSON::convertStockDetailsForm($records,$formid);
$processed_json = $records; //print_r($processed_json);die();
break; break;
case 12: case 12:
$processed_json = $records; $processed_json = $records;
@ -4687,12 +4693,48 @@ class PD_Controller extends REST_Controller {
} }
function getSatelliteImage($pd_id)
{
$pdid = $pd_id;
$pdmas = $this->PD_Model->getPDMasterDetails($pdid);
//load satellite script from db
$satellite_script_from_db = $this->PD_Model->selectCustomRecords(array('*'),array('script_name' => 'phantomsatellite_local'),SCRIPTS);
$satellite_script = $satellite_script_from_db[0]['script_content'];
//Get Address Data
$address =$pdmas[0]['addressline1'].','.$pdmas[0]['city_name'].','.$pdmas[0]['state_name'];
$geo_location = $pdmas[0]['start_location'];
$google_map_static_api_key = GOOGLE_STATIC_MAP_API_KEY;
//Replacing Place holders
$satellite_script = str_replace('{{ADDRESS}}',$address,$satellite_script);
$satellite_script = str_replace('{{GEOLOCATION}}',$geo_location,$satellite_script);
$satellite_script = str_replace('{{API_KEY}}',$google_map_static_api_key,$satellite_script);
file_put_contents(APPPATH.'/views/js/phantomsatellite.js',$satellite_script);
//call& execute phantom script
$str = 'phantomjs '.APPPATH.'/views/js/phantomsatellite.js';
exec($str,$ou);
exec('phantom.exit();');
// //convert as base 64 image.
$satellite_image_png_path = APPPATH.'/views/report_templates/satellite.png';
$type = pathinfo($satellite_image_png_path, PATHINFO_EXTENSION);
$satellite_img_content = file_get_contents($satellite_image_png_path);
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($satellite_img_content);
return $base64_pdscore_chart_url;
}
public function codeigniterViewTest_post() public function codeigniterViewTest_post()
{ {
// PDALERTS::pdnotification(600);
// die();
$records = $this->post('records'); $records = $this->post('records');
$pdid = $records['pd_id']; $pdid = $records['pd_id'];
@ -4706,10 +4748,9 @@ class PD_Controller extends REST_Controller {
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
// $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid); // $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid);
// $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly(); // $data['score_questions_display'] = $this->PD_Model->getScoreableQuestionToDispaly();
//$data['pd_score'] = $this->calculateScore($pdid); // $data['pd_score'] = $this->calculateScore($pdid);
//print_r($data['pd_score']);
// die(); // $score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
//$score_for_chart = $data['pd_score']['score_summary']['overall_score']['final_score'] ? round($data['pd_score']['score_summary']['overall_score']['final_score'],2) : 0;
//echo $score_for_chart; //echo $score_for_chart;
$chart = null; $chart = null;
if($chart) if($chart)
@ -4729,7 +4770,7 @@ class PD_Controller extends REST_Controller {
exec($str,$ou); exec($str,$ou);
exec('phantom.exit();'); exec('phantom.exit();');
// //print_r($ou); //print_r($ou);
$chart_img_path = APPPATH.'/views/report_templates/chart.png'; $chart_img_path = APPPATH.'/views/report_templates/chart.png';
$type = pathinfo($chart_img_path, PATHINFO_EXTENSION); $type = pathinfo($chart_img_path, PATHINFO_EXTENSION);
@ -4737,7 +4778,7 @@ class PD_Controller extends REST_Controller {
$base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content); $base64_pdscore_chart_url = 'data:image/' . $type . ';base64,' . base64_encode($chart_img_content);
$data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url; $data['base64_pdscore_chart_url'] = $base64_pdscore_chart_url;
// echo $data['base64_pdscore_chart_url']; // echo $data['base64_pdscore_chart_url'];
//die();
//GENERATE CHART PART //GENERATE CHART PART
} }
//GET ALL PROCESSED JSON //GET ALL PROCESSED JSON

Binary file not shown.

View File

@ -5,13 +5,15 @@ class Assetsform
// other asset details // other asset details
public static function getOthersAssetsDetails($values){ public static function getOthersAssetsDetails($values){
$mergeResult=array(); $mergeResult=array();
foreach($values as $fetchVal){ foreach($values as $key => $fetchVal){
$storeValue=array(); $storeValue=array();
$storeValue['assets_mode'] = $fetchVal['assets_mode_master']; $storeValue['assets_mode'] = $fetchVal['assets_mode_master'];
$storeValue['name_of_the_owner'] = $fetchVal['name_of_the_owner'][0]['id']==0 ? $fetchVal['other_owner'] : $fetchVal['name_of_the_owner'][0]['name']; $storeValue['name_of_the_owner'] = $fetchVal['name_of_the_owner'][0]['id']==0 ? $fetchVal['other_owner'] : $fetchVal['name_of_the_owner'][0]['name'];
$storeValue['purchase_year'] = $fetchVal['vintage_personal'];
$storeValue['emi'] = (!strcasecmp($fetchVal['emi'],'yes'));
// this is for investments type // this is for investments type
if($fetchVal['assets_mode']==7){ if($fetchVal['assets_mode']==7){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['details'][0]['amount_of_invest']; $storeValue['approximate_market_value'] = $fetchVal['details'][0]['amount_of_invest'];
switch($fetchVal['details'][0]['investments_type_master']) { switch($fetchVal['details'][0]['investments_type_master']) {
case 1: case 1:
$storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['other_investments_type'].' with '.$fetchVal['details'][0]['in_which_organisation']; $storeValue['about_assets'] = ' Invested in '.$fetchVal['details'][0]['other_investments_type'].' with '.$fetchVal['details'][0]['in_which_organisation'];
@ -39,7 +41,8 @@ public static function getOthersAssetsDetails($values){
} }
// this is for life insurance // this is for life insurance
else if($fetchVal['assets_mode']==6){ else if($fetchVal['assets_mode']==6){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['details'][0]['sum_assured']; $storeValue['approximate_market_value'] = $fetchVal['details'][0]['sum_assured'];
$storeValue['is_sum_assured'] = 1;
switch($fetchVal['details'][0]['frequency_mode']) { switch($fetchVal['details'][0]['frequency_mode']) {
case 1: case 1:
@ -70,27 +73,33 @@ public static function getOthersAssetsDetails($values){
} }
// this is machinaries // this is machinaries
else if($fetchVal['assets_mode']==4){ else if($fetchVal['assets_mode']==4){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value']; $storeValue['approximate_market_value'] = $fetchVal['approximate_market_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['equipment_manufacturing_description']; $storeValue['about_assets'] = $fetchVal['details'][0]['equipment_manufacturing_description'];
} }
// this is for vehicle // this is for vehicle
else if($fetchVal['assets_mode']==3){ else if($fetchVal['assets_mode']==3){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value']; $storeValue['approximate_market_value'] = $fetchVal['approximate_market_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['manufacturer_model_vehicle'].' purchased in '. $fetchVal['purchase_year']; $storeValue['about_assets'] = $fetchVal['details'][0]['vehicle_type_master'].' - '.$fetchVal['details'][0]['manufacturer_model_vehicle'];
} }
// this property // this property
else if($fetchVal['assets_mode']==2){ else if($fetchVal['assets_mode']==2){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['approximate_market_value']; $storeValue['approximate_market_value'] = $fetchVal['approximate_market_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['property_type']==1 ? $fetchVal['details'][0]['other_property_type'].' purchased in '. $fetchVal['purchase_year'] : $fetchVal['details'][0]['property_type'].' purchased in '. $fetchVal['purchase_year']; $storeValue['assets_mode'] .= '<br>('.$fetchVal['details'][0]['property_type_master'].')';
$storeValue['about_assets'] = $fetchVal['details'][0]['address_of_the_property']? 'Address of Property : ' . $fetchVal['details'][0]['address_of_the_property'].'.' : '';
$storeValue['about_assets'] .= $fetchVal['details'][0]['describe_of_the_property_asset']? '<br> Description of Asset : ' . $fetchVal['details'][0]['describe_of_the_property_asset'].'.' : '';
$storeValue['about_assets'] .= $fetchVal['details'][0]['area_covered_by_this_property']? '<br> Area of Covered : ' . $fetchVal['details'][0]['area_covered_by_this_property'].'.' : '';
} }
//this is for other //this is for other
else if($fetchVal['assets_mode']==1){ else if($fetchVal['assets_mode']==1){
$storeValue['approximate_market_value'] = 'Rs.'.$fetchVal['details'][0]['any_other_asset_value']; $storeValue['approximate_market_value'] = $fetchVal['details'][0]['any_other_asset_value'];
$storeValue['about_assets'] = $fetchVal['details'][0]['any_other_assets'].' purchased in '. $fetchVal['purchase_year']; $storeValue['about_assets'] = $fetchVal['details'][0]['any_other_assets'].' purchased in '. $fetchVal['purchase_year'];
} }

View File

@ -30,14 +30,14 @@ public static function getIndividualBankingDetails($values){
if(count($values)>0){ if(count($values)>0){
$values = array_map(function($tag) { $values = array_map(function($tag) {
$count_vintage = $tag['vintage_year'] >0 ? $tag['vintage_year'] :""; $count_vintage = $tag['vintage_year'] >0 ? $tag['vintage_year'] :"";
$count_vintage .= ($tag['vintage_year'] == 1) ? " Year" : (($tag['vintage_year'] > 1) ? " Years" : ""); $count_vintage .= ($tag['vintage_year'] == 1) ? " Yr" : (($tag['vintage_year'] > 1) ? " Yrs" : "");
$count_vintage.=' '; $count_vintage.=' ';
$count_vintage .=$tag['vintage_month'] >0 ? $tag['vintage_month'] : ""; $count_vintage .=$tag['vintage_month'] >0 ? $tag['vintage_month'] : "";
$count_vintage .=($tag['vintage_month'] == 1) ? " Month" : (($tag['vintage_month'] > 1) ? " Months" : ""); $count_vintage .=($tag['vintage_month'] == 1) ? " Month" : (($tag['vintage_month'] > 1) ? " Months" : "");
return array( return array(
'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : $tag['applicant_name']['name'], 'account_name' => $tag['applicant_name']['id']==0 ? $tag['other_applicant'] : $tag['applicant_name']['name'],
'bank_name' => $tag['bank_name'] ==1 ? $tag['other_bank'] : $tag['bank_name'], 'bank_name' => $tag['bank_name'] ==1 ? $tag['other_bank'] : $tag['bank_name_master'],
'account_type' => $tag['account_type'], 'account_type' => $tag['account_type_master'],
'main_business' => $tag['salary'], 'main_business' => $tag['salary'],
'od_cc_limit' => ($tag['account_type']==3) ? $tag['limit'] : (($tag['account_type']==4) ? $tag['limit'] : ''), 'od_cc_limit' => ($tag['account_type']==3) ? $tag['limit'] : (($tag['account_type']==4) ? $tag['limit'] : ''),
'vintage' => $count_vintage, 'vintage' => $count_vintage,

View File

@ -4,7 +4,21 @@ class Financialform
{ {
//other loan obligations //other loan obligations
public static function getOtherLoanDetails($values){ public static function getOtherLoanDetails($values){
$values = array_map(function($tag) {
$first_row = '<tr><td class="customtd">Loan Type</td>';
$second_row = '<tr><td class="customtd">Loan Amount (Rs)</td>';
// $third_row = '<tr><td class="customtd">Loan Amount (Rs)</td>';
$fourth_row = '<tr><td class="customtd">Availed From</td>';
$fifth_row = '<tr><td class="customtd">Borrower</td>';
$sixth_row = '<tr><td class="customtd">Instalment Amount (Rs)</td>';
$seventh_row = '<tr><td class="customtd">Instalment Frequency</td>';
$eigth_row = '<tr><td class="customtd">Original Tenure (Months)</td>';
$ninth_row = '<tr><td class="customtd">Elapsed Tenure (Months)</td>';
$tenth_row = '<tr><td class="customtd">Balance Tenure (Months)</td>';
foreach($values as $key => $tag)
{
$setFrequencyType=''; $setFrequencyType='';
switch($tag['frequency']) { switch($tag['frequency']) {
case 1: case 1:
@ -33,19 +47,35 @@ public static function getOtherLoanDetails($values){
} }
$loanTaken=$tag['loan_taken_by']; $loanTaken=$tag['loan_taken_by'];
$first_row .= $tag['loan_type']==1 ? '<td class="customtd">'.$tag['others_loan_type'].'</td>' : '<td class="customtd">'.$tag['loan_type_master'] .'</td>';
$second_row .= '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
//$third_row = '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['loan_amount']).'</td>';
$fourth_row .= $tag['lender']==1 ? '<td class="customtd">'.$tag['others_lender'].'</td>' : '<td class="customtd">'.$tag['lender_master'].'</td>';
$fifth_row .= $loanTaken['id']==0 ? '<td class="customtd">'.$tag['others_loan_taken'].'</td>' : '<td class="customtd">'.$loanTaken['name'].'</td>';
$sixth_row .= '<td class="customtd">'.MYUTIL::customIndianNumberFormat($tag['emi']).'</td>';
$seventh_row .= $tag['frequency']==1 ? '<td class="customtd">'.$tag['other_frequency'].'</td>' : '<td class="customtd">'.$tag['frequency_master'].'</td>';
$eigth_row .= '<td class="customtd">'.$tag['original_tenure'].'</td>';
$ninth_row .= '<td class="customtd">'.$tag['elapsed_tenure'].'</td>';
$tenth_row .= '<td class="customtd">'.($tag['original_tenure'] - $tag['elapsed_tenure']).'</td>';
}
return array( return array(
'loan_type' => $tag['loan_type']==1 ? $tag['others_loan_type'] : $tag['loan_type_master'], 'first_row' => $first_row.'</tr>','second_row' => $second_row.'</tr>','fourth_row' => $fourth_row.'</tr>','fifth_row' => $fifth_row.'</tr>','sixth_row' => $sixth_row.'</tr>','seventh_row' => $seventh_row.'</tr>','eigth_row' => $eigth_row.'</tr>', 'ninth_row' => $ninth_row.'</tr>', 'tenth_row' => $tenth_row.'</tr>'
'loan_amount' => $tag['loan_amount'],
'frequency' => $tag['frequency']==1 ? $tag['other_frequency'] : $tag['frequency_master'],
'lender' => $tag['lender']==1 ? $tag['others_lender'] : $tag['lender_master'],
'original_tenure' => $tag['original_tenure'],
'current_balance_tenure' => $tag['current_balance_tenure'],
'elapsed_tenure' => $tag['elapsed_tenure'],
'emi' => $tag['emi'].$setFrequencyType,
'loan_taken_by' => $loanTaken['id']==0 ? $tag['others_loan_taken'] : $loanTaken['name'],
); );
}, $values);
return $values; //return $values;
} }
// business financial details // business financial details
@ -140,8 +170,11 @@ public static function getBusinessCustomerHeader($values){
} }
} }
public static function getAvailableFacilities($array) public static function getAvailableFacilities($arr)
{ {
echo "@@@@@@@@@@@@@@";
print_r($arr);
die();
$word_array = array('1' => 'Others', '2' => 'Bank Guarantee', '3' => 'Cash Credit Limit','4' => 'Factoring', '5' => 'Forfaiting', '6' => 'Letter of Credit'); $word_array = array('1' => 'Others', '2' => 'Bank Guarantee', '3' => 'Cash Credit Limit','4' => 'Factoring', '5' => 'Forfaiting', '6' => 'Letter of Credit');
if(is_array($array)) if(is_array($array))
{ {

View File

@ -472,41 +472,57 @@ class GETPROCESSEDJSON
{ {
if(array_key_exists('manufacturing_details',$raw_json)) if(array_key_exists('manufacturing_details',$raw_json))
{ {
foreach($raw_json['manufacturing_details'] as $main_key =>$manufacturing_details)
if($raw_json['manufacturing_details'] != "" || $raw_json['manufacturing_details'] != null)
{ {
if($manufacturing_details != "" || $manufacturing_details != null){
foreach($raw_json['manufacturing_details'] as $manufacturing_details_key => $manufacturing_details) foreach($manufacturing_details as $second_key => $details)
{ {
if(is_array($details))
foreach($manufacturing_details as $manufacturing_details_key => $manufacturing_detail)
{ {
//print_r($manufacturing_detail); foreach($details as $key => $value)
foreach($manufacturing_detail as $key => $value)
{ {
if($value != "" || $value != null) $uom_name = null;
$uom_name = isset($value['raw_uom']) ? 'raw_uom':(isset($value['goods_uom']) ? 'goods_uom' : null);
$uom_value = isset($value['raw_uom']) ? $value['raw_uom']:(isset($value['goods_uom']) ? $value['goods_uom'] : null);
$CI->db->SELECT( $master_tables_field_names['UOM'] );
$CI->db->FROM(UOM);
$CI->db->WHERE( $master_tables_pkid['UOM'],$uom_value);
$uom= $CI->db->GET()->result_array();
if(count($uom))
{ {
//compare with master_keys array $uom_master = $uom[0][ $master_tables_field_names['UOM'] ];
foreach($master_keys as $master_key => $master_value) $raw_json['manufacturing_details'][$main_key][$second_key][$key]['uom_master'] = $uom_master;
}
}
}
}
}
}
}
//*************
if(array_key_exists('retail_details',$raw_json))
{ {
if(!strcmp($key,$master_value['key']) && $master_value['ismaster'] == 1) foreach($raw_json['retail_details'] as $main_key =>$retail_details)
{ {
print_r($key);echo "\n\n"; if($retail_details != "" || $retail_details != null){
//GET MASASTER DATA foreach($retail_details as $second_key => $details)
$table = constant($master_value['master_name']);
$temp_fields = array($master_tables_field_names[$master_value['master_name']].' as name');
$where_condition_array = array($master_tables_pkid[$master_value['master_name']] => $value);
$result_data = $CI->PD_Model->selectCustomRecords($temp_fields,$where_condition_array,$table);
if(count($result_data))
{ {
//print_r($result_data[0]['name']); if(is_array($details))
// $key = $key . '_master'; {
// $raw_json['income_details'][$income_details_key][$key] = $result_data[0]['name']; foreach($details as $key => $value)
{
$CI->db->SELECT( $master_tables_field_names['UOM'] );
$CI->db->FROM(UOM);
$CI->db->WHERE( $master_tables_pkid['UOM'],$value['traded_goods_uom']);
$uom= $CI->db->GET()->result_array();
if(count($uom))
{
$uom_master = $uom[0][ $master_tables_field_names['UOM'] ];
$raw_json['retail_details'][$main_key][$second_key][$key]['uom_master'] = $uom_master;
}
} }
} }
} }
@ -514,14 +530,39 @@ class GETPROCESSEDJSON
} }
} }
//*************
if(array_key_exists('trade_details',$raw_json))
{
foreach($raw_json['trade_details'] as $main_key =>$trade_details)
{
if($retail_details != "" || $retail_details != null){
foreach($trade_details as $second_key => $details)
{
if(is_array($details))
{
foreach($details as $key => $value)
{
$CI->db->SELECT( $master_tables_field_names['UOM'] );
$CI->db->FROM(UOM);
$CI->db->WHERE( $master_tables_pkid['UOM'],$value['traded_goods_uom']);
$uom= $CI->db->GET()->result_array();
// print_r($loan); if(count($uom))
{
$uom_master = $uom[0][ $master_tables_field_names['UOM'] ];
$raw_json['trade_details'][$main_key][$second_key][$key]['uom_master'] = $uom_master;
} }
} }
} }
} }
}
}
}
}
return $raw_json; return $raw_json;
} }
/*****************########## END STOCK DETAILS FORM ##########**************/ /*****************########## END STOCK DETAILS FORM ##########**************/

View File

@ -2,26 +2,64 @@
class Neighbourreferencecheckform class Neighbourreferencecheckform
{ {
public static function getNeighbourhoodDetails($values,$pdMasterValue){ public static function getNeighbourhoodDetails($company_name,$values,$pdMasterValue){
$applicantName=$pdMasterValue['main_applicant']; $applicantName=$pdMasterValue['main_applicant'];
$values = array_map(function($tag) use ($applicantName) { $values = array_map(function($tag) use ($applicantName,$company_name) {
$makeSentense='Neighbour '; $neighbourhood_name='Neighbour Check was done with ';
$makeSentense.= $tag['neighbourhood_name']; $neighbourhood_name.= $tag['neighbourhood_name'].'.';
$makeSentense.=" was met and he/she confirmed that he/she "; $neighbourhood_do_know = null;
$neighbourhood_business_running_yr = null;
$ownership = null;
if(strtoupper($tag['do_know'])=='YES'){ if(strtoupper($tag['do_know'])=='YES'){
$makeSentense.="knows ".$applicantName.' since '; $neighbourhood_do_know = $tag['neighbourhood_name']." knows about applicant and their business.";
$makeSentense.= ($tag['how_long_do_know_in_year'] == 1) ? $tag['how_long_do_know_in_year']." year" : (($tag['how_long_do_know_in_year'] > 1) ? $tag['how_long_do_know_in_year']." years" : ""); } else if(strtoupper($tag['do_know'])=='NO'){
$makeSentense.=' and he/she is '; $neighbourhood_do_know = $tag['neighbourhood_name']." did not know about the applicant or their business.";
$makeSentense.=(strtoupper($tag['is_applicant_owner']) == 'YES') ? "owner of the business." : ((strtoupper($tag['is_applicant_owner']) == 'NO') ? "not owner of the business." : "");
} }
else if(strtoupper($tag['do_know'])=='NO'){
$makeSentense.="does not know ".$applicantName.'.'; if($tag['how_long_do_know_in_year'])
{
$neighbourhood_business_running_yr = $tag['neighbourhood_name']." confirmed that the business has been in operation for ";
$neighbourhood_business_running_yr .= ($tag['how_long_do_know_in_year'] == 1) ? $tag['neighbourhood_name'].' '.$tag['how_long_do_know_in_year']." year" : (($tag['how_long_do_know_in_year'] > 1) ? $tag['how_long_do_know_in_year']." years" : "");
$neighbourhood_business_running_yr .= ($tag['how_long_do_know_in_month'] == 1) ? ' and '.$tag['how_long_do_know_in_month']." month" : (($tag['how_long_do_know_in_month'] > 1) ? ' and '.$tag['how_long_do_know_in_month']." months" : "");
$neighbourhood_business_running_yr .= '.';
} }
return $makeSentense; else
{
$neighbourhood_business_running_yr = $tag['neighbourhood_name']." was not aware of how long the business is in operation.";
}
$ownwers_list = '';
if($tag['organisation_owner']){
foreach($tag['organisation_owner'] as $owner)
{
if($owner['id'] != 0)
{
$ownwers_list .= $owner['name'].',';
}
else
{
$ownwers_list .= ' '.$tag['other_organisation_owner'];
}
}
$ownwers_list = substr_replace($ownwers_list, ' and', strrpos($ownwers_list, ','),1);
$grammer1 = count($tag['organisation_owner']) > 0 ? ' are': ' is';
$grammer2 = count($tag['organisation_owner']) > 0 ? 'owners': 'owner';
$ownership = 'As per '.$tag['neighbourhood_name'].' the '.$grammer2 .' of '.$company_name.$grammer1.$ownwers_list.'.';
}else
{
$ownership = $tag['neighbourhood_name']." was not aware of the business ownership.";
}
//$makeSentense.=(strtoupper($tag['is_applicant_owner']) == 'YES') ? "owner of the business." : ((strtoupper($tag['is_applicant_owner']) == 'NO') ? "not owner of the business." : "");
return array('neighbourhood_name' => $neighbourhood_name,'neighbourhood_do_know' => $neighbourhood_do_know,'neighbourhood_business_running_yr' => $neighbourhood_business_running_yr,'ownership' => $ownership);
}, $values); }, $values);
return $values; return $values;
} }
public static function getReferenceDetails($values,$pdMasterValue) { public static function getReferenceDetails($values,$pdMasterValue) {
$applicantName=$pdMasterValue['main_applicant']; $applicantName=$pdMasterValue['main_applicant'];
$values = array_map(function($tag) use ($applicantName) { $values = array_map(function($tag) use ($applicantName) {

View File

@ -8,26 +8,34 @@ public static function getFamilyDetails($values){
//print_r($fetchVal);die(); //print_r($fetchVal);die();
$storeValue=array(); $storeValue=array();
$storeValue['selected_person']= isset($fetchVal['selected_person_master']) ? $fetchVal['selected_person_master'] : $fetchVal['selected_person']; $storeValue['selected_person']= isset($fetchVal['selected_person_master']) ? $fetchVal['selected_person_master'] : $fetchVal['selected_person'];
$storeValue['residency_address']=$fetchVal['residence_place'].','.$fetchVal['residence_city'].','.$fetchVal['residence_state'].'-'; $storeValue['residency_address']=$fetchVal['residence_place'].' in '.$fetchVal['residence_city_master'].','.$fetchVal['residence_state_master'].'-';
$storeValue['residency_address'] .=($fetchVal['residence_pin'] == 1) ? $fetchVal['residence_other_pincode'] : (($fetchVal['residence_pin'] > 1) ? $fetchVal['residence_pin'] : ""); $storeValue['residency_address'] .=($fetchVal['residence_pin'] == 1) ? $fetchVal['residence_other_pincode'] : (($fetchVal['residence_pin'] > 1) ? $fetchVal['residence_pincode_master'] : "");
//$storeValue['residency_address'] .='.'; //$storeValue['residency_address'] .='.';
$storeValue['residence_No_of_years']=($fetchVal['residence_No_of_years'] == 1) ? $fetchVal['residence_No_of_years'].' year' :(($fetchVal['residence_No_of_years'] > 1) ? $fetchVal['residence_No_of_years'].' years' : ""); $storeValue['residence_No_of_years']=($fetchVal['residence_No_of_years'] == 1) ? $fetchVal['residence_No_of_years'].' year' :(($fetchVal['residence_No_of_years'] > 1) ? $fetchVal['residence_No_of_years'].' years' : "");
$storeValue['residence_ownership']=($fetchVal['residence_ownership'] == 1) ? $fetchVal['ownershipOther'] :(($fetchVal['residence_ownership'] == 3) ? $fetchVal['residence_ownership_master'].' @ Rs.'.$fetchVal['rent'].' per month' : $fetchVal['residence_ownership_master']); $storeValue['residence_ownership']=($fetchVal['residence_ownership'] == 1) ? $fetchVal['ownershipOther'] :(($fetchVal['residence_ownership'] == 3) ? $fetchVal['residence_ownership_master'] : $fetchVal['residence_ownership_master']);
$storeValue['rent'] = $fetchVal['rent'];
$storeValue['no_family_members']= count($fetchVal['family_members_details']) > 0 ? count($fetchVal['family_members_details']) : '0'; $storeValue['no_family_members']= count($fetchVal['family_members_details']) > 0 ? count($fetchVal['family_members_details']) : '0';
$storeValue['family_members_details'] = array_map(function($tag) { $storeValue['family_members_details'] = array_map(function($tag) {
$getFamilyEarning=''; $getFamilyEarning='';
if($tag['family_member_earning_status']==1){ if($tag['family_member_earning_status']==1){
$getFamilyEarning= 'Earning '; $getFamilyEarning= 'Earning ';
$getFamilyEarning .= $tag['earning_segment_master']==1 ? $tag['earning_if_others_segment'].' with '.$tag['earning_name_of_the_employer_or_business'].' since '.$tag['earning_number_of_years_in_employment_or_business'].' years earning Rs.'.$tag['earning_gross_income_per_month'].' per month ' : $tag['earning_segment_master'].' with '.$tag['earning_name_of_the_employer_or_business'].' since '.$tag['earning_number_of_years_in_employment_or_business'].' years earning Rs.'.$tag['earning_gross_income_per_month'].' per month '; $getFamilyOccupation = $tag['earning_segment']==1 ? $tag['earning_if_others_segment'].' Income of '.$tag['earning_gross_income_per_month'].' per month. ':' Income of '.$tag['earning_gross_income_per_month'].' per month.';
$getFamilyOccupation .= $tag['earning_name_of_the_employer_or_business'] ? ' with '.$tag['earning_name_of_the_employer_or_business'].'.' : '';
$getFamilyOccupation .= 'He has been working for '.$tag['earning_number_of_years_in_employment_or_business'].' years.';
// ? .' years earning Rs.'. : $tag['earning_segment_master'].' with '.$tag['earning_name_of_the_employer_or_business'].' since '.$tag['earning_number_of_years_in_employment_or_business'].' years earning Rs.'.$tag['earning_gross_income_per_month'].' per month ';
} }
else if($tag['family_member_earning_status']==2){ else if($tag['family_member_earning_status']==2){
$getFamilyEarning= 'Non-Earning '.$tag['non_earning_occupation_master']; $getFamilyEarning = 'Non-Earning';
$getFamilyOccupation = $tag['non_earning_occupation_master'];
} }
return array( return array(
'name' => $tag['family_member_name'], 'name' => $tag['family_member_name'],
'family_member_relationship' => $tag['family_member_relationship_master'], 'family_member_relationship' => $tag['family_member_relationship_master'],
'family_member_age' => $tag['family_member_age'], 'family_member_age' => $tag['family_member_age'],
'family_member_earning' => $getFamilyEarning, 'family_member_earning' => $getFamilyEarning,
'family_member_occupation' => $getFamilyOccupation,
); );
}, $fetchVal['family_members_details']); }, $fetchVal['family_members_details']);
array_push($mergeResult,$storeValue); array_push($mergeResult,$storeValue);

View File

@ -6,8 +6,9 @@ public static function getIncomeDetails($values){
$values = array_map(function($tag) { $values = array_map(function($tag) {
return array( return array(
'source' => $tag['source']==1 ? $tag['others_source'] : $tag['source_master'], 'source' => $tag['source']==1 ? $tag['others_source'] : $tag['source_master'],
'amount' => 'Rs.'.$tag['amount'], 'amount' => $tag['amount'],
'frequency' => $tag['frequency']==1 ? $tag['others_frequency'] : $tag['frequency_master'], 'frequency' => $tag['frequency']==1 ? $tag['others_frequency'] : $tag['frequency_master'],
'earned_by' => $tag['income_earned_by'][0]['name']
); );
}, $values); }, $values);
return $values; return $values;

View File

@ -81,7 +81,7 @@ class PDSCORE
$business_activity_has_seen = array('yes' => 10, 'no' => 0); $business_activity_has_seen = array('yes' => 10, 'no' => 0);
$vintage_of_business_account = array('100> to >=10' => 10,'7<= to <10' => 8,'5<= to <7' => 6,'3<= to <5' => 4,'3> to >0' => 2); $vintage_of_business_account = array('100> to >=10' => 10,'7<= to <10' => 8,'5<= to <7' => 6,'3<= to <5' => 4,'3> to >0' => 2);
/*-------- FINAL --------------*/ /*-------- FINAL --------------*/
$pd_officer_recommandations = array('Positive' => 10,'Negative' => 0,'Refer to Credit' => 5); $pd_officer_recommandations = array('Positive' => 10,'Negative' => 0,'Refer to Credit' => 5,'Others' => 0);
/*-----------CALCULATION PART -----------*/ /*-----------CALCULATION PART -----------*/

View File

@ -6,11 +6,11 @@ class Stockform
public static function getStockManufacturingDetails($rawMaterial,$goods){ public static function getStockManufacturingDetails($rawMaterial,$goods){
$getRawMaterial=array(); $getRawMaterial=array();
$getGoods=array(); $getGoods=array();
//print_r($rawMaterial);die(); //print_r($goods);die();
// raw material // raw material
if(count($rawMaterial)>0){ if(count($rawMaterial)>0){
$getRawMaterial = array_map(function($tag) { $getRawMaterial = array_map(function($tag) {
$getUom= $tag['raw_uom']==1 ? $tag['other_uom'] : $tag['raw_uom']; $getUom= $tag['raw_uom']==1 ? $tag['other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : '');
return array( return array(
@ -26,7 +26,7 @@ public static function getStockManufacturingDetails($rawMaterial,$goods){
// goods // goods
if(count($goods)>0){ if(count($goods)>0){
$getGoods = array_map(function($tag) { $getGoods = array_map(function($tag) {
$getGUom= $tag['goods_uom']==1 ? $tag['goods_other_uom'] : $tag['goods_uom']; $getGUom= $tag['goods_uom']==1 ? $tag['goods_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : '');
return array( return array(
'type' => 'Finished Goods', 'type' => 'Finished Goods',
@ -46,7 +46,7 @@ public static function getStockRetailDetails($goods){
// goods // goods
if(count($goods)>0){ if(count($goods)>0){
$goods = array_map(function($tag) { $goods = array_map(function($tag) {
$getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : $tag['traded_goods_uom']; $getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : '');
$getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']); $getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']);
return array( return array(
'name' => $tag['traded_goods_name'], 'name' => $tag['traded_goods_name'],
@ -65,7 +65,7 @@ public static function getStockWholesaleDetails($goods){
// goods // goods
if(count($goods)>0){ if(count($goods)>0){
$goods = array_map(function($tag) { $goods = array_map(function($tag) {
$getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : $tag['traded_goods_uom']; $getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : '');
$getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']); $getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']);
return array( return array(
'name' => $tag['traded_goods_name'], 'name' => $tag['traded_goods_name'],

View File

@ -744,7 +744,7 @@ class PD_Model extends SPARQ_Model {
*/ */
public function getPDMasterDetails($pdid) public function getPDMasterDetails($pdid)
{ {
$this->db->SELECT('PDTRIGGER.pd_id, 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,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, 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 %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") 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,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location'); $this->db->SELECT('PDTRIGGER.pd_id, 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,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, 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 %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") 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,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER'); $this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT'); $this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT'); $this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');

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 = 78;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/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 = 52.6;var url = 'http://localhost:9999/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

View File

@ -0,0 +1 @@
var page = require('webpage').create();page.viewportSize = { width: 650, height: 250 };page.clipRect = { top: 0, left: 0, width: 500, height: 250 };var score = 78;var url = 'https://maps.googleapis.com/maps/api/staticmap?center=CORGO INDIA ENTERPRISES B 19 8 FIRST FLOOR,JOSHI COLONY PATPARGANJ,New Delhi,Delhi,IND&zoom=14&markers=color:red|28.6282898,77.3025616&size=800x300&maptype=roadmap&key=AIzaSyCXsHTus6hyIB8jYvt9ZEIbZve-2vWeQRg';var image_url ='C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/satellite.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

View File

@ -6,13 +6,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title> <title></title>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'> <link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<style type="text/css"> <style type="text/css">
.page_break { page-break-before: always; } .page_break { page-break-before: always; }
@page { @page {
margin: 100px 50px; margin: 100px 50px;
font-family:Helvetica,Arial; /*font-family:Helvetica,Arial;*/
font-family:Merriweather;
} }
header { header {
position: fixed; position: fixed;
@ -67,7 +68,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
/* #########Score Card Table Styles######### */ /* #########Score Card Table Styles######### */
.scorecard_table { .scorecard_table {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; /* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
/*font-family: Merriweather;*/
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
} }
@ -86,7 +88,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding-top: 8px; padding-top: 8px;
padding-bottom: 8px; padding-bottom: 8px;
text-align: center; text-align: center;
background-color: #4CAF50; background-color: #0191ed;
color: white; color: white;
} }
@ -95,13 +97,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
.customtd { text-align:center; } .customtd { text-align:center; }
.customtd_leftalign { text-align:left; } .customtd_leftalign { text-align:left; }
.customtd_rightalign { text-align:right; } .customtd_rightalign { text-align:right; }
#boxstyle1 {
box-sizing: border-box;
width: 60px;
height: 20px;
padding: 5px;
border: 2px outset black;
}
#boxstyle2 {
box-sizing: border-box;
width: 200px;
height: 20px;
padding: 5px;
border: 2px outset black;
}
#boxstyle3 {
box-sizing: border-box;
width: 120px;
height: 20px;
padding: 5px;
border: 2px outset black;
}
</style> </style>
</head> </head>
<body style="font-size:14px;margin:25px 50px"> <body style="font-size:12px;margin:25px 50px">
<footer> <footer>
@ -351,6 +374,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php <?php
$address_form = json_decode($pd_processed_forms[5][0]['processed_json'],true); $address_form = json_decode($pd_processed_forms[5][0]['processed_json'],true);
$final_remark_data = json_decode($pd_processed_forms[20][0]['processed_json'],true) ; $final_remark_data = json_decode($pd_processed_forms[20][0]['processed_json'],true) ;
$business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true); $business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true);
@ -364,11 +388,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>'.$pd_master_details[0]['start_location']; echo '<br><br><b> GPS Coordinates of location where PD Visit was done : </b>'.$pd_master_details[0]['start_location'];
?> ?>
<img src ='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' alt="Satellite Image of location of Where PD was Done" style="width:150;height:50px;" /> <img src =<?php echo $pd_master_details[0]['satellite_image_base64_blob'];?> alt="Satellite Image of location of Where PD was Done" style="width:400;height:200px;" /><br><br><br>
<img src ='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' alt="Approch to PD Location" style="width:150;height:50px;" /> <!-- <img src ='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' alt="Approch to PD Location" style="width:150;height:50px;" />
<img src ='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' alt="Name Board" style="width:150;height:50px;" /> <img src ='http://ssa.sineedge.com/sparqapi/logo/sinelogo.png' alt="Name Board" style="width:150;height:50px;" /> -->
<br><p><b>Location Summary</b></p> <br><p><b>Location Summary</b></p>
<?php <?php
@ -1071,8 +1095,44 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days']; $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days'];
$bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] != "" : 'Data Not Provided'; $bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] != "" : 'Data Not Provided';
$bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available'];
$bindBusinessFinancial['working_capital_facilites'] = $businessFinancialRow['working_capital_facilities_availed']; foreach($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v)
//FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']); {
switch($v['id'])
{
case 1:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['name'] = $businessFinancialRow['other_reason_for_working_capital_facilities_availed'];
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['reason_for_working_capital_facilities_availed'];
break;
case 2:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['bank_guarantee'];
break;
case 3:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['cash_credit_limit'];
break;
case 4:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring'];
break;
case 5:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring'];
break;
case 6:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['letter_of_credit'];
break;
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
}
}
$bindBusinessFinancial['working_capital_facilites'] = $businessFinancialRow['select_working_capital_facilities_availed'];
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']);die(); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
array_push($businessFinancialResult,$bindBusinessFinancial); array_push($businessFinancialResult,$bindBusinessFinancial);
@ -1197,9 +1257,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<table class="scorecard_table"> <table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Facility Type</th> <th>Facility Details</th> </tr> </thead> <thead> <tr> <th>S.No</th> <th>Facility Type</th> <th>Facility Details</th> </tr> </thead>
<tbody> <tbody>
<?php foreach($iterateFinance['working_capital_facilites'] as $facility){ <?php foreach($iterateFinance['working_capital_facilites'] as $fk => $facility){
echo "<tr> <td>".$facility."</td> </tr>"; echo '<tr> <td class="customtd">'.(++$fk) .'</td><td td class="customtd">'.$facility['name'].'</td> <td td class="customtd">'.$facility['details'].'</td></tr';
}?> }?>
</tbody> </tbody>
</table> </table>
@ -1665,7 +1725,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult; count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult;
//print_r($stockResult);//die(); //print_r($stockResult);die();
?> ?>
<?php <?php
@ -1769,6 +1829,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$otherAssetResult=array(); $otherAssetResult=array();
foreach($pd_processed_forms[4] as $rowKey=> $oaRow) { foreach($pd_processed_forms[4] as $rowKey=> $oaRow) {
$otherAssetRow = json_decode($oaRow['processed_json'],true); $otherAssetRow = json_decode($oaRow['processed_json'],true);
//print_r($otherAssetRow);
//echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";
if(count($otherAssetRow['assets_details'])>0){ if(count($otherAssetRow['assets_details'])>0){
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']); $otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']);
@ -1777,24 +1839,32 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
?> ?>
<h3>Personal Assets</h3> <h3>Personal Assets</h3>
<?php if(count($otherAssetResult)>0){ ?> <?php
//print_r($otherAssetResult);die();
if(count($otherAssetResult)>0){ ?>
<table class="scorecard_table"> <table class="scorecard_table">
<thead> <thead>
<tr> <tr>
<th>Asset</th> <th>Sr.No</th>
<th>Owned By</th> <th>Asset Type</th>
<th>Details</th> <th>Asset Description</th>
<th>Market Value</th> <th>Asset Owned By</th>
<th>Approx Market Value(Rs)</th>
<th>Purchase Year</th>
<th>Loan Again Assest</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($otherAssetResult as $paRow){ <?php foreach($otherAssetResult as $oakey => $paRow){
?> ?>
<tr> <tr>
<td class="customtd"><?php echo (++$oakey); ?></td>
<td><?php echo $paRow['assets_mode']; ?></td> <td><?php echo $paRow['assets_mode']; ?></td>
<td><?php echo $paRow['name_of_the_owner']; ?></td>
<td><?php echo $paRow['about_assets']; ?></td> <td><?php echo $paRow['about_assets']; ?></td>
<td><?php echo $paRow['approximate_market_value']; ?></td> <td><?php echo $paRow['name_of_the_owner']; ?></td>
<td><?php echo isset($paRow['is_sum_assured']) ? 'Sum Assured -<br> '. $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']); ?></td>
<td class="customtd"><?php echo $paRow['purchase_year'] ? $paRow['purchase_year'] : 'NA'; ?></td>
<td><?php echo ($paRow['emi']) ? 'Yes' : 'No'; ?></td>
</tr> </tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
@ -1804,6 +1874,61 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<p>Personal asset is not available.</p> <p>Personal asset is not available.</p>
<?php } ?> <?php } ?>
<!-- end other asset section --> <!-- end other asset section -->
<!-- start individual banking section -->
<?php
$bankingResult=array();
// individual banking
foreach($pd_processed_forms[7] as $rowKey=> $ibRow) {
$individualBankRow = json_decode($ibRow['processed_json'],true);
//print_r($individualBankRow);
if(count($individualBankRow['banking_details'])>0){
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
}
}
?>
<h3>Personal Banking: </h3>
<?php if(count($bankingResult)>0){
//print_r($bankingResult);
?>
<p>Below bank account details were shared :</p>
<table class="scorecard_table">
<thead>
<tr>
<th>Sr.No</th>
<th>Account Name</th>
<th>Bank Name</th>
<th>Account Type</th>
<th>OD / CC Limit</th>
<th>Vintage</th>
</tr>
</thead>
<tbody>
<?php foreach($bankingResult as $pbkey => $bdRow){
?>
<tr>
<td class="customtd"><?php echo (++$pbkey); ?></td>
<td><?php echo $bdRow['account_name'] ?></td>
<td><?php echo $bdRow['bank_name'] ?></td>
<td><?php echo $bdRow['account_type'] ?></td>
<td class="customtd"><?php echo $bdRow['od_cc_limit'] ? $bdRow['od_cc_limit'] : "NA" ?></td>
<td><?php echo $bdRow['vintage'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<!-- #################end business / individual banking section #################-->
<!-- start other income section --> <!-- start other income section -->
<?php <?php
@ -1814,204 +1939,99 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$otherIncomeResult=array(); $otherIncomeResult=array();
foreach($pd_processed_forms[9] as $rowKey=> $iRow) { foreach($pd_processed_forms[9] as $rowKey=> $iRow) {
$otherIcomeRow = json_decode($iRow['processed_json'],true); $otherIcomeRow = json_decode($iRow['processed_json'],true);
// print_r($otherIcomeRow);
// echo "@@@@@@@@@@@@@@@@@@@@@";
if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){ if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){
$otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']); $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']);
} }
} }
?> ?>
<h3>Other Income Details</h3>
<?php if(count($otherIncomeResult)>0){ ?> <?php if(count($otherIncomeResult)>0){
<p>The below mentioned other source of income were shared :</p> //print_r($otherIncomeResult);
?>
<h3>Other Sources of Income of Individual Loan Applicants:</h3>
<table class="scorecard_table"> <table class="scorecard_table">
<thead> <thead>
<tr> <tr>
<th>Income Type</th> <th>Sr.No</th>
<th>Amount</th> <th>Income Source</th>
<th>Frequency</th> <th>Earned by</th>
<th>Amount(Rs)</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($otherIncomeResult as $oiRow){ <?php foreach($otherIncomeResult as $oidkey =>$oiRow){
?> ?>
<tr> <tr>
<td><?php echo $oiRow['source'] ?></td> <td class="customtd"><?php echo (++$oidkey) ?></td>
<td><?php echo $oiRow['amount'] ?></td> <td class="customtd"><?php echo $oiRow['source'] ?></td>
<td><?php echo $oiRow['frequency'] ?></td> <td class="customtd"><?php echo $oiRow['earned_by'] ?></td>
<td class="customtd"><?php echo $rupee_symbol.''.MYUTIL::customIndianNumberFormat($oiRow['amount']).' '.$oiRow['frequency'] ?></td>
</tr> </tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>
<?php } <?php }
else {?> else {?>
<p>Other source of income is not available.</p> <p>As per the loan applicants met by PD officer, they do not have any other source of Income.</p>
<?php } ?> <?php } ?>
<!-- end other income section --> <!-- end other income section -->
<!-- start business / individual banking section -->
<?php
$bankingResult=array();
// individual banking
foreach($pd_processed_forms[7] as $rowKey=> $ibRow) {
$individualBankRow = json_decode($ibRow['processed_json'],true);
if(count($individualBankRow['banking_details'])>0){
$getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getIndividualEachValues);
}
}
// business banking
foreach($pd_processed_forms[21] as $rowKey=> $bbRow) {
$businessBankRow = json_decode($bbRow['processed_json'],true);
if(count($businessBankRow['banking_details'])>0){
$getEachValues=BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details']);
$bankingResult = array_merge($bankingResult,$getEachValues);
}
}
?>
<h3>Banking Details</h3>
<?php if(count($bankingResult)>0){ ?>
<p>Below bank account details were shared :</p>
<table class="scorecard_table">
<thead>
<tr>
<th>Account Name</th>
<th>Bank Name</th>
<th>Account Type</th>
<th>Main Business Account</th>
<th>OD / CC Limit</th>
<th>Vintage</th>
</tr>
</thead>
<tbody>
<?php foreach($bankingResult as $bdRow){
?>
<tr>
<td><?php echo $bdRow['account_name'] ?></td>
<td><?php echo $bdRow['bank_name'] ?></td>
<td><?php echo $bdRow['account_type'] ?></td>
<td><?php echo $bdRow['main_business'] ?></td>
<td><?php echo $bdRow['od_cc_limit'] ?></td>
<td><?php echo $bdRow['vintage'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<p>Bank account details is not available.</p>
<?php } ?>
<!-- #################end business / individual banking section #################-->
<!-- #################start Existing Loan obligations section################# -->
<?php
$existLoanResult=array();
foreach($pd_processed_forms[8] as $rowKey=> $elRow) {
$otherLoanRow = json_decode($elRow['processed_json'],true);
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
}
}
?>
<?php if(count($existLoanResult)>0){ ?>
<h3>Other Financial Information</h3>
<p>The below current loan obligations were shared :</p>
<table class="scorecard_table">
<thead>
<tr>
<th>Loan Type</th>
<th>Amount</th>
<th>Loan Taken From</th>
<th>Installment</th>
<th>
<div>Tenure</div>
<div>(Original - Current = Elapsed)</div>
</th>
<th>Loan taken by</th>
</tr>
</thead>
<tbody>
<?php foreach($existLoanResult as $elRow){
?>
<tr>
<td><?php echo $elRow['loan_type'] ?></td>
<td><?php echo $elRow['loan_amount'] ?></td>
<td><?php echo $elRow['lender'] ?></td>
<td><?php echo $elRow['emi'] ?></td>
<td>
<?php echo $elRow['original_tenure'].' - '.$elRow['current_balance_tenure'].' = '. $elRow['elapsed_tenure']?> </div>
</td>
<td><?php echo $elRow['loan_taken_by'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php }
else {?>
<!-- <p>Current loan obligations is not available.</p> -->
<?php } ?>
<!-- #################end Existing Loan obligations section ################# -->
<!-- #################start family section #################--> <!-- #################start family section #################-->
<?php <?php
$familyResult=array(); $familyResult=array();
foreach($pd_processed_forms[6] as $rowKey=> $fRow) { foreach($pd_processed_forms[6] as $rowKey=> $fRow) {
$familyRow = json_decode($fRow['processed_json'],true); $familyRow = json_decode($fRow['processed_json'],true);
//print_r($familyRow);
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){ if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']); $familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
} }
} }
?> ?>
<h3>Other Family Details</h3>
<?php if(count($familyResult)>0){ ?> <?php if(count($familyResult)>0){
//print_r($familyResult);die();
?>
<h3>Family Information:</h3>
<?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> -->
<table class="scorecard_table"> <?php
<tbody> $intro_text = $fmValue['selected_person'].", who is an applicant in the case resides ".$fmValue['residency_address'].'.';
<tr>
<td>Address of Residence</td> $residence_text = "This is a ". $fmValue['residence_ownership']." residence, where the applicant has been staying for ". $fmValue['residence_No_of_years'].'.';
<td><?php echo $fmValue['residency_address'] ?></td> $residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? 'The rent paid Rs.'.$fmValue['rent'].'per month.' : '';
</tr>
<tr> echo $intro_text;echo "<br>";echo $residence_text;
<td>No.of Years Residing here</td>
<td><?php echo $fmValue['residence_No_of_years'] ?></td> ?>
</tr>
<tr>
<td>Ownership</td> <p>The table below provides details of other family members of <?php echo $fmValue['selected_person']." :";?></p>
<td><?php echo $fmValue['residence_ownership'] ?></td>
</tr>
<tr>
<td>No.of Family Members</td>
<td><?php echo $fmValue['no_family_members'] ?></td>
</tr>
</tbody>
</table>
<p>Family of <?php echo $fmValue['selected_person']." :";?></p>
<table class="scorecard_table"> <table class="scorecard_table">
<thead> <thead>
<tr> <tr>
<th>Sr.No</th>
<th>Name</th> <th>Name</th>
<th>Relation</th> <th>Relation</th>
<th>Age</th> <th>Age</th>
<th>Earning Status</th> <th>Earning Status</th>
<th>Occupation Details</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach($fmValue['family_members_details'] as $fmRow){ <?php foreach($fmValue['family_members_details'] as $fmdkey => $fmRow){
?> ?>
<tr> <tr>
<td class="customtd"><?php echo (++$fmdkey) ?></td>
<td><?php echo $fmRow['name'] ?></td> <td><?php echo $fmRow['name'] ?></td>
<td><?php echo $fmRow['family_member_relationship'] ?></td> <td><?php echo $fmRow['family_member_relationship'] ?></td>
<td><?php echo $fmRow['family_member_age'] ?></td> <td><?php echo $fmRow['family_member_age'] ?></td>
<td><?php echo $fmRow['family_member_earning'] ?></td> <td><?php echo $fmRow['family_member_earning'] ?></td>
<td><?php echo $fmRow['family_member_occupation'] ?></td>
</tr> </tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
@ -2025,13 +2045,79 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<!-- #################start Existing Loan obligations section################# -->
<?php
//die();
$existLoanResult=array();
foreach($pd_processed_forms[8] as $rowKey=> $elRow) {
$otherLoanRow = json_decode($elRow['processed_json'],true);
$total_no_of_data = 0;
if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){
$total_no_of_data = count($otherLoanRow['loan_details']);
$existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']);
}
}
?>
<?php if(count($existLoanResult)>0){
//print_r($existLoanResult);die();
?>
<h3>Existing Loan Obligation</h3>
<p>The table below lists the details of Existing Loan Obligations of the Loan Applicants.</p>
<table class="scorecard_table">
<thead>
<tr>
<th>Particulars</th>
<?php for($header = 1;$header <= $total_no_of_data; $header++ ) {echo "<th>Loan $header</th>";}?>
</tr>
</thead>
<tbody>
<?php
echo $existLoanResult['first_row'];
echo $existLoanResult['second_row'];
//echo $existLoanResult['third_row'];
echo $existLoanResult['fourth_row'];
echo $existLoanResult['fifth_row'];
echo $existLoanResult['sixth_row'];
echo $existLoanResult['seventh_row'];
echo $existLoanResult['eigth_row'];
echo $existLoanResult['ninth_row'];
echo $existLoanResult['tenth_row'];
?>
</tbody>
</table>
<?php
//die();
}
else {?>
<p>As per loan applicant he doesnt have any existing obligations</p>
<?php } ?>
<!-- #################end Existing Loan obligations section ################# -->
<!-- #################start neighbourhood/reference check #################--> <!-- #################start neighbourhood/reference check #################-->
<?php <?php
$existNeighRefCheck=array(); $existNeighRefCheck=array();
$pd_offiecer_status_about_neighbor = "";
foreach($pd_processed_forms[19] as $rowKey=> $nrcRow) { foreach($pd_processed_forms[19] as $rowKey=> $nrcRow) {
$neighbourRefRow = json_decode($nrcRow['processed_json'],true); $neighbourRefRow = json_decode($nrcRow['processed_json'],true);
//print_r($neighbourRefRow);
//die();
if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){
$pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status'];
if(count($neighbourRefRow['neighbourhood_list'])>0){ if(count($neighbourRefRow['neighbourhood_list'])>0){
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($neighbourRefRow['neighbourhood_list'],$pd_master_details[0]); $company_name = MYUTIL::findCompanyName($all_company_details,1,1);
$existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0]);
}
} }
// if(&& count($neighbourRefRow['referencecheck_list'])>0){ // if(&& count($neighbourRefRow['referencecheck_list'])>0){
// $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]); // $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]);
@ -2039,143 +2125,133 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} }
?> ?>
<h3>Neighbourhood / Reference Check</h3> <h3>Neighbourhood / Reference Check</h3>
<?php if(count($existNeighRefCheck)>0){ ?> <?php if(count($existNeighRefCheck)>0){
<ol> //print_r($existNeighRefCheck);die();
<?php foreach($existNeighRefCheck as $nfValue) { ?> ?>
<li style="margin: 15px 0;"><?php echo $nfValue; ?></li>
<?php }?> <?php foreach($existNeighRefCheck as $nkey => $nfValue) {
</ol>
echo '<br>Neighbour '.(++$nkey);
?>
<ul>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_name']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_do_know']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['neighbourhood_business_running_yr']; ?></li>
<li style="margin: 15px 0;"><?php echo $nfValue['ownership']; ?>
<?php if(count($existNeighRefCheck) == $nkey){?>
<li style="margin: 15px 0;"> Neighbourhood Check Status is <?php echo $pd_offiecer_status_about_neighbor;}?> </li>
</li>
</ul>
<?php }
?>
<?php } <?php }
else{?> else{?>
<p>Neighbourhood / Reference Check is not available.</p> <p>Neighbour Check was not possible due to Could not verify</p>
<?php }?> <?php }?>
<!-- #################end neighbourhood/reference check #################--> <!-- #################end neighbourhood/reference check #################-->
<!-- #################Final Remarks Section#################--> <!-- #################Final Remarks Section#################-->
<h3>Final Remarks Section</h3> <div class="page_break"></div>
<h3>PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
<?php <?php
//echo $final_remark_data['is_service_provided']; //print_r($final_remark_data);
//echo isset($final_remark_data['pd_officers_recommendation_master'])?$final_remark_data['pd_officers_recommendation_master']:'NIL'; $polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null;
//echo isset($final_remark_data['final_custormer_remark_type_master'])?$final_remark_data['final_custormer_remark_type_master']:'NIL'; $fair = null;$well = null;$not = null;
$Polite = array('url' => "https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/slightly-smiling-face.png",'name_to_display' => 'Polite','selected'=>0); $positive = null;$negative = null;$refer_to_credit = null;$fo_diplay = null;
$Rude = array('url' => "https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/pouting-face.png",'name_to_display' => 'Rude','selected'=>0); $other_pd_officer_command = null;$other_command_remark = null;
$Others = array('url' => "https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/confused-face.png",'name_to_display' => 'Other Negative','selected'=>0);
//$Polite = ' kjdhflksd dkldnldgdf';
$behavoiur = trim($final_remark_data['final_custormer_remark_type_master']);
$behavoiur = $$behavoiur;
$behavoiur['selected'] = 1;
//print_r($behavoiur);
//print_r($Rude);
$pd_officers_recommendation_data = array();
switch($final_remark_data['pd_officers_recommendation'])
{
case 1: //others
$pd_officers_recommendation_data['comments'] = array($final_remark_data['others_pd_officers_recommendation']); $other_pd_officer_recommandation = null;$other_pd_officer_recommandation_remark = null;
break; if($final_remark_data['final_custormer_remark_type'] == 3){$polite = 1;}
else if($final_remark_data['final_custormer_remark_type'] == 2){$rude = 1;}
case 4: //refer to credit else if($final_remark_data['final_custormer_remark_type'] == 1){$other_behaviour = 1;
$other_behaviour_remarks = $final_remark_data['final_other_customer_behaviour'];
if(count($final_remark_data['recommendation_refer_to_credit']))
{
foreach($final_remark_data['recommendation_refer_to_credit'] as $comment){
$pd_officers_recommendation_data['comments'][] = $comment['reason_for_refer_to_credit'];
}
}
break;
case 3: //refer to credit
if(count($final_remark_data['recommendation_negative']))
{
foreach($final_remark_data['recommendation_negative'] as $comment){
$pd_officers_recommendation_data['comments'][] = $comment['reason_for_negative'];
}
}
break;
case 2: //refer to credit
if(count($final_remark_data['recommendation_positive']))
{
foreach($final_remark_data['recommendation_positive'] as $comment){
$pd_officers_recommendation_data['comments'][] = $comment['reason_for_positive'];
}
}
break;
} }
//print_r($pd_officers_recommendation_data); if(!strcasecmp($final_remark_data['is_service_provided'],'fairly_suited')){ $fair = 1;}
else if(!strcasecmp($final_remark_data['is_service_provided'],'well_suited')){$well = 1;}
else if(!strcasecmp($final_remark_data['is_service_provided'],'not_suited')){$not = 1;}
}
if($final_remark_data['pd_officers_recommendation'] == 2){$positive = 1;$fo_diplay = "Positive";}
else if($final_remark_data['pd_officers_recommendation'] == 3){$negative = 1;$fo_diplay = "Negative";}
else if($final_remark_data['pd_officers_recommendation'] == 4){$refer_to_credit = 1;$fo_diplay = "Refer to credit";}
else if($final_remark_data['pd_officers_recommendation'] == 1){
$other_pd_officer_command = 1;
$other_command_remark = $final_remark_data['others_pd_officers_recommendation'];
}
$pd_officer_final_remark = $final_remark_data['final_form_remarks'];
$fairly_suited = array('url' => 'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/thumbs-up.png','name_to_display','name_to_display'=>'Fairly Suited');
$well_suited = array('url' => 'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/ok-hand.png','name_to_display'=>'Well Suited');
$not_suited = array('url' => 'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/cross-mark.png','name_to_display'=>'Not Suited');
$location = $final_remark_data['is_service_provided'];
$location = $$location;
//recommendation
$_4 = array('url'=>'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/backhand-index-pointing-right.png','name_to_display'=>'Refer to credit');
$_1 = array('url'=>'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/o-button-blood-type.png','name_to_display'=>'Others');
$_2 = array('url'=>'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/heavy-plus-sign.png','name_to_display'=>'Positive');
$_3 = array('url'=>'https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-12/256/heavy-minus-sign.png','name_to_display'=>'Negative');
$recommendation = '_'.$final_remark_data['pd_officers_recommendation'];
$recommendation = $$recommendation;
//print_r($recommendation);
?> ?>
<table> <div>
<ul>
<li>Customer Behaviour: </li>
<br>
<table cellspacing="25">
<tr>
<td><div id="boxstyle1">polite&nbsp;&nbsp;&nbsp;<?php if($polite){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<td><div id="boxstyle1">Rude&nbsp;&nbsp;&nbsp;<?php if($rude){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
<td><div id="boxstyle2">Others as mentioned below &nbsp;&nbsp;&nbsp;<?php if($other_behaviour){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>✔</span><?php } ?></div></td>
<tr> <td>Customer Behavior</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><div <?php if($behavoiur['name_to_display'] == $Polite['name_to_display']){ echo "style='border-style: inset;'";}?>><img height="50" width="50" src ="<?php echo $Polite['url'];?>" alt=""></div><?php echo '<span>'.$Polite['name_to_display'].'</span>';?></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><div <?php if($behavoiur['name_to_display'] == $Rude['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $Rude['url'];?>" alt=""></div><?php echo '<span>'.$Rude['name_to_display'].'</span>'?></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><div <?php if($behavoiur['name_to_display'] == $Others['name_to_display']){ echo "style='border-style: inset;'";}?>><img height="50" width="50" src ="<?php echo $Others['url'];?>" alt=""></div><?php echo '<span>'.$Others['name_to_display'].'</span>'?></td>
</tr> </tr>
<tr> <td>PD Officer Status</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><div <?php if($location['name_to_display'] == $fairly_suited['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $fairly_suited['url'];?>" alt=""></div><?php echo '<span>'.$fairly_suited['name_to_display'].'</span>'?><td>
<td><div <?php if($location['name_to_display'] == $well_suited['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $well_suited['url'];?>" alt=""></div><?php echo '<span>'.$well_suited['name_to_display'].'</span>'?><td>
<td><div <?php if($location['name_to_display'] == $not_suited['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $not_suited['url'];?>" alt=""></div><?php echo '<span>'.$not_suited['name_to_display'].'</span>'?><td>
</tr>
<tr> <td>Business Location</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><div <?php if($recommendation['name_to_display'] == $_2['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $_2['url'];?>" alt=""></div><?php echo '<span>'.$_2['name_to_display'].'</span>'?><td>
<td><div <?php if($recommendation['name_to_display'] == $_3['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $_3['url'];?>" alt=""></div><?php echo '<span>'.$_3['name_to_display'].'</span>'?><td>
<td><div <?php if($recommendation['name_to_display'] == $_4['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $_4['url'];?>" alt=""></div><?php echo '<span>'.$_4['name_to_display'].'</span>'?><td>
<td><div <?php if($recommendation['name_to_display'] == $_1['name_to_display']){ echo "style='border-style: inset;'";}?> ><img height="50" width="50" src ="<?php echo $_1['url'];?>" alt=""></div><?php echo '<span>'.$_1['name_to_display'].'</span>'?><td>
</tr>
<tr> <td>Business Location Comments</td> <td colspan="3"><?php if(count($pd_officers_recommendation_data['comments'])){foreach($pd_officers_recommendation_data['comments'] as $display){ echo '<br>'.$display;}}?></td></tr>
</table> </table>
<?php if($other_behaviour){
echo "Behaviour Details : ".$other_behaviour_remarks;
}?>
<br>
<li>Suitability of Business Location: </li>
<br>
<table cellspacing="25">
<tr>
<td><div id="boxstyle3">Well Suited&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($well){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<td><div id="boxstyle3">Fairly Suited&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($fair){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<td><div id="boxstyle3">Not Suited&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($not){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
</tr>
</table>
<li>PD Officers overall assessment: </li>
<br>
<table cellspacing="25">
<tr>
<td><div id="boxstyle3">Positive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($positive){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<td><div id="boxstyle3">Refer to Credit&nbsp;&nbsp;&nbsp;&nbsp;<?php if($refer_to_credit){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<td><div id="boxstyle3">Negative&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($negative){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
</tr>
<?php if($other_pd_officer_command){?>
<td><div id="boxstyle3">Others&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php if($other_pd_officer_command){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></td>
<?php } ?>
</tr>
</table>
</ul>
</div>
<?php if(!$other_pd_officer_command){?>
<p>PD officer recommendation is <?php echo $fo_diplay;?>. The following points were considered while arriving at the aforementioned status.</p>
<?php
if($positive){ echo "<ul>"; foreach($final_remark_data['recommendation_positive'] as $pos){ echo "<li>".$pos['reason_for_positive']."</li>";}
}else if($negative){ echo "<ul>"; foreach($final_remark_data['recommendation_negative'] as $neg){ echo "<li>".$neg['recommendation_negative']."</li>";}
}
else if($refer_to_credit){ echo "<ul>"; foreach($final_remark_data['recommendation_positive'] as $rtc){ echo "<li>".$rtc['reason_for_refer_to_credit']."</li>";}
}
echo "</ul>";
?>
<?php }else{ echo "<p>".$other_command_remark."</p>";} ?>
<div class="page_break"></div> <div class="page_break"></div>
<!-- #################End Final Remarks Section#################--> <!-- #################End Final Remarks Section#################-->
@ -2183,13 +2259,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<h3>Details Score Card Section</h3>
<?php <?php
}
$i = null; $i = null;
if($i) if($i)
{ {
echo "<h3>Details Score Card Section</h3>" ;
// *** General Section Questions Score Table // *** General Section Questions Score Table
echo '<table class="scorecard_table">'; echo '<table class="scorecard_table">';
echo "<tr> <th>General Questions L1(". $pd_score['general']['otp_done']['l1_weightage']."%) </th> <th>L2</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>"; echo "<tr> <th>General Questions L1(". $pd_score['general']['otp_done']['l1_weightage']."%) </th> <th>L2</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>";
@ -2287,7 +2364,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<table class='scorecard_table'>"; echo "<table class='scorecard_table'>";
echo "<tr> <th>Business Certificates</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>"; echo "<tr> <th>Business Certificates</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>";
$index = 0; $index = 0;
print_r($certificates); // print_r($certificates);
foreach($certificates as $key => $cerificate) foreach($certificates as $key => $cerificate)
{ {
$index++; $index++;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View File

@ -77,7 +77,7 @@ switch (ENVIRONMENT)
case 'testing': case 'testing':
error_reporting(-1); error_reporting(-1);
ini_set('display_errors', 0); ini_set('display_errors', 1);
break; break;
case 'production': case 'production':
ini_set('display_errors', 0); ini_set('display_errors', 0);