PHANTOM INSTALLED PD REPORT FEEDBACK FIXED
This commit is contained in:
parent
07f9377a44
commit
b7c47d618d
@ -271,7 +271,7 @@ $config['log_file_permissions'] = 0644;
|
||||
| codes to set your own date formatting
|
||||
|
|
||||
*/
|
||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||
$config['log_date_format'] = 'Y-m-d h:i:s A';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@ -5121,8 +5121,8 @@ class PD_Controller extends REST_Controller {
|
||||
//echo "*******************************************";
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
|
||||
//$t = $this->load->view('temp_html.html',null,true);
|
||||
// echo $t;
|
||||
// die();
|
||||
echo $t;
|
||||
//die();
|
||||
|
||||
$total_replaces = substr_count($t,'<span class="tooltip">');
|
||||
//echo $total_replaces;
|
||||
@ -6535,9 +6535,10 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
$client_form = isset($form_data[2][0]['processed_json'])?(json_decode($form_data[2][0]['processed_json'],true)):array();
|
||||
$client_count = 0;
|
||||
//print_r($client_form);die();
|
||||
if(count($client_form))
|
||||
{
|
||||
if($client_form['client_info_available'] == 1)
|
||||
if( isset($client_form['client_info_available']) && $client_form['client_info_available'] == 1)
|
||||
{
|
||||
|
||||
if(array_key_exists('manufacturing_details',$client_form))
|
||||
|
||||
Binary file not shown.
@ -219,6 +219,7 @@ class AssessedIncome
|
||||
$temp['frequency'] = $itemwise['frequency_name'];
|
||||
$temp['annual_sale_value'] = $itemwise['annual_sale_value'];
|
||||
$temp['rate_per_unit'] = $itemwise['rate_per_unit'];
|
||||
$temp['other_sales_item'] = $itemwise['other_sales_item'];
|
||||
|
||||
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
|
||||
@ -5,12 +5,38 @@ class Assetsform
|
||||
// other asset details
|
||||
public static function getOthersAssetsDetails($values){
|
||||
$mergeResult=array();
|
||||
// print_r($values);die();
|
||||
foreach($values as $key => $fetchVal){
|
||||
$storeValue=array();
|
||||
if(isset($fetchVal['assets_mode_master']) && ($fetchVal['assets_mode_master'] != '' || $fetchVal['assets_mode_master'] != null))
|
||||
{
|
||||
$assest_owners_name = '';
|
||||
foreach ( $fetchVal['name_of_the_owner'] as $o_key => $owner) {
|
||||
if($owner['id'] == 0)
|
||||
{
|
||||
$assest_owners_name .= $fetchVal['other_owner'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$assest_owners_name .= $owner['name']. ' , ';
|
||||
}
|
||||
|
||||
}
|
||||
//echo $assest_owners_name.'-';
|
||||
if(strrpos($assest_owners_name,',') && count($fetchVal['name_of_the_owner']) >=2)
|
||||
{
|
||||
$assest_owners_name = substr_replace($assest_owners_name, 'and', strrpos($assest_owners_name,','),1) ;
|
||||
}
|
||||
else if(strrpos($assest_owners_name,','))
|
||||
{
|
||||
$assest_owners_name = substr_replace($assest_owners_name, '', strrpos($assest_owners_name,','),1) ;
|
||||
}
|
||||
//echo $assest_owners_name.'-';
|
||||
// if(!strcasecmp(substr($assest_owners_name, 0,3),'and')) {$assest_owners_name = substr_replace($assest_owners_name,'',0,'and',3);}
|
||||
|
||||
// echo $assest_owners_name.'-';die();
|
||||
$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'] = $assest_owners_name;
|
||||
$storeValue['purchase_year'] = $fetchVal['vintage_personal'];
|
||||
$storeValue['emi'] = (!strcasecmp($fetchVal['emi'],'yes'));
|
||||
// this is for investments type
|
||||
@ -172,8 +198,8 @@ public static function getOthersAssetsDetails($values){
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['equipment_manufacturing_description']).' purchased at '.$fetchVal['business_purchase_year'] .'</td>';
|
||||
$third_row .= '<td class="customtd">'. ucfirst($ownership_type) .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').'</td>';
|
||||
|
||||
@ -185,8 +211,8 @@ public static function getOthersAssetsDetails($values){
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).' purchased at '.$fetchVal['business_purchase_year'].'</td>';
|
||||
$third_row .= '<td class="customtd">'. ucfirst($ownership_type) .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').'</td>';
|
||||
}
|
||||
@ -200,8 +226,8 @@ public static function getOthersAssetsDetails($values){
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master']).'</td>';
|
||||
$third_row .= '<td class="customtd">'. ucfirst($ownership_type) .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').'</td>';
|
||||
}
|
||||
@ -212,8 +238,8 @@ public static function getOthersAssetsDetails($values){
|
||||
$sec_row .= '<td class="customtd">'.$fetchVal['business_details'][0]['any_other_assets'].'</td>';
|
||||
$third_row .= '<td class="customtd">'. ucfirst($ownership_type) .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').'</td>';
|
||||
}
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
<?php
|
||||
|
||||
$lang['message'] = "MSG:";
|
||||
?>
|
||||
@ -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 = 45.6;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/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 = 76.3;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});
|
||||
@ -1072,6 +1072,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '<span contenteditable="true">During the PD visit,</span> '.$main_applicant_name.',<span contenteditable="true"> provided the following information about loan applied for:</span>';
|
||||
|
||||
$is_current_product_bl = $pd_master_details[0]['product_abbr'] == "BL" ? true: false;
|
||||
$is_current_product_lab = $pd_master_details[0]['product_abbr'] == "LAP" ? true: false;
|
||||
// echo $pd_master_details[0]['product_abbr'];
|
||||
// echo '-bl-'. $is_current_product_bl;
|
||||
// echo '-lap-'.$is_current_product_lab;
|
||||
// die();
|
||||
$loan_table_dispaly_rows = array();
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Total Loan Amount applied for','details' => "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".$loan_amount.' ('.MYUTIL::numtowords($loan_form['loan_amount']).')');
|
||||
@ -1088,7 +1093,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';}else{ $end_use.=$loan_form['end_use_other'].' and'; }
|
||||
}
|
||||
$end_use = substr_replace($end_use, '', strrpos($end_use, 'and'),strlen($end_use));
|
||||
$end_use = 'For '.$end_use;
|
||||
//echo substr($end_use,0,3);
|
||||
if(strcasecmp(substr($end_use,0,3),'for'))
|
||||
{
|
||||
$end_use = 'For '.$end_use;
|
||||
}
|
||||
|
||||
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Loan Purpose','details' => $end_use);
|
||||
|
||||
if(strcasecmp($loan_form['is_transfer'],'no'))
|
||||
@ -1105,8 +1116,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
if(!$is_current_product_bl)
|
||||
//echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab);
|
||||
if((!$is_current_product_bl) && !$is_current_product_lab)
|
||||
{
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' );
|
||||
$source_of_own_contribution = null;
|
||||
@ -1657,7 +1668,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//}
|
||||
if(!strcasecmp($fetchRow['applicant_use_pos_machines'],'yes'))
|
||||
{
|
||||
echo '<p>The applicant has using the following POS machines:</p>';
|
||||
echo '<p>The applicant has the following POS machines:</p>';
|
||||
echo '<table class="scorecard_table">';
|
||||
echo '<tr> <th>Name of the Financial Insitution</th> <th>TID Number of POS machine</th> </tr>';
|
||||
foreach($fetchRow['pos_machines_details'] as $pos)
|
||||
@ -2937,17 +2948,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
|
||||
echo '<br>';
|
||||
echo '<table class="scorecard_table">';
|
||||
echo '<thead>';
|
||||
echo '<tr> <th>Particulars</th> <th>Details</th> </tr>';
|
||||
echo '</thead>';
|
||||
echo '<tbody>';
|
||||
echo $ai_summary_details_processed['considered_sales_revenue_row'];
|
||||
echo $ai_summary_details_processed['considered_net_profit_row'];
|
||||
echo $ai_summary_details_processed['considered_net_margint_row'];
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
// echo '<br>';
|
||||
// echo '<table class="scorecard_table">';
|
||||
// echo '<thead>';
|
||||
// echo '<tr> <th>Particulars</th> <th>Details</th> </tr>';
|
||||
// echo '</thead>';
|
||||
// echo '<tbody>';
|
||||
// echo $ai_summary_details_processed['considered_sales_revenue_row'];
|
||||
// echo $ai_summary_details_processed['considered_net_profit_row'];
|
||||
// echo $ai_summary_details_processed['considered_net_margint_row'];
|
||||
// echo '</tbody>';
|
||||
// echo '</table>';
|
||||
array_shift($order_dipaly_array);
|
||||
}
|
||||
|
||||
@ -3072,12 +3083,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo $ai_core_details_processed['sales_calculated_by_itemwise_header'];
|
||||
echo '</thead>';
|
||||
echo '<tbody>';
|
||||
|
||||
foreach($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid)
|
||||
{
|
||||
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>'.$sid['sale_item'].'</td><td class="customtd">'.$sid['sales_qty'].'</td><td class="customtd">'.$sid['uom'].'</td><td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($sid['rate_per_unit']).'</td><td class="customtd">'.$sid['frequency'].'</td><td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($sid['annual_sale_value']).'</td>';
|
||||
if(isset($sid['margin_per'])){echo '<td class="customtd">'.$sid['margin_per'].'</td>'; }
|
||||
if(isset($sid['margin_per_uom'])){echo '<td class="customtd">'.$sid['margin_per_uom'].'</td>'; }
|
||||
echo '<td>'.($sid['other_sales_item'] != '' ? $sid['other_sales_item'] :$sid['sale_item']).'</td><td class="customtd">'.$sid['sales_qty'].'</td><td class="customtd">'.$sid['uom'].'</td><td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($sid['rate_per_unit']).'</td><td class="customtd">'.$sid['frequency'].'</td><td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($sid['annual_sale_value']).'</td>';
|
||||
if(isset($sid['margin_per'])){echo '<td class="customtd">'.($sid['margin_per'] != 0 ? $sid['margin_per'] : '-').'</td>'; }
|
||||
if(isset($sid['margin_per_uom'])){echo '<td class="customtd">'.($sid['margin_per_uom'] != 0? $sid['margin_per_uom'] : '-').'</td>'; }
|
||||
if(isset($sid['margin_final_value'])){echo '<td class="customtd">'.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($sid['margin_final_value']).'</td>'; }
|
||||
|
||||
echo '</tr>';
|
||||
@ -3100,7 +3114,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
|
||||
{
|
||||
echo '<p>As per person met, Purchase details were not shared, income calculated by Net magin percentage.</p>';
|
||||
echo '<p>As per person met, Purchase details were not shared, income calculated by Net margin percentage.</p>';
|
||||
}
|
||||
|
||||
|
||||
@ -3274,7 +3288,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<div id="page_break"></div>
|
||||
<h3 contenteditable="">Personal Assets</h3>
|
||||
<?php
|
||||
//print_r($otherAssetResult);
|
||||
//print_r($otherAssetResult);die();
|
||||
if(count($otherAssetResult)>0){ ?>
|
||||
<table class="scorecard_table">
|
||||
<thead>
|
||||
@ -3782,14 +3796,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
<!-- #################End Final Remarks Section#################-->
|
||||
|
||||
<div id="page_break"></div>
|
||||
|
||||
<!-- #################Annexure section start#################-->
|
||||
|
||||
<?php if($total_no_of_business > 0) {
|
||||
for($business_count = 0;$business_count < $total_no_of_business; $business_count++)
|
||||
{
|
||||
if(is_array($assessed_income_details) && count($assessed_income_details) && isset($assessed_income_details[ ($business_count+1) ] ))
|
||||
if(is_array($assessed_income_details) && count($assessed_income_details) && isset($assessed_income_details[ ($business_count+1) ] ) && count($ai_core_details['sales_items_by_monthwise']))
|
||||
{
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<p> Annexure A</p>';
|
||||
if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise']))
|
||||
{
|
||||
@ -3887,12 +3902,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
|
||||
|
||||
<div id="page_break"></div>
|
||||
|
||||
<?php
|
||||
|
||||
$show_detailed_scorecard = null;
|
||||
if($show_detailed_scorecard)
|
||||
{
|
||||
|
||||
echo '<div id="page_break"></div>';
|
||||
echo "<h3>Detailed Score Card Section</h3>" ;
|
||||
// *** General Section Questions Score Table
|
||||
echo '<table class="scorecard_table2">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user