diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 932f165f..b1649383 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -2376,7 +2376,7 @@ class PD_Controller extends REST_Controller {
$processed_json = $records;
break;
case 17:
- $processed_json = $records;
+ $processed_json = GETPROCESSEDJSON::convertRentalIncomeDetailsForm($records,$formid);
break;
case 18:
$processed_json = GETPROCESSEDJSON::convertGeneralDetailsForm($records,$formid);
diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php
index f1d4aa25..bcfb03f7 100644
--- a/api/application/helpers/getprocessedjson_helper.php
+++ b/api/application/helpers/getprocessedjson_helper.php
@@ -2462,6 +2462,63 @@ class GETPROCESSEDJSON
return $raw_json;
}
/*****************########## END OF FINAL REMARKS FORM DETAILS ##########**************/
+
+
+ /************************########### RENTAL INCOME #################****************************/
+ public static function convertRentalIncomeDetailsForm($raw_json,$formid)
+ {
+
+ $CI =& get_instance();
+ $master_tables_field_names = $CI->config->item('master_tables_field_names');
+ $master_tables_pkid = $CI->config->item('master_tables_pkid');
+
+ if(array_key_exists('state',$raw_json))
+ {
+ //print_r($address);
+ $CI->db->SELECT( $master_tables_field_names['STATE'] );
+ $CI->db->FROM(STATE);
+ $CI->db->WHERE('isactive',1);
+ $CI->db->WHERE($master_tables_pkid['STATE'] ,$raw_json['state']);
+ $adress_type_name= $CI->db->GET()->result_array();
+ //print_r($CI->db->last_query());
+ if(count($adress_type_name))
+ {
+ $raw_json['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
+ }
+ }
+
+ if(array_key_exists('city',$raw_json))
+ {
+ //print_r($address);
+ $CI->db->SELECT( $master_tables_field_names['CITY'] );
+ $CI->db->FROM(CITY);
+ $CI->db->WHERE('isactive',1);
+ $CI->db->WHERE($master_tables_pkid['CITY'] ,$raw_json['city']);
+ $city= $CI->db->GET()->result_array();
+ //print_r($CI->db->last_query());
+ if(count($city))
+ {
+ $raw_json['city_master'] = $city[0][$master_tables_field_names['CITY']];
+ }
+ }
+
+ if(array_key_exists('pincode',$raw_json))
+ {
+ //print_r($address);
+ $CI->db->SELECT( $master_tables_field_names['PINCODE'] );
+ $CI->db->FROM(PINCODE);
+ $CI->db->WHERE('isactive',1);
+ $CI->db->WHERE($master_tables_pkid['PINCODE'] ,$raw_json['pincode']);
+ $pincode= $CI->db->GET()->result_array();
+ //print_r($CI->db->last_query());
+ if(count($pincode))
+ {
+ $raw_json['pincode_master'] = $pincode[0][$master_tables_field_names['PINCODE']];
+ }
+ }
+ return ($raw_json);
+ }
+ /************************########### END OF RENTAL INCOME #################****************************/
}
diff --git a/api/application/helpers/otherfamilyform_helper.php b/api/application/helpers/otherfamilyform_helper.php
index f95fb4cd..869bb494 100644
--- a/api/application/helpers/otherfamilyform_helper.php
+++ b/api/application/helpers/otherfamilyform_helper.php
@@ -17,6 +17,8 @@ public static function getFamilyDetails($values){
$storeValue['residency_address'] .=($fetchVal['residence_pin'] == 1) ? $fetchVal['residence_other_pincode'] : (($fetchVal['residence_pin'] > 1) ? $fetchVal['residence_pincode_master'] : "");
//$storeValue['residency_address'] .='.';
$storeValue['residence_No_of_years']=($fetchVal['residence_No_of_years'] == 1) ? $fetchVal['residence_No_of_years'].' year' :(($fetchVal['residence_No_of_years'] > 1) ? $fetchVal['residence_No_of_years'].' years' : "");
+
+ $storeValue['residence_No_of_years'] .= isset($fetchVal['residence_No_of_months']) && $fetchVal['residence_No_of_months'] != "" ? ' and ' . $fetchVal['residence_No_of_months'] .' Month(s)' : '';
$storeValue['residence_ownership']=($fetchVal['residence_ownership'] == 1) ? $fetchVal['ownershipOther'] :(($fetchVal['residence_ownership'] == 3) ? $fetchVal['residence_ownership_master'] : $fetchVal['residence_ownership_master']);
$storeValue['rent'] = $fetchVal['rent'];
$storeValue['no_family_members']= count($fetchVal['family_members_details']) > 0 ? count($fetchVal['family_members_details']) : '0';
diff --git a/api/application/helpers/rentalform_helper.php b/api/application/helpers/rentalform_helper.php
index b61abf91..d6973b57 100644
--- a/api/application/helpers/rentalform_helper.php
+++ b/api/application/helpers/rentalform_helper.php
@@ -4,35 +4,86 @@ class Rentalform
{
public static function getRentalText($rental_data){
-
+
+ //print_r($rental_data);die();
$address_property = $rental_data['address_property'];
$address_property = str_replace("\n",' ',$address_property);
- $property_text = 'As per person`s met address of the property declared as '.$address_property.' ,'.$rental_data['city'].' ,'.$rental_data['state'].' - '.$rental_data['pincode'].'.';
+ $address_property .= ' ,'.$rental_data['city_master'].' ,'.$rental_data['state_master'].' - '.$rental_data['pincode_master'].'.';
+ $address_property = $rental_data['validate_visited_address'] ? $address_property : str_replace("\n",'',$rental_data['other_visited_address']);
- $property_text .= $rental_data['validate_visited_address'] ? 'The visited property address is also save as above.': 'But The visited Property address is '.str_replace("\n",'',$rental_data['other_visited_address']);
-
- $no_of_persons_showing_property = count($rental_data['person_met']) > 1 ? 'were' : 'was';
-
- $name_of_persons_showing_property = null;
- foreach($rental_data['person_met'] as $showed_person){
+ $type_of_property = $rental_data['nature_property']['id'] == 1 ? $rental_data['other_nature_property']: $rental_data['nature_property']['name'];
+ $unit_type = $rental_data['unit_type']['id'] == 1 ? $rental_data['other_unit_type'] : $rental_data['unit_type']['name'];
+ $no_of_floors = $rental_data['unit_type']['id'] == 6 ? $rental_data['no_floor'] : $rental_data['no_units'];
+ $area_coverd = $rental_data['unit_type']['id'] == 6 ? $rental_data['multistoried_total_area'] : '';
+ $area_uom = $rental_data['unit_type']['id'] == 6 ? $rental_data['multistoried_uom']['name'] : '';
+ $property_owners_name = null;
+ foreach($rental_data['property_owner'] as $owner){
- if($showed_person['id'] != 0)
+ if($owner['id'] != 0)
{
- $name_of_persons_showing_property .= $showed_person['name'].' ,';
+ $property_owners_name .= $owner['name'].' ,';
}
else
{
- $name_of_persons_showing_property .= $rental_data['other_person_met'];
+ $property_owners_name .= $rental_data['property_owner_other'].' , ';
}
}
- $name_of_persons_showing_property = substr_replace($name_of_persons_showing_property,'and ',strrpos($name_of_persons_showing_property,','),1);
- $property_text .= 'The property shown by '.$name_of_persons_showing_property;
-
- echo $property_text;
-
- die();
+ $property_owners_name = substr_replace($property_owners_name,' ',strrpos($property_owners_name,','),1);
+ $property_owners_name = substr_replace($property_owners_name,' and ',strrpos($property_owners_name,','),1);
+ $property_showing_persons_name = null;
+ foreach($rental_data['person_met'] as $person_met){
+
+ if($person_met['id'] != 0)
+ {
+ $property_showing_persons_name .= $person_met['name'].' ,';
+ }
+ else
+ {
+ $property_showing_persons_name .= $rental_data['other_person_met'].' , ';
+ }
+ }
+
+ $property_showing_persons_name = substr_replace($property_showing_persons_name,' ',strrpos($property_showing_persons_name,','),1);
+ $property_showing_persons_name = substr_replace($property_showing_persons_name,' and ',strrpos($property_showing_persons_name,','),1);
+ $property_document_proof_visted = $rental_data['property_ownership_proof_documents'] == 1 ? 'Yes': 'No';
+ $type_of_document_visited = (substr_count($rental_data['sighted_documents']['name'], 'Others')) ? $rental_data['other_sighted_documents'] : $rental_data['sighted_documents']['name'];
+
+ $property_remark = $rental_data['rental_remark'];
+ $third_check_details = array();
+ $third_check_details['done_third_party_check'] = $rental_data['done_third_party_check'];// ? 'Yes' : 'No';
+ $third_check_details['done_third_party_check'] = $rental_data['done_third_party_check'];// ? 'Yes' : 'No';
+ $third_check_details['why_third_party_check_not_done'] = isset($rental_data['why_third_party_check_not_done']) && !$rental_data['done_third_party_check'] ? $rental_data['why_third_party_check_not_done'] : '';
+ $third_check_details['whom_third_party_check_done'] = isset($rental_data['whom_third_party_check_done']) ? $rental_data['whom_third_party_check_done'] : '';
+ $third_check_details['description_third_party_check_done'] = isset($rental_data['description_third_party_check_done']) ? $rental_data['description_third_party_check_done'] : '';
+ $third_check_details['rental_rates_third_party_check_done'] = isset($rental_data['rental_rates_third_party_check_done']) ? $rental_data['rental_rates_third_party_check_done'] : '';
+
+
+ $unit_wise_details = array();
+ foreach ($rental_data['property_unit_details'] as $u_key => $unit) {
+
+ $temp = array();
+ //if($unit['tenant_lessees_options'] == 1) { $temp['lesse_name'] = $unit['name_tenant_lessees'];} else { $temp['lesse_name'] = 'Not Available' ; }
+ $temp['agreement_tenant_lessees_name'] = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']: 'Not Provided
('. $unit['name_tenant_lessees_reason'] .')';
+ $temp['agreement_monthly_rent_amount'] = isset($unit['agreement_monthly_rent_amount']) ? $unit['agreement_monthly_rent_amount'] : $unit['monthly_rent_amount'];
+ $temp['agreement_security_deposit_amount'] = isset($unit['agreement_security_deposit_amount']) ? $unit['agreement_security_deposit_amount']: $unit['securtity_deposit_amount'];
+ $temp['property_cover_area'] = $unit['property_cover_area'] .' '. $unit['unit_measurement']['name'];
+ $temp['payment_mode'] = $unit['payment_mode']['name'].'
(';
+ $temp['payment_mode'] .= isset($unit['amount_received_bank']) ? 'from bank: ' . $unit['amount_received_bank'] : '';
+ $temp['payment_mode'] .= isset($unit['amount_received_cash']) ? ' from cash: ' .$unit['amount_received_cash'] : '';
+ $temp['payment_mode'] .= ')';
+ $temp['rent_agreement_executed'] = $unit['is_rent_agreement_executed'] == 1 ? 'Yes' : 'No' ;
+
+
+
+
+ $temp['leease_period'] = isset($unit['agreement_date']) ? 'lease start from '. date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y') .' to '.date_format(date_create_from_format("d/m/Y",$unit['agreement_expiring_date']),'M-Y') : 'NA';
+ array_push($unit_wise_details,$temp);
+
+ }
+ //print_r($unit_wise_details);
+ return array('address_property' => $address_property,'type_of_property' => $type_of_property,'property_owners_name' => $property_owners_name,'property_showing_persons_name' => $property_showing_persons_name,'property_document_proof_visted' => $property_document_proof_visted,'type_of_document_visited' => $type_of_document_visited,'no_of_floors' => $no_of_floors, 'area_coverd' => $area_coverd,'area_uom' => $area_uom,'unit_details' => $unit_wise_details,'property_remark' => $property_remark,'third_check_details' => $third_check_details,'unit_type' => $unit_type);
}
}
?>
\ No newline at end of file
diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php
index 956afdce..ec8b26f1 100644
--- a/api/application/views/report_templates/JSONTOREPORT.php
+++ b/api/application/views/report_templates/JSONTOREPORT.php
@@ -925,25 +925,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
-
- $rental_property)
- {
- //echo $rental_property_key;
- $current_property = json_decode($rental_property['processed_json'],true);
- $rental_data[] = RENTALFORM::getRentalText($current_property);
-
- }
- //
- //******************************************************************** //******************************************************************** //********************************************************************
-
- ?>
-
-
-
PD LOCATION
'End Use of Topup','details' => ( strcasecmp('others',$loan_form['end_use_topup_master'])) ? $loan_form['end_use_topup_master'] : $loan_form['other_end_use_topup'] ); - $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender_master']); + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender'] == 1 ? $loan_form['other_bt_lender']: $loan_form['lender_master']); } else{ @@ -1229,15 +1211,19 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if(!$is_current_product_bl && !$is_current_product_laep) { - $loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => $loan_form['property_type_master']); - - $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; } - $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list)); - $loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list); - - $loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']); - - $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).' ('.MYUTIL::numtowords($loan_form['emv_per_customer']).')'); + + if(isset($loan_form['property_type_master']) && $loan_form['property_type_master'] != "") + { + $loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => substr_count($loan_form['property_type_master'],'Others') ? $loan_form['property_type_others'] : $loan_form['property_type_master']); + + $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; } + $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list)); + $loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list); + + $loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']); + + $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol." ".MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).' ('.MYUTIL::numtowords($loan_form['emv_per_customer']).')'); + } } if(isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') @@ -1881,18 +1867,18 @@ defined('BASEPATH') OR exit('No direct script access allowed'); 0){ + if(count($businessAssetRow['business_assets_details'])>0 && $is_business_asset_available ){ $bindBusinessAsset['details']=ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details']); } array_push($businessAssetResult,$bindBusinessAsset); @@ -1901,14 +1887,15 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // print_r($businessAssetResult); ?> - + + +
+
@@ -1930,9 +1917,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo ''; } } - - if($business_assets_form_remark != "" ){ echo ''.$business_assets_form_remark.'
'; } } + else + { + echo 'No other assests used for business.
'; + } + if($business_assets_form_remark != "" ){ echo ''.$business_assets_form_remark.'
'; } + } // ENd of if business assesst available in this current index ?> @@ -1954,6 +1945,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $businessFinancialRow = json_decode($baRow['processed_json'],true); //print_r($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']);die(); $financial_remarks = $businessFinancialRow['financial_remarks']; + $comments_on_financials = isset($businessFinancialRow['financial_reason']) ? $businessFinancialRow['financial_reason'] : ''; //echo $financial_remarks;die(); // statementdate_per_financial if(strtoupper($businessFinancialRow['is_financial_statements'])=='YES' && count($businessFinancialRow['date_per_financial'])>0){ @@ -2036,7 +2028,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $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); ?> @@ -2103,7 +2095,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); }else { echo '' . $comments_on_financials . '
'; + + } } @@ -2182,13 +2177,14 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?>Working Capital Cycle:
| S.No | Particulars | Days |
|---|---|---|
| 1 | Debtor Days | |
| 2 | Creditor Days | |
| 1 | Debtor Days | |
| 2 | Creditor Days | |
| 3 | Stock Days |
Personal asset is not available.
+As per Loan applicant, he does not have any other assets.
'.$other_assest_common_remrks.''; } @@ -3625,7 +3622,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?>Annexure B : Rental Income Details
'; + + foreach ($rental_data as $key => $value) { + + echo '| S.No | Lessee Name | Area of Unit | Payment Mode | Rent Agreement Executed | Lease Period | Security Deposit | Rent Received( per month) |
|---|---|---|---|---|---|---|---|
| '. ( $u_key + 1) .' | '. $unit_value['agreement_tenant_lessees_name'] .' | '. $unit_value['property_cover_area'] .' | '. $unit_value['payment_mode'] .' | '. $unit_value['rent_agreement_executed'] .' | '. $unit_value['leease_period'] .' | '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_value['agreement_security_deposit_amount']) .' | '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $unit_value['agreement_monthly_rent_amount'] ).' |
| Total | '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_security_deposit) .' | '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_rent_received) .' | |||||