REPORT CHANGES AND OTHeR CHANGES

This commit is contained in:
Velz2020 2019-09-23 19:53:00 +05:30
parent d92957fd9f
commit 569ecb18f5
4 changed files with 78 additions and 38 deletions

View File

@ -2390,8 +2390,8 @@ public function assignPDTempalate($data)
$log_info_array['pdid'] = $pdid;
$log_info_array['formid'] = $formid;
$log_info_array['payload_size'] = (int) $_SERVER['CONTENT_LENGTH'];
$log_info_array['payload_data'] = $records;
$logger->info("SAVE FORM JSON FUNCTION CALLED - ENV (".ENVIRONMENT.")",$log_info_array);
$log_info_array['payload_data'] = json_encode($records);
$logger->info("SAVE FORM JSON FUNCTION CALLED - ENV (".ENVIRONMENT.")",$log_info_array);//die();
///die();
//$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);
@ -2751,6 +2751,8 @@ public function getPDFormDetailsJSON_post()
//print_r($result_data);
foreach($temp_rec['individuals'] as $g_key => $g_value)
{
//print_r( $g_value);
if($g_value['is_person_met'] == true)
{
@ -2776,6 +2778,11 @@ public function getPDFormDetailsJSON_post()
}
}
}
else
{
$temp_rec['individuals'][$g_key]['is_person_met_id_proof'] = "";
$temp_rec['individuals'][$g_key]['is_person_met_pic'] = "";
}
}
//print_r($temp_rec);die();
$rec[0]['json'] = json_encode($temp_rec);
@ -5760,6 +5767,15 @@ public function getPDFormDetailsJSON_post()
{
mkdir($this->external_path.'/pd_reports/'.$pdid,0761);
}
//$this->load->helper('DIFFCHECK');
// $old_version = $this->external_path.'/pd_reports/'.$pdid.'/a.html';
// $new_version = $this->external_path.'/pd_reports/'.$pdid.'/b.html';
// DIFFCHECK::checkDiff($old_version,$new_version);
//xdiff_file_diff($old_version, $new_version, $this->external_path.'/pd_reports/'.$pdid.'/my_script.diff', 2);
//die();
// $this->getSatelliteImage($pdid);die();
// for($i = 900;$i <= 1500;$i++)
// {
@ -8855,7 +8871,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
$records = $this->post('records');
$lender_contact_persons = $this->PD_Model->getLenderContactPersons($records['fk_lender_id'],$records['pd_branch_id']);
$lender_contact_persons = $this->PD_Model->getLenderContactPersons($records['fk_lender_id'],isset($records['pd_branch_id']) ? $records['pd_branch_id'] : null );
if(count($lender_contact_persons))
{
$data['dataStatus'] = true;

View File

@ -874,28 +874,20 @@ class PD_Model extends SPARQ_Model {
if($result_array[0]['fk_state'] == "" || $result_array[0]['fk_state'] == null){ $mandatory_fields[] = 'fk_state'; }
if($result_array[0]['pincode'] == "" || $result_array[0]['pincode'] == null){ $mandatory_fields[] = 'pincode'; }
if($result_array[0]['lender_short_name'] != 'IMGC')
{
}
if($result_array[0]['pd_contact_person'] == "" || $result_array[0]['pd_contact_person'] == null){
if($result_array[0]['lender_credit_person'] == "" || $result_array[0]['lender_credit_person'] == null)
if($result_array[0]['lender_credit_person'] == "" || $result_array[0]['lender_credit_person'] == null)
{
$mandatory_fields[] = 'pd_contact_person';
$mandatory_fields[] = 'lender_credit_person';
}
}
if($result_array[0]['pd_contact_landline'] == "" || $result_array[0]['pd_contact_landline'] == null)
{
if($result_array[0]['pd_contact_mobileno'] == "" || $result_array[0]['pd_contact_mobileno'] == null)
{
$mandatory_fields[] = 'pd_contact_mobileno';
}
// if($result_array[0]['pd_contact_landline'] == "" || $result_array[0]['pd_contact_landline'] == null)
// {
// if($result_array[0]['pd_contact_mobileno'] == "" || $result_array[0]['pd_contact_mobileno'] == null)
// {
// $mandatory_fields[] = 'pd_contact_mobileno';
// }
}
// }
if($result_array[0]['fk_address_id'] == "" || $result_array[0]['fk_address_id'] == null)

View File

@ -690,7 +690,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
foreach($general_form['individuals'] as $ind_key => $individual)
{
if($individual['is_applicant'] == true)
if($individual['is_applicant'] == true && $individual['is_active'] == true)
{
$education_qualification = $individual['qualification_master'];
@ -1352,7 +1352,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['total_per_of_export'] = $businessRow['export_sale_of_total_sales'];
$bindEachResult['applicant_use_mobile_wallets'] = $businessRow['applicant_use_mobile_wallets'];
$bindEachResult['applicant_use_pos_machines'] = $businessRow['applicant_use_pos_machines'];
$bindEachResult['applicant_use_pos_machines'] = $businessRow['applicant_use_pos_machines'];
//$bindEachResult['applicant_use_pos_machines'] = $businessRow['applicant_use_pos_machines'];
$bindEachResult['pos_machines_details'] = isset($businessRow['pos_machines_details']) ? $businessRow['pos_machines_details']: null;
$bindEachResult['no_of_pos_machines'] = isset($businessRow['no_of_pos_machines']) ? $businessRow['no_of_pos_machines'] : null;
@ -2993,6 +2993,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$is_stock_sufficient_enough_remarks = $stockRow['finished_and_traded_goods_remarks'];
$is_raw_materials_sufficient_enough = null;
$is_raw_materials_sufficient_enough_remarks = null;
$is_sufficiant_service_goods = $stockRow['is_sufficiant_service_goods'];
$bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details
if(isset($stockRow['manufacturing_details']) && is_array($stockRow['manufacturing_details']) && count($stockRow['manufacturing_details']) && (is_array($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) && count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials'])) > 0 || (is_array($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) && count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0)) {
@ -3153,7 +3155,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
echo '<p style="text-align:justify;">Raw material Stock not required to be maintained.</p>';
}
echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
//serivce
if(!strcasecmp($is_sufficiant_service_goods,'yes'))
{
echo '<p style="text-align:justify;">Considering the size of operations, the stock maintained for service providing is sufficient as per the PD Officers observations.</p>';
}else if(!strcasecmp($is_sufficiant_service_goods,'no'))
{
echo '<p style="text-align:justify;">Considering the size of operations, the stock maintained for service providing is not sufficient as per the PD Officers observations.</p>';
// echo '<p style="text-align:justify;">'. $is_raw_materials_sufficient_enough_remarks.'</p>';
}
else if(!strcasecmp($is_sufficiant_service_goods,'not applicable'))
{
echo '<p style="text-align:justify;">Stock not required to be maintained.</p>';
}
//echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
$stock_photo_count = $pd_images[11];
$stock_img_row_count = ceil(count($stock_photo_count) / 3);

View File

@ -463,6 +463,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php $loan_form = json_decode($pd_processed_forms[10][0]['processed_json'],true);
$main_applicant_name = $pd_master_details[0]['title_name'].' '.$pd_master_details[0]['main_applicant'];
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
?>
<?php
echo "<br><br>";
@ -471,7 +472,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo "<h1><center>PERSONAL DISCUSSION REPORT CLIX</center></h1> ";
echo "<center style='font-size:15px;font-style:italic;font-weight:bold'>for the case of</center>";
echo "<h2><center>".$main_applicant_name."</center></h2>";
echo "<h2><center>".$general_form['companies'][0]['company_name']."</center></h2>";
echo "</div>";
echo "<br><br><br><br>";
?>
@ -495,19 +496,19 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//echo "<p>Loan Amount Applied For : </p>";
//echo '<table align="center">
echo '<tr> <td >Loan Amount<br>(As Per PD Initiation) </td> <td style="width:2%;">:</td> <td><span style="font-family: DejaVu Sans; sans-serif;font-size:10px">₹</span>' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '<br><span style="font-size:10px;">('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')</span></td> </tr><tr> <td>Loan Amount<br>(As Per Loan Applicants during PD)</td> <td style="width:2%;">:</td> <td><span style="font-family: DejaVu Sans; sans-serif;font-size:10px;word-wrap:break-word">₹</span>' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '<br><span style="font-size:10px;">('. MYUTIL::numtowords($loan_form['loan_amount']) .')</span></td> </tr>';
$general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true);
$front_page_business_names = '';
if(isset($general_form['companies']) && count($general_form['companies']))
{
foreach ($general_form['companies'] as $comp_key => $ind_company) {
$front_page_business_names .= $ind_company['company_name'] .',';
}
}
$front_page_business_names = substr_replace($front_page_business_names,'',-1);
$front_page_business_names = strripos($front_page_business_names, ',') ? substr_replace($front_page_business_names,'and',strripos($front_page_business_names, ','),1 ) : $front_page_business_names;
echo '<tr><td>Business Name(s) </td> <td style="width:2%;">:</td> <td>'.($front_page_business_names).'</td></tr>';
// $front_page_business_names = '';
// if(isset($general_form['companies']) && count($general_form['companies']))
// {
// foreach ($general_form['companies'] as $comp_key => $ind_company) {
// $front_page_business_names .= $ind_company['company_name'] .',';
// }
// }
// $front_page_business_names = substr_replace($front_page_business_names,'',-1);
// $front_page_business_names = strripos($front_page_business_names, ',') ? substr_replace($front_page_business_names,'and',strripos($front_page_business_names, ','),1 ) : $front_page_business_names;
// echo '<tr><td>Business Name(s) </td> <td style="width:2%;">:</td> <td>'.($front_page_business_names).'</td></tr>';
echo '</tbody></table>';
@ -2928,6 +2929,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$is_stock_sufficient_enough_remarks = $stockRow['finished_and_traded_goods_remarks'];
$is_raw_materials_sufficient_enough = null;
$is_raw_materials_sufficient_enough_remarks = null;
$is_sufficiant_service_goods = $stockRow['is_sufficiant_service_goods'];
$bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details
if(isset($stockRow['manufacturing_details']) && is_array($stockRow['manufacturing_details']) && count($stockRow['manufacturing_details']) && (is_array($stockRow['manufacturing_details'][0]['manufacturing_raw_materials']) && count($stockRow['manufacturing_details'][0]['manufacturing_raw_materials'])) > 0 || (is_array($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) && count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0)) {
@ -3091,6 +3093,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p style="text-align:justify;">Raw material Stock not required to be maintained.</p>';
}
echo '<p style="text-align:justify;">'.$stock_remarks.'</p>';
//serivce
if(!strcasecmp($is_sufficiant_service_goods,'yes'))
{
echo '<p style="text-align:justify;">Considering the size of operations, the stock maintained for service providing is sufficient as per the PD Officers observations.</p>';
}else if(!strcasecmp($is_sufficiant_service_goods,'no'))
{
echo '<p style="text-align:justify;">Considering the size of operations, the stock maintained for service providing is not sufficient as per the PD Officers observations.</p>';
//echo '<p style="text-align:justify;">'. $is_raw_materials_sufficient_enough_remarks.'</p>';
}
else if(!strcasecmp($is_sufficiant_service_goods,'not applicable'))
{
echo '<p style="text-align:justify;">Stock not required to be maintained.</p>';
}
$stock_photo_count = $pd_images[11];
$stock_img_row_count = ceil(count($stock_photo_count) / 3);
@ -3783,7 +3799,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? '<span contenteditable="true"> The rent paid '.$rupee_symbol.' </span>'.$fmValue['rent'].'<span contenteditable="true"> per month.</span>' : '';
$clix_dependency_text = 'There are totally '.$fmValue['no_family_members_clix'].' family member(s)';
$clix_dependency_text .= isset($fmValue['no_dependents_clix']) && $fmValue['no_dependents_clix'] != 0 ? (' and ' . $fmValue['no_dependents_clix']. ' of them have '. ( $fmValue['no_dependents_clix'] != 1 ? 'dependencies' : 'dependency') .' on applicant.'): ' and no dependencies on applicant.';
$clix_dependency_text .= isset($fmValue['no_dependents_clix']) && $fmValue['no_dependents_clix'] != 0 ? ' and ' . $fmValue['no_dependents_clix']. ' of them have dependents on applicant.' : ' and no dependents on applicant.';
echo $intro_text;echo "<br><br>";echo $residence_text;echo "<br><br>";echo $clix_dependency_text;