PD REPORT QC VISHANT ISSUES FIXED

This commit is contained in:
velz 2019-05-25 09:29:20 +05:30
parent 65030cdc1a
commit 74eb3e1d51
11 changed files with 107 additions and 1617 deletions

View File

@ -180,6 +180,7 @@ $route['saveAssessedIncomeCalculateMode'] = 'PD_Controller/saveAssessedIncomeCal
$route['saveOtherBusinessIncome'] = 'PD_Controller/saveOtherBusinessIncome';
$route['savePDAdditionalRequiremets'] = 'PD_Controller/savePDAdditionalRequiremets';
$route['generatePDReport'] = 'PD_Controller/generatePDReport';
$route['generatePDReportPDF'] = 'PD_Controller/generatePDReportPDF';
$route['getLatestPDReportBlob'] = 'PD_Controller/getLatestPDReportBlob';
$route['saveNewVersionOfPDReport'] = 'PD_Controller/saveNewVersionOfPDReport';
$route['getListOfPDReportVersions'] = 'PD_Controller/getListOfPDReportVersions';

View File

@ -3922,6 +3922,7 @@ class PD_Controller extends REST_Controller {
$records = $this->post('records');
$pdid = $records['pd_id'];
$fk_createdby = $records['fk_createdby'];
$is_generate = isset($records['is_generate']) ? 1 : 0;
$is_qc_edited = 0;
$pd_master_details = $this->PD_Model->getPDMasterDetails($pdid);
@ -3993,6 +3994,7 @@ class PD_Controller extends REST_Controller {
}
else //If Qc not edited pull PDF uri from S3
{
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
if($singed_uri != null || $singed_uri != "" )
@ -4020,12 +4022,6 @@ class PD_Controller extends REST_Controller {
$records = $this->post('records');
$pdid = $records['pd_id'];
$fk_createdby = $records['fk_createdby'];
$original_template = "RAW";
$is_regenerate = 0;
if(isset($records['regenerate']))
{
$is_regenerate = 1;
}
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
@ -4086,12 +4082,12 @@ class PD_Controller extends REST_Controller {
}
$pd_report_time = date('Y-m-d-h-m-s');
$pd_report_store = APPPATH.'views/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
$is_write_done = file_put_contents($pd_report_store,$t);
$is_write_done = file_put_contents($pd_report_store,$temp);
if($is_write_done)
{
$update = $this->PD_Model->updateRecords(array('pd_report_html_filename' => $pd_report_time),PDTRIGGER,array('pd_id' => $pdid));
//$update = $this->PD_Model->updateRecords(array('pd_report_html_filename' => $pd_report_time),PDTRIGGER,array('pd_id' => $pdid));
$where_condition_array = array("pd_id" => $pdid);
$temp_array = array('is_original_report_created'=>1,'pd_report_html_filename' => $pd_report_time,'pd_report_generated_date' => date('Y-m-d h:m:s'));
@ -4106,7 +4102,7 @@ class PD_Controller extends REST_Controller {
}
else
{
$response_data['dataStatus'] = true;
$response_data['dataStatus'] = false;
$response_data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
$response_data['msg'] = 'Something went wrong..!';
$this->response($response_data,REST_Controller::HTTP_OK);
@ -4819,9 +4815,8 @@ class PD_Controller extends REST_Controller {
{
$business_score['business'] = ($score['business']);
$general_score['general'] = array_reverse($score['general']);
$logger = MYLOG::logFunction();
//print_r($business_score['business']);die();
$general_score['general'] = ($score['general']);
foreach($business_score['business'] as $bsk => $score)
{
if((!($bsk == 'cerificates')) && (!strcasecmp($score['answer'],'not applicable')))
@ -4829,11 +4824,22 @@ class PD_Controller extends REST_Controller {
unset($business_score['business'][$bsk]);
}
}
$business_score['business'] = array_reverse($business_score['business']);
// print_r($general_score['general']);
// print_r($business_score['business']);
// die();
foreach($general_score['general'] as $gsk => $g_score)
{
if(($gsk == 'neibourhood_check_as_per_pd_officer') && (!strcasecmp($g_score['answer'],'Could not verify')))
{
unset($general_score['general'][$gsk]);
}
}
$business_score['business'] = array_reverse($business_score['business']);
$general_score['general'] = array_reverse($general_score['general']);
// print_r($general_score['general']);
// print_r($business_score['business']);
// die();
$data = array();
$img_name = '';
@ -5000,7 +5006,7 @@ class PD_Controller extends REST_Controller {
//echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//echo $t;
echo $t; die();
if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) {
$dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE);

Binary file not shown.

View File

@ -114,7 +114,7 @@ class MYUTIL
break;
}
$data['year_and_month']= $value['business_years'] . ' Years';
$data['year_and_month'] .= isset($value['business_month']) ? ' and '.$value['business_month'] . ' Months': '';
$data['year_and_month'] .= isset($value['business_month']) && $value['business_month'] != "" ? ' and '.$value['business_month'] . ' Months': '';
$data['formed_on'] = $value['business_date_object'] ? date("d-m-Y", strtotime($value['business_date_object'])) : null;

View File

@ -4,6 +4,7 @@ class Otherfamilyform
{
public static function getFamilyDetails($values){
$mergeResult=array();
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
foreach($values as $fetchVal){
//print_r($fetchVal);die();
@ -31,7 +32,7 @@ public static function getFamilyDetails($values){
}
else if($tag['family_member_earning_status']==2){
$getFamilyEarning = 'Non-Earning';
$getFamilyOccupation = $tag['non_earning_occupation_master'];
$getFamilyOccupation = $tag['non_earning_occupation'] != 1 ? $tag['non_earning_occupation_master'] : $tag['non_earning_if_others'];
}
return array(
'name' => $tag['family_member_name'],

View File

@ -11,7 +11,7 @@ class PDSCORE
public static function genericDI($score_questions,$loan_amt_from_loam_form,$personal_asset_grid)
{
//print_r($score_questions);echo "###################";
//print_r($personal_asset_grid);die();echo "###################";
############ GENERIC SE-DI CASES #######################
############ SCROE VARIABLES DECLERATIONS ##############
@ -215,6 +215,8 @@ class PDSCORE
$asset_calculation_details['expected_value_of_assets'] = round($expected_value_of_assets,2);
//echo 'expected_value_of_assets--'.$expected_value_of_assets;
$actual_value_of_assets_percentage = ($actual_value_of_assets / $loan_amount) * 100;
$asset_calculation_details['actual_value_of_assets_percentage'] =
round($actual_value_of_assets_percentage,2);

View File

@ -31,7 +31,7 @@ public static function getStockManufacturingDetails($rawMaterial,$goods){
return array(
'type' => 'Finished Goods',
'name' => $tag['goods_name'],
'quantity' => strtoupper($tag['goods_observed'])=='YES' ? $tag['goods_quantity'] : '',
'quantity' => strtoupper($tag['goods_observed'])=='YES' ? ($tag['goods_quantity'] != "" ? $tag['goods_quantity'] : 'Could Not Verify') : '',
'uom' => strtoupper($tag['goods_observed'])=='YES' ? $getGUom : '',
'value' => strtoupper($tag['goods_observed'])=='YES' ? $tag['goods_value'] : '',
@ -51,7 +51,7 @@ public static function getStockRetailDetails($goods){
return array(
'type' => 'Trading Goods',
'name' => $tag['traded_goods_name'],
'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['traded_goods_quantity'] : '',
'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? ($tag['traded_goods_quantity'] != "" ? $tag['traded_goods_quantity'] : 'Could Not Verify') : '',
'uom' => strtoupper($tag['traded_goods_observed'])=='YES' ? $getUom : '',
'value' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['estimated_traded_goods_value'] : '',
'is_sufficiant' => (strtoupper($tag['traded_goods_observed'])=='YES') ? $getSufficient : ((strtoupper($tag['traded_goods_observed'])=='NO') ? $getSufficient : ''),
@ -71,7 +71,7 @@ public static function getStockWholesaleDetails($goods){
return array(
'name' => $tag['traded_goods_name'],
'type' => 'Trading Goods',
'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['traded_goods_quantity'] : '',
'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? ($tag['traded_goods_quantity'] != "" ? $tag['traded_goods_quantity'] : 'Could Not Verify') : '',
'uom' => strtoupper($tag['traded_goods_observed'])=='YES' ? $getUom : '',
'value' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['estimated_traded_goods_value'] : '',
'is_sufficiant' => (strtoupper($tag['traded_goods_observed'])=='YES') ? $getSufficient : ((strtoupper($tag['traded_goods_observed'])=='NO') ? $getSufficient : ''),

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 = 91.3;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 = 53.4;var url = 'http://localhost/sparqtest/api?'+score;var image_url = '/opt/lampp/htdocs/sparqtest/api/application/views/report_templates/chart.png';page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);});

View File

@ -1 +1 @@
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Other PD Parameters","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["Asset Value by Loan Amount% >>","Business Board Sighted >>","Neighbourhood check >>","Customer Behaviour >>","Approach to PD location >>","Comment on Locality >>","Qualification of Loan Applicants >>","Is person Met, a loan applicant >>","OTP authentication done >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,100,100,70,100,80,100,0,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = 'C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('C:/5.6/xampp/htdocs/AWSEC2/sparqapi/api/application/views/report_templates/dsc_general.png'); phantom.exit();};
var wpage = require('webpage').create();var Content = '<html><head><script src="https://cdn.zingchart.com/zingchart.min.js"></script><link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet"> <script>zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "ee6b7db5b51705a13dc2339db3edaf6d"];</script><style>#myChart-wrapper {margin: auto;}.zc-ref {display: none;}</style></head><body><div id="myChart"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div><script>var myConfig = {"type": "hbar","font-family": "Helvetica","title": {"text": "Other PD Parameters","font-family": "Arial","background-color": "none","font-color": "#00","font-size":"18px"},"plot": {"borderRadius": 8,"hover-state": {"visible": false},},"plotarea": {"margin": "60px 70px 20px 300px"},"scale-x": {"line-color": "","values": ["Asset Value by Loan Amount % >>","Business Board Sighted >>","Neighbourhood check >>","Customer Behaviour >>","Approach to PD location >>","Comment on Locality >>","Qualification of Loan Applicants >>","Is person Met, a loan applicant >>","OTP authentication done >>",],"tick": {"visible": false},"guide": {"visible": false},"item": {"font-size": "12px","padding-right": "0px","auto-align": true,"font-color": "#000"}},"scale-y": {"visible": false,"guide": {"visible": false}},"series": [ {"values": [100,100,0,0,70,70,60,100,100,],"bar-width": "25px","max-trackers": 0,"value-box": {"placement": "top","text": "%v%","decimals": 2,"font-color": "#000","font-size": "12px"},"rules": [{"rule": "%v <= 50","background-color": "#E53935"}, {"rule": "%v >= 50 && %i <= 70","background-color": "#ff9900"}, {"rule": "%v >= 70 && %i <= 80","background-color": "#99ff66"}, {"rule": "%v >= 80","background-color": "#33cc33"}]}]};zingchart.render({id: "myChart",data: myConfig,width: 800});</script></body></html>';var pageurl = '/opt/lampp/htdocs/sparqapi/api/application/views/report_templates/dsc.html'; wpage.viewportSize = { width: 810, height: 250 };wpage.setContent(Content, pageurl); wpage.onLoadFinished = function(status){wpage.render('/opt/lampp/htdocs/sparqtest/api/application/views/report_templates/dsc_general.png'); phantom.exit();};

File diff suppressed because one or more lines are too long

View File

@ -717,7 +717,7 @@ 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 = 'For ';
$end_use = '';
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'; }
@ -873,20 +873,31 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['business_peak_details']='The Business has no major changes in sales across season.';
}
$bindEachResult['company_employees'] = '';
// this is for no of employess details
if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) {
$bindEachResult['company_empployees']='As per person met there are no permanent';
}
else{
$bindEachResult['company_employees']='As per person met, there are '.$businessRow['employees_permanent'].' permanent ';
}
if(isset($businessRow['employees_temporary']) && $businessRow['employees_temporary'] > 0)
{
$bindEachResult['company_employees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.';
}else{
if(($businessRow['employees_permanent'] != "" || $businessRow['employees_permanent'] != 0) && ($businessRow['employees_temporary'] != "" || $businessRow['employees_temporary'] != 0)){
// this is for no of employess details
if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) {
$bindEachResult['company_empployees']='As per person met there are no permanent';
}
else{
$bindEachResult['company_employees']='As per person met, there are '.$businessRow['employees_permanent'].' permanent ';
}
$bindEachResult['company_employees'].= ' and no temporary employess with company';
if(isset($businessRow['employees_temporary']) && $businessRow['employees_temporary'] > 0){
$bindEachResult['company_employees'] .= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.';
}
else{
$bindEachResult['company_employees'].= ' and no temporary employess with company';
}
}
else //Both permanent and Temporary employess zero count
{
$bindEachResult['company_employees'].= ' There are no permanant and temporary employess with company';
}
if(isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0)
{
$emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee';
@ -1378,28 +1389,37 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindBusinessFinancial["company_name"] =MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
//$bindBusinessFinancial["company_name"] .= count($businessFinancialRow['date_per_financial'])>1 ? ' provided with last '.count($businessFinancialRow['date_per_financial']).' years of financial statements and the snapshot is as below :' : ' we were provided with last '.count($businessFinancialRow['date_per_financial']).' year of financial statements and the snapshot is as below :';
$bindBusinessFinancial["years_data_provided"] = count($businessFinancialRow['date_per_financial']);
$bindBusinessFinancial['is_statement']= 1;
$bindBusinessFinancial['statements']=FINANCIALFORM::getBusinessFinancialDetails($businessFinancialRow['date_per_financial']);
}
else {
$bindBusinessFinancial["company_name"] =MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1);
//$bindBusinessFinancial["company_name"] .=' not provided the financial statements :';
$bindBusinessFinancial["years_data_provided"] = 0;
$bindBusinessFinancial['statements']=array();
$bindBusinessFinancial['is_statement']= 0;
}
// customer
if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && (!isset($businessFinancialRow['estimated_value']))){
$bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
$bindBusinessFinancial['is_customer_statement'] = 0;
}
else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0){
else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0)
{
$bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :";
$bindBusinessFinancial['customer_statements']=FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['estimated_value']);
$bindBusinessFinancial['customer_statements_header']=FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['estimated_value']);
$bindBusinessFinancial['is_customer_statement'] = 1;
}
else {
echo
$bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are same as financial statement.";
$bindBusinessFinancial['customer_statements']=array();
$bindBusinessFinancial['customer_statements_header']=array();
$bindBusinessFinancial['is_customer_statement'] = 0;
}
$bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days'];
$bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days'];
@ -1450,13 +1470,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php if(count($businessFinancialResult)>0){
<?php
//print_r($businessFinancialResult);die();
if(count($businessFinancialResult)>0){
?>
<div id='page_break'></div>
<h3>Financial Information</h3>
<?php foreach($businessFinancialResult as $iterateFinance){
if($iterateFinance['is_statement'])
{
if(count($iterateFinance['statements'])>0){
?>
<p><?php echo "<strong>Company / Firm Name : </strong>" . $iterateFinance['company_name']; ?></p>
@ -1507,12 +1532,19 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}else { echo '<td style="text-align:center;">NA</td>';}}?> </tr>
</tbody>
</table>
<?php } ?>
<?php }
}
else{ echo "<p>As per Loan Applicant(s) met, the financials statements were not provided. </p>";}
?>
<!-- customer finance statements-->
<p><?php echo $iterateFinance['financial_customer']; ?></p>
<?php if(count($iterateFinance['customer_statements'])>0){
<p><?php echo $iterateFinance['financial_customer']; ?></p>
<?php
if($iterateFinance['is_customer_statement'])
{
if(count($iterateFinance['customer_statements'])>0){
//print_r($iterateFinance['customer_statements']);die();
?>
@ -1529,25 +1561,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(!strcasecmp($csRow['estimate_net_margin_availablity'],'yes')){
?>
<tr>
<td>Sales / Revenue (Rs)</td> <td><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_from']) ?></td><td><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_to']) ?></td><td><?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 %</td> <td><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_from']).'%' ?></td><td><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_to']).'%' ?></td><td <?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 %</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) (Rs) >>>></td> <td <?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>
<td colspan=3>Net Profit / (Net Loss) (Rs) >>>></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>
</tr>
<?php }else{ ?>
<tr>
<td>Sales / Revenue (Rs)</td> <td><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_from']) ?></td><td><?php echo MYUTIL:: customIndianNumberFormat($csRow['estimate_sales_to']) ?></td><td><?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><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_from']) ?></td><td><?php echo MYUTIL:: customIndianNumberFormat($csRow['net_profit_loss_sales_per_to']) ?></td><td <?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 <?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>
<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>
</tr>
<?php } ?>
@ -1555,7 +1587,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</table>
<?php } ?>
<?php } ?>
<?php }
}else { echo "<p> As per Loan Applicant(s) met, the financials figures were not provided. </p>"; }
?>
<?php } ?>
<p><strong>Working Capital Cycle:</strong></p>
@ -2019,16 +2053,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php
//die();
$stockResult=array();
$stRow = $pd_processed_forms[11][$business_count];
$stockRow = json_decode($stRow['processed_json'],true);
//print_r($stockRow);
//print_r($stockRow);die();
$stock_remarks = $stockRow['stock_remarks'];
$is_stock_sufficient_enough = $stockRow['is_sufficiant_finished_and_traded_goods'];
$is_stock_sufficient_enough_remarks = $stockRow['finished_and_traded_goods_remarks'];
$is_raw_materials_sufficient_enough = null;
$is_raw_materials_sufficient_enough_remarks = null;
$bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details
if(count($stockRow['manufacturing_details'] && (count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) > 0 || count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0))){
$is_raw_materials_sufficient_enough = $stockRow['manufacturing_details'][0]['is_sufficiant_raw'];
$is_raw_materials_sufficient_enough_remarks = $stockRow['manufacturing_details'][0]['rawmaterial_remarks'];
$bindStockResult["manufacturing"]=Stockform::getStockManufacturingDetails($stockRow['manufacturing_details'][0]['manufacturing_raw_materials'], $stockRow['manufacturing_details'][0]['manufacturing_finished_goods']);
//print_r($bindStockResult["manufacturing"]);
}
@ -2138,6 +2177,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p style="text-align:justify;">Considering the size of operations, the stock of finished goods maintained is sufficient as per the PD Officers observations.</p>';
}else if(!strcasecmp($is_stock_sufficient_enough,'no')){
echo '<p style="text-align:justify;">Considering the size of operations, the stock of finished goods maintained is not sufficient as per the PD Officers observations.</p>';
echo '<p style="text-align:justify;">'. $is_stock_sufficient_enough_remarks.'</p>';
}
if(!strcasecmp($is_raw_materials_sufficient_enough,'yes'))
{
@ -2145,7 +2185,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}else if(!strcasecmp($is_raw_materials_sufficient_enough,'no'))
{
echo '<p style="text-align:justify;">Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officers observations.</p>';
echo '<p style="text-align:justify;">'. $is_raw_materials_sufficient_enough_remarks.'</p>';
}
echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
$stock_photo_count = $pd_images[11];
// echo count($pd_images[11]);
// die();
@ -2644,7 +2686,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$familyResult=array();
foreach($pd_processed_forms[6] as $rowKey=> $fRow) {
$familyRow = json_decode($fRow['processed_json'],true);
//print_r($familyRow);die();
// print_r($familyRow);die();
if(array_key_exists('family_details',$familyRow) && count($familyRow['family_details'])>0){
$familyResult=OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details']);
}
@ -2879,14 +2921,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</td>
<td style="padding-left:50px;">
<div id="first_div" style="border-color:red;color:red;">Others mentioned as below</div> <div id="tick_div_other" style="border-color:red;color:red;"><?php if($other_behaviour){ echo $tick_mark; } ?></div>
<div id="first_div" style="border-color:red;color:red;">Others*</div> <div id="tick_div" style="border-color:red;color:red;"><?php if($other_behaviour){ echo $tick_mark; } ?></div>
</td>
</tr>
</table>
<?php if($other_behaviour){
echo "Behaviour Details : ".$other_behaviour_remarks;
echo "*".$other_behaviour_remarks;
}?>
<br>