diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 1779d998..d557d01f 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -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; diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 49a3061d..2b8f7a5d 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -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) diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 6a948857..9070402c 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -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 '

Raw material Stock not required to be maintained.

'; } - echo '

'.$stock_remarks.'

'; + + //serivce + if(!strcasecmp($is_sufficiant_service_goods,'yes')) + { + echo '

Considering the size of operations, the stock maintained for service providing is sufficient as per the PD Officer’s observations.

'; + }else if(!strcasecmp($is_sufficiant_service_goods,'no')) + { + echo '

Considering the size of operations, the stock maintained for service providing is not sufficient as per the PD Officer’s observations.

'; + // echo '

'. $is_raw_materials_sufficient_enough_remarks.'

'; + } + else if(!strcasecmp($is_sufficiant_service_goods,'not applicable')) + { + echo '

Stock not required to be maintained.

'; + } + //echo '

'.$stock_remarks.'

'; $stock_photo_count = $pd_images[11]; $stock_img_row_count = ceil(count($stock_photo_count) / 3); diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php index 96ccb8ce..1b916b1d 100644 --- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php +++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php @@ -463,6 +463,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ₹"; + $general_form = json_decode($pd_processed_forms[18][0]['processed_json'],true); ?>
"; @@ -471,7 +472,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo "

PERSONAL DISCUSSION REPORT CLIX

"; echo "
for the case of
"; - echo "

".$main_applicant_name."

"; + echo "

".$general_form['companies'][0]['company_name']."

"; echo ""; echo "



"; ?> @@ -495,19 +496,19 @@ defined('BASEPATH') OR exit('No direct script access allowed'); //echo "

Loan Amount Applied For :

"; //echo ' echo ''; - $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 ''; + // $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 ''; echo '
Loan Amount
(As Per PD Initiation)
: ' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '
('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
Loan Amount
(As Per Loan Applicants during PD)
: ' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '
('. MYUTIL::numtowords($loan_form['loan_amount']) .')
Business Name(s) : '.($front_page_business_names).'
Business Name(s) : '.($front_page_business_names).'
'; @@ -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 '

Raw material Stock not required to be maintained.

'; } echo '

'.$stock_remarks.'

'; + + //serivce + if(!strcasecmp($is_sufficiant_service_goods,'yes')) + { + echo '

Considering the size of operations, the stock maintained for service providing is sufficient as per the PD Officer’s observations.

'; + }else if(!strcasecmp($is_sufficiant_service_goods,'no')) + { + echo '

Considering the size of operations, the stock maintained for service providing is not sufficient as per the PD Officer’s observations.

'; + //echo '

'. $is_raw_materials_sufficient_enough_remarks.'

'; + } + else if(!strcasecmp($is_sufficiant_service_goods,'not applicable')) + { + echo '

Stock not required to be maintained.

'; + } $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')) ? ' The rent paid '.$rupee_symbol.' '.$fmValue['rent'].' per month.' : ''; $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 "

";echo $residence_text;echo "

";echo $clix_dependency_text;