PD REPORT FEEDBACKS

This commit is contained in:
Velz2020 2019-07-22 17:34:18 +05:30
parent bea3ec2815
commit 73e42bdf6e
7 changed files with 177 additions and 67 deletions

View File

@ -567,6 +567,9 @@ defined('PDMIS') OR define('PDMIS','PD_MIS');
defined('USERNOTIFICATIONTOKENS') OR define('USERNOTIFICATIONTOKENS','m_user_notification_tokens');
defined('USERNOTIFICATIONTOKENSID') OR define('USERNOTIFICATIONTOKENSID','notification_token_id');
defined('T_PD_INLINE_PHOTO_FORM_STATUS') OR define('T_PD_INLINE_PHOTO_FORM_STATUS','t_pd_inline_photo_form_status');

View File

@ -1998,7 +1998,7 @@ class PD_Controller extends REST_Controller {
$temp_base64_string = $image['pd_document_name'];
$title = $image['pd_document_title'];
$output_file = APPPATH."/docs/temp_base64_image.png";
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
//Generate Random File Name
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@ -2007,7 +2007,7 @@ class PD_Controller extends REST_Controller {
for ($i = 0; $i < 5; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.png';
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.jpeg';
$ifp = fopen( $output_file, 'wb' );
@ -2097,7 +2097,7 @@ class PD_Controller extends REST_Controller {
$temp_base64_string = $image['pd_document_name'];
$title = $image['pd_document_title'];
$output_file = APPPATH."/docs/temp_base64_image.png";
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
//Generate Random File Name
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@ -2106,7 +2106,7 @@ class PD_Controller extends REST_Controller {
for ($i = 0; $i < 5; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.png';
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.jpeg';
$ifp = fopen( $output_file, 'wb' );
@ -2210,6 +2210,10 @@ class PD_Controller extends REST_Controller {
$parent_form_index = null;
$parent_forms = $this->config->item('parent_forms');
$additional_pd_id = $pdid;
$inline_forms_photo_status_check = $this->PD_Model->selectCustomRecords(array('*'),array('fk_pd_id' => $pdid),T_PD_INLINE_PHOTO_FORM_STATUS);
// print_r($inline_forms_photo_status_check);
// echo count($inline_forms_photo_status_check);
if($pdid != $parent_pdid)
{
@ -2229,11 +2233,20 @@ class PD_Controller extends REST_Controller {
if($formid == 18)
{
$records = $this->saveCoApplicantsFromGeneralInfoForm($records);
if(!count($inline_forms_photo_status_check))
{
// $records = INLINEPHOTOTRANSFORM::retransformGeneralFormInlinePhotos($records);
// //update general form photos saved once
// $this->PD_Model->saveRecords(array('fk_pd_id' => $pdid,'is_general_photo_saved' => 1),T_PD_INLINE_PHOTO_FORM_STATUS);
}
$records = INLINEPHOTOTRANSFORM::retransformGeneralFormInlinePhotos($records);
}
if($formid == 10)
{
$this->updateSubProductFromLoanDetailsForm($records);
@ -2243,7 +2256,12 @@ class PD_Controller extends REST_Controller {
if($formid == 13)
{
$this->saveEmpSalaryAsBusinessExpensesFromBusinessForm($records);
$records = INLINEPHOTOTRANSFORM::retransformBusinessFormInlinePhotos($records);
if(count($inline_forms_photo_status_check) && $inline_forms_photo_status_check[0]['is_business_photo_saved'] != 1)
{
$records = INLINEPHOTOTRANSFORM::retransformBusinessFormInlinePhotos($records);
$this->PD_Model->saveRecords(array('fk_pd_id' => $pdid,'is_business_photo_saved' => 1),T_PD_INLINE_PHOTO_FORM_STATUS);
}
}
if($formid == 22)
@ -4193,9 +4211,9 @@ class PD_Controller extends REST_Controller {
$temp_path = $main_applicant_name.'_'.$pdid.'_'.'pd_images.zip';
$this->zip->archive(APPPATH.'docs/zip/'.$temp_path);
$this->zip->archive(APPPATH.'docs/'.$temp_path);
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>(APPPATH.'docs/zip/'.$temp_path));
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>(APPPATH.'docs/'.$temp_path));
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
//print_r($s3result);
@ -4205,7 +4223,7 @@ class PD_Controller extends REST_Controller {
$where_condition_array = array("pd_id" => $pdid);
$temp_array['is_zip_created'] = 1;
$id = $this->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
- unlink(APPPATH.'docs/zip/'.$temp_path);
- unlink(APPPATH.'docs/'.$temp_path);
}
@ -6169,7 +6187,7 @@ class PD_Controller extends REST_Controller {
$temp_base64_string = $doc['image'];
$title = $doc['Name'];
$is_show_report = isset($doc['is_show_report']) ? $doc['is_show_report'] : null;
$output_file = APPPATH."/docs/temp_base64_image.png";
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
//Generate Random File Name
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@ -6178,7 +6196,7 @@ class PD_Controller extends REST_Controller {
for ($i = 0; $i < 5; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.png';
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.jpeg';
$ifp = fopen( $output_file, 'wb' );
@ -6200,7 +6218,7 @@ class PD_Controller extends REST_Controller {
imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext);
imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a'));
imagepng($imagetobewatermark,$output_file);//save as png file in ouputfile location
imagejpeg($imagetobewatermark,$output_file);//save as png file in ouputfile location
//################# end img water marking with text
@ -6212,7 +6230,7 @@ class PD_Controller extends REST_Controller {
// imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool
imagecopyresized ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 );
imagepng($curret_file,$output_file);// save png image in specified location
imagejpeg($curret_file,$output_file);// save png image in specified location
//###########end of image water marking with logo
$tempdoc = $output_file;
@ -7632,7 +7650,7 @@ class PD_Controller extends REST_Controller {
$records = $this->post('records');
$pd_details = $this->PD_Model->getPDMasterDetails($records['fk_pd_id']);
$output_file = APPPATH."/docs/temp_base64_image.png";
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
$temp_file_name = $records['pd_document_name'];
$ifp = fopen( $output_file, 'wb' );

Binary file not shown.

View File

@ -18,7 +18,7 @@ class AssessedIncome
$gross_profit_loss_row = '<tr> <td>c. Gross Profit / Loss(a-b)</td>';
$gross_profit_loss_per_row = '<tr> <td>d. Gross Profit / Loss %</td>';
$business_expense_row = '<tr> <td>e. Business Expenses </td>';
$net_profit_loss_row = '<tr> <td>f. Net Profit / Loss(c-d) </td>';
$net_profit_loss_row = '<tr> <td>f. Net Profit / Loss(c-e) </td>';
$house_hold_expense_row = '<tr> <td>g. Household Expenses </td>';
$disposable_income_row = '<tr> <td>h. Disposable Income</td>';
$net_margin_row = '<tr> <td>h. Net Margin % </td>';
@ -209,7 +209,8 @@ class AssessedIncome
$sales_item_wise_header_row = "<tr> <th>Product/Services</th> <th>Sale Qty</th> <th>UOM</th> <th>Rate/Unit or Value of Sale</th> <th>Frequency</th> <th>Annual Sales</th>";
if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2)
{
$sales_item_wise_header_row .= "<th>Gross Margin %</th><th>Margin Amount</th><th>Gross Profit</th>";
//$sales_item_wise_header_row .= "<th>Gross Margin %</th><th>Margin Amount</th><th>Gross Profit</th>";
$sales_item_wise_header_row .= "<th>Gross Margin %</th><th>Gross Profit</th>";
}
foreach($ai_core_details['sales_calculated_by_itemwise'] as $itemwise)
{

View File

@ -5,6 +5,7 @@ class INLINEPHOTOTRANSFORM
public static function retransformGeneralFormInlinePhotos($records)
{
if(isset($records['individuals']) && count($records['individuals']))
{
@ -23,9 +24,9 @@ class INLINEPHOTOTRANSFORM
$records['individuals'][$key]['is_person_met_id_proof'] = $base64;
}
}
return $records;
}
return $records;
}
@ -128,7 +129,7 @@ class INLINEPHOTOTRANSFORM
$temp_base64_string = $base64;
$title = $doc_name;
$output_file = APPPATH."/docs/temp_base64_image.png";
$output_file = APPPATH."/docs/temp_base64_image.jpeg";
//Generate Random File Name
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@ -137,7 +138,7 @@ class INLINEPHOTOTRANSFORM
for ($i = 0; $i < 5; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.png';
$temp_file_name = $randomString.date('Y-m-d-H:i:s').'.jpeg';
$ifp = fopen( $output_file, 'wb' );
@ -156,8 +157,8 @@ class INLINEPHOTOTRANSFORM
imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext);
imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'DateB: '.date('Y-m-d h:i:s a'));
imagepng($imagetobewatermark,$output_file);//save as png file in ouputfile location
imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a'));
imagejpeg($imagetobewatermark,$output_file);//save as png file in ouputfile location
//################# end img water marking with text
//###########image water marking with logo
@ -168,7 +169,7 @@ class INLINEPHOTOTRANSFORM
// imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool
imagecopyresized ( $curret_file , $pd_logo , 5 , ($y - 54) , 0 , 0 , 50 , 50 , 50 , 54 );
imagepng($curret_file,$output_file);// save png image in specified location
imagejpeg($curret_file,$output_file);// save png image in specified location
//###########end of image water marking with logo

View File

@ -484,6 +484,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<tr> <td style="text-align:left;">As Per Loan Applicants during PD</td> <td> </td><td> </td><td> </td> <td><span style="font-family: DejaVu Sans; sans-serif;font-size:10px"></span>' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '<br><span style="font-size:10px;">('. MYUTIL::numtowords($loan_form['loan_amount']) .')</span></td> </tr></table>';
//echo "<div class='page_break'></div>";
echo "<br><br>";
if($pd_master_details[0]['lender_short_name'] == 'CLIX')
{
echo '<p>Disclaimer: The information contained in this report (a) is provided for the benefit of Clix Capital Services Private Limited (hereinafter referred to as Clix) only, and is not for the benefit of any other parties; (b) has been compiled by Sineedge Consulting Private Limited (Hereinafter referred as SCPL) in accordance with the instructions given, by Clix; (c) has been obtained during the visit done at premises as instructed by Clix. Some of the information in this report, by the very nature of it, might have been obtained through informal sources. SCPL wishes to mention that all due care has been exercised by SCPL in collecting information and putting together this report. However, given the nature of some of these verifications, SCPL cannot be held liable for any financial or other loss to Clix on account of any errors or omissions in the report. SCPL does not guarantee absolute accuracy of information contained herein. SCPL does not take any responsibility for any action(s) that the client may take based on the contents of this report.</p>';
}
?>
@ -563,26 +568,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['relations'] = $company_relationship_data;
array_push($person_met_data,$temp_person_met);
//echo $company_relationship_data;
//echo substr_replace($company_relationship_data, '<br><center></center><br>', strrpos($company_relationship_data, '<br><center>and</center><br>'),strlen($company_relationship_data));
//echo '<hr>';
}
}
//print_r($person_met_data);
// echo '<table class="scorecard_table">';
// echo '<thead> <tr> <th>Name</th> <th>Photo</th> <th>ID Proof</th> <th>Relationships</th></tr> </thead>';
// echo '<tbody>';
// foreach($person_met_data as $person)
// {
// echo '<tr><td>'.$person['name'].'</td><td>'.'<img src='.$person['photo'].' width="100px" height="100px" alt="NA"/>'.'</td><td>'.'<img src='.$person['id_proof'].' width="100px" height="100px" alt="NA"/>'.'</td><td>'.$person['relations'].'</td></tr>';
// }
// echo '</tbody>';
// echo '</table>';
echo '<div id="page_break"></div>';
echo '<p><strong>Person(s) Met:</strong> </p>';
@ -653,7 +643,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table">
<tr> <th>Name</th> <th>Age<br>(Yrs)</th> <th>Qualification</th> <th>Relationships</th> </tr>
<tr> <th>Name</th> <th>Age<br>(Yrs/Mns)</th> <th>Qualification / Type of Entity</th> <th>Relationships</th> </tr>
<tbody>
<?php
@ -724,6 +714,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "</td></tr>";
}
}
if(isset($general_form['companies']) && count($general_form['companies']))
{
$business_entity_type_master = array(1 => 'Others', 2 => 'Public Ltd Company', 3 => 'Sole proprietorship', 4 => 'HUF (Hindu Undivided Family)', 5 => 'Partnership',6 => 'Cooperative',7 => 'Limited Liability Partnership(LLP)',8 => 'OPC (One Person Company)',9 => 'Society',10 => 'Trust',11 => 'Private Limited Company');
foreach ($general_form['companies'] as $comp_key => $ind_company) {
echo '<tr><td class="customtd">'. $ind_company['company_name'] .'</td><td class="customtd">'. $ind_company['business_years']. (isset($ind_company['business_month']) ? ' . ' . $ind_company['business_month']: null) .'</td><td class="customtd">'. ( $ind_company['business_entity_type'] == 1 ? $ind_company['business_entity_type_other'] : $business_entity_type_master[ $ind_company['business_entity_type'] ] ).'</td><td class="customtd"> Not Applicable </td></tr>';
}
}
?>
</tbody>
</table>
@ -937,7 +935,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
foreach ($address_images as $address_image_key => $address_image_value) {
if($address_image_value['is_show_report'] == 1)
{
$pd_location_approach_img_url = isset($address_image_value['doc_url']) ? $address_image_value['doc_url']: 'https://www.bigblue.co.za/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/n/o/not-captured.jpg';
$pd_location_approach_img_url = isset($address_image_value['doc_url']) ? $address_image_value['doc_url']: '';
//$pd_location_approach_img_location = $address_image_value['location'];
//$pd_location_approach_img_date = date('Y/m/d h:s:i A',$address_image_value['createdon']);
break;
@ -1006,9 +1004,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</thead>
<tr><td>
<img border="3" src ="<?php echo $pd_location_approach_img_url;?>" style="width:50%;height:300px;border-color:#0191ed" alt=""/>
<img border="3" src ="<?php echo $pd_location_approach_img_url;?>" style="width:50%;height:300px;border-color:#0191ed" alt="Location Approach Image Not Available"/>
</td><td>
<img border="3" src ="<?php echo $name_board_seen_img_url;?>" alt="Name Board" style="width:50%;height:300px;border-color:#0191ed" /> </td>
<img border="3" src ="<?php echo $name_board_seen_img_url;?>" alt="Name Board" style="width:50%;height:300px;border-color:#0191ed" alt="Name Board Seen Image Not Available"/> </td>
</tr>
<tr> <td><?php echo $pd_location_approach_img_location .'<br>'.$pd_location_approach_img_date; ?></td> <td> </td> </tr>
</table>
@ -1046,8 +1044,64 @@ defined('BASEPATH') OR exit('No direct script access allowed');
else{
echo '<li><span class="tooltip">No business activity was seen during the PD visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></span></li>';
}
if(isset($business_assets_details['business_pd_visited_remark']) && $business_assets_details['business_pd_visited_remark'] != ""){
echo '<li><span class="tooltip">'.$business_assets_details['business_pd_visited_remark'] .'<span class="tooltiptext">Business Assest Form - Busienss Assest Form Remarks </span></span></li>';}
if(isset($business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark']) && $business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] != ""){
echo '<li><span class="tooltip">'.$business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] .'<span class="tooltiptext">Business Assest Form - Busienss Assest Form Remarks </span></span></li>';}
if(isset($final_remark_data['is_competition']))
{
if($final_remark_data['is_competition'] == 'yes')
{
echo '<li>'.$final_remark_data['appx_outlet_or_stores'].' Units with similar business were sighted in the locality</li>';
}
else
{
echo '<li>PD officer did not observe any similar business units in the locality.</li>';
}
}
if(isset($final_remark_data['demolition_activity']))
{
if($final_remark_data['demolition_activity'] == 'yes')
{
echo '<li>'.$final_remark_data['comment_of_demolition_activity'] .'</li>';
echo '<br><img border="3" src ="'. $final_remark_data['demolition_activity_pic'] .'" style="width:50%;height:200px;border-color:#0191ed" alt="Demolition Image Not Available"/>';
}
else
{
echo '<li>No demolition activity was observed in the locality.</li>';
}
}
if(isset($final_remark_data['sealing_activity']))
{
if($final_remark_data['sealing_activity'] == 'yes')
{
echo '<li>'.$final_remark_data['comment_of_sealing_activity'] .'</li>';
echo '<br><img border="3" src ="'. $final_remark_data['sealing_activity_pic'] .'" style="width:50%;height:200px;border-color:#0191ed" alt="Demolition Image Not Available"/>';
}
else
{
echo '<li>No sealing activity was observed in the locality.</li>';
}
}
if(isset($final_remark_data['outlet_location']))
{
if($final_remark_data['sealing_activity'] == 'heavy_footfall')
{
echo '<li>Heavy Footfall ( Lots of customer in the locality / market place )</li>';
}
else if($final_remark_data['sealing_activity'] == 'medium_footfall')
{
echo '<li>Medium Footfall ( Meduim no of customer in the locality / market place )</li>';
}
else if($final_remark_data['sealing_activity'] == 'low_footfall')
{
echo '<li>LOw Footfall ( Few customer in the locality / market place )</li>';
}
}
echo "</ul>";
if($address_form['address_form_remark'])
@ -1088,17 +1142,27 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months');
$end_use = '';
$to_remove_for = false;
foreach($loan_form['end_use_master'] as $enduse)
{
if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';}else{ $end_use.=$loan_form['end_use_other'].' and'; }
if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';}
else {
$to_remove_for = true;
$end_use.=$loan_form['end_use_other'].' and';
}
}
$end_use = substr_replace($end_use, '', strrpos($end_use, 'and'),strlen($end_use));
//echo substr($end_use,0,3);
if(strcasecmp(substr($end_use,0,3),'for'))
{
$end_use = 'For '.$end_use;
}
if(strcasecmp(substr($end_use,0,3),'for'))
{
if(!(count($loan_form['end_use_master']) == 1 && $to_remove_for))
{
$end_use = 'For '.$end_use;
}
}
$loan_table_dispaly_rows[] = array('particulars' => 'Loan Purpose','details' => $end_use);
@ -1116,7 +1180,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
else{
//echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab);
//echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab); die();
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']).')' );
@ -1299,6 +1363,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['company_employees']= 'As per loan applicant met, there are no permanent or temporary employees with the company<span contenteditable="true">.</span>';
}
if(isset($businessRow['employees_appx_salary']) && $businessRow['employees_appx_salary'] != "")
{
$bindEachResult['employees_appx_salary'] = 'Approximately '.$rupee_symbol.' '.$businessRow['employees_appx_salary']. 'is being paid as salary to employees';
}
if(isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0)
{
$emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee';
@ -1709,11 +1777,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<!-- start company employee details -->
<p><?php echo $fetchRow['company_employees'];?></p>
<p><?php if(isset($fetchRow['employees_appx_salary']) && $fetchRow['employees_appx_salary'] != "") { echo $fetchRow['employees_appx_salary']; }?></p>
<p><?php echo $fetchRow['officer_visit_company_employees'];?></p>
<!-- end company employee details -->
<!-- start documents details -->
<?php if(count($fetchRow['visit_documents'])){
<?php if(count($fetchRow['visit_documents'])) {
//print_r($fetchRow['visit_documents']);
?>
@ -1854,7 +1923,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
$baRow = $pd_processed_forms[14][$business_count];
$businessFinancialRow = json_decode($baRow['processed_json'],true);
//print_r($businessFinancialRow);die();
//print_r($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']);die();
$financial_remarks = $businessFinancialRow['financial_remarks'];
//echo $financial_remarks;die();
// statementdate_per_financial
@ -1934,9 +2003,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
}
$bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null;
$bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null;
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
array_push($businessFinancialResult,$bindBusinessFinancial);
@ -2006,6 +2075,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tbody>
</table>
<?php }
}
else{ echo "<p>Financials statements not provided by Loan Applicants to PD officer. </p>";}
?>
@ -2055,11 +2126,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</thead>
<tbody>
<tr>
<td>Sales / Revenue (Rs)</td> <td class="customtd"><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_from']) ?></td><td class="customtd"><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_to']) ?></td><td class="customtd"><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_average']) ?></td>
<td>Sales / Revenue (Rs)</td> <td class="customtd"><?php echo MYUTIL::customIndianNumberFormat($csRow['estimate_sales_from']) ?></td><td class="customtd"><?php echo MYUTIL::customIndianNumberFormat($csRow['estimate_sales_to']) ?></td><td class="customtd"><?php echo MYUTIL::customIndianNumberFormat($csRow['estimate_sales_average']) ?></td>
</tr>
<tr>
<td>Net Profit or (Net Loss) to Sales (Rs) </td> <td class="customtd"><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_from']) ?></td><td class="customtd"><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_to']) ?></td><td class="customtd" <?php echo $csRow['estimate_profit_or_loss']? "style='color:green'" : "style='color:green'";?> ><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_final_per']) ?></td>
<td>Net Profit or (Net Loss) to Sales (Rs) </td> <td class="customtd"><?php echo MYUTIL::customIndianNumberFormat($csRow['net_profit_loss_sales_per_from']) ?></td><td class="customtd"><?php echo MYUTIL::customIndianNumberFormat($csRow['net_profit_loss_sales_per_to']) ?></td><td class="customtd" <?php echo $csRow['estimate_profit_or_loss']? "style='color:green'" : "style='color:green'";?> ><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_final_per']) ?></td>
</tr>
<tr>
<td colspan=3> Net Profit / (Net Loss)% >>>> </td> <td class="customtd" <?php echo $csRow['estimate_profit_or_loss'] ? "style='color:green'" : "style='color:green'";?> ><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_final_rs']).'%' ?></td>
@ -2069,8 +2140,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tbody>
</table>
<?php } ?>
<?php
if($iterateFinance['estimate_posmachine_or_cc_annual_sales'] != null)
{
echo '<p>As per Loan Applicant(s) met,'. $rupee_symbol . ' '. MYUTIL:: customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) .' as Annual sales through credit cards / POS machines.</p>';
};
} ?>
<?php }
}//else { echo "<p> As per Loan Applicant(s) met, the financials figures were not provided. </p>"; }
?>
@ -2138,7 +2216,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php
//print_r($bankingResult);
if(count($bankingResult)>0){ ?>
<h3 contenteditable="true">Business Banking:</h3>
@ -2469,13 +2547,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplierRow = json_decode($supplier_details['processed_json'],true);
$supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : '');
$company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
$company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
//$supplierResult['company_name'] = $company_name;
$total_no_of_suppliers = 0;
$total_payments_percent_on_credit_for_supplier = 0;
foreach($supplierRow['manufacturing_details'] as $manuRow){
$total_payments_percent_on_credit_for_supplier = $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
$total_payments_percent_on_credit_for_supplier += $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
if(isset($manuRow['main_raw_materials'])){
@ -2538,7 +2617,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$total_payments_percent_on_credit_for_supplier = $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
$total_payments_percent_on_credit_for_supplier += $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
$temp['supplier_first_row'] = '<tr><td class="customtd">1</td><td class="customtd_leftalign">Item Purchased </td>'.'<td class="customtd">'.$tradeRow['trade_product_name'].'</td></tr>';
@ -2673,7 +2752,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if($total_payments_percent_on_credit_for_supplier > 0)
{
echo "<p>Have to make payment of about ". $total_payments_percent_on_credit_for_supplier ." % in advance rest on delivery.</p>";
//$company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1);
echo "<p>Out of total purchases done by ". $company_name_for_supplier_form_dispaly .", ". $total_payments_percent_on_credit_for_supplier ." % is done on credit in advance rest on delivery.</p>";
}
}
@ -3100,7 +3180,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<tr>';
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_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>';
@ -3677,6 +3757,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div>
<ul>
<?php
if(isset($final_remark_data['market_intelligence']) && $final_remark_data['market_intelligence'] != '')
{
echo '<li>Personal feedback or market intelligence on the case (if any):</li>';
echo '<br>'.$final_remark_data['market_intelligence'];
}
?>
<li>Customer Behaviour: </li>
<br><br>

View File

@ -6,7 +6,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php
$address_type_remarks_caption = array('well_suited' => 'well suited','fairly_suited' => 'fairly suited','not_suited' => 'not suited');
$show_detailed_scorecard = 1;
if($show_detailed_scorecard)
{
@ -113,7 +113,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br>';
echo "<table border="2">";
echo '<table border="2">';
echo "<tr> <th>Business Certificates</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>";
$index = 0;
// print_r($certificates);