RI AND TINY ISSUES

This commit is contained in:
Velz2020 2019-08-06 16:54:04 +05:30
parent 23b08dbc42
commit 080f920e71
5 changed files with 271 additions and 77 deletions

View File

@ -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);

View File

@ -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 #################****************************/
}

View File

@ -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';

View File

@ -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 <br>('. $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'].'<br> (';
$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);
}
}
?>

View File

@ -925,25 +925,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php
//******************************************************************** //******************************************************************** //********************************************************************
//echo "RI";echo count($pd_processed_forms[17]);
foreach($pd_processed_forms[17] as $rental_property_key => $rental_property)
{
//echo $rental_property_key;
$current_property = json_decode($rental_property['processed_json'],true);
$rental_data[] = RENTALFORM::getRentalText($current_property);
}
//
//******************************************************************** //******************************************************************** //********************************************************************
?>
<!-- ####################### Address Details Section Statred ############################-->
<?php
@ -994,7 +975,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<p><b>PD LOCATION</b></p>
<p><?php
//print_r($address_form);die();
$pd_address = $address_form['addresses'][0];
$pd_alternative_address = array();
$pincode = isset($pd_address['pincode_others']) && ($pd_address['pincode_others'] != "" || $pd_address['pincode_others'] != null) ? $pd_address['pincode_others'] : $pd_address['pincode_master'];
@ -1045,10 +1026,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$pd_address = $is_change_address ? $pd_alternative_address : $pd_address;
$address_type = $pd_address['address_type_master'];
$address_type = $pd_address['address_type'] == 1? $pd_address['address_type_others'] : $pd_address['address_type_master'];
$estimated_area = $pd_address['estimated_area'].' ';
$estimated_area .= isset($pd_address['uom_others']) && ($pd_address['uom_others'] != "" || $pd_address['uom_others'] != null) ? $pd_address['uom_others'] : $pd_address['uom_master'];
$locality = $pd_address['locality_master'];
$locality = $pd_address['locality'] == 1 ? $pd_address['locality_others']: $pd_address['locality_master'];
$locality = preg_match("/^[aeiouAEIOU]/U", $locality) ? 'an '.$locality : 'a '.$locality;
$comment_locality_master = preg_match("/^[aeiouAEIOU]/U", $pd_address['comment_locality_master']) ? 'an '.$pd_address['comment_locality_master'] : 'a '.$pd_address['comment_locality_master'];
$property_owner_type = $business_assets_details['business_assets_for_address'][0]['business_ownership_type'];
@ -1205,7 +1187,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$loan_table_dispaly_rows[] = array('particulars' => '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');
<?php
//
$businessAssetResult=array();
$is_business_asset_available = null;
if(isset($pd_processed_forms[22][$business_count]))
{
$baRow = $pd_processed_forms[22][$business_count];
$businessAssetRow = json_decode($baRow['processed_json'],true);
//print_r($businessAssetRow);die();
$is_business_asset_available = $businessAssetRow['asset_info_available'];
$business_assets_form_remark = $businessAssetRow['business_assets_form_remark'];
$bindBusinessAsset["company_name"] ='Assets used for ';
$bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
$bindBusinessAsset["company_name"] .=' Business :';
if(count($businessAssetRow['business_assets_details'])>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);
?>
<?php
//print_r($businessAssetResult);die();
if( $businessAssetResult[0]['details']['show_table'] ){ ?>
<div class="page_break"> <div>
<br>
<h3 contenteditable="true">Assets used in Business</h3>
<?php foreach($businessAssetResult as $iterateAsset){ ?>
<p><?php
<?php if( $is_business_asset_available ){
foreach($businessAssetResult as $iterateAsset){ ?>
<?php
if(isset($iterateAsset['details']) && count($iterateAsset['details']))
{
echo $iterateAsset['company_name']; ?></p>
@ -1930,9 +1917,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '</table>';
}
}
if($business_assets_form_remark != "" ){ echo '<p>'.$business_assets_form_remark.'</p>'; }
}
else
{
echo '<p> No other assests used for business.</p>';
}
if($business_assets_form_remark != "" ){ echo '<p>'.$business_assets_form_remark.'</p>'; }
} // 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 '<td style="text-align:center;">NA</td>';}}?> </tr>
</tbody>
</table>
<?php }
<?php
echo '<br><p>' . $comments_on_financials . '</p>';
}
}
@ -2182,13 +2177,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php
//echo $iterateFinance['working_capital_receive'].$iterateFinance['working_capital_pay'].$iterateFinance['working_capital_unsold_stock'];
} ?>
<p><strong>Working Capital Cycle:</strong></p>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Days</th> </tr> </thead>
<tbody>
<tr> <td class="customtd">1</td> <td class="customtd">Debtor Days</td> <td class="customtd"><?php echo $iterateFinance['working_capital_receive'] != "" ? $iterateFinance['working_capital_receive'] :"Data Not provided"?></td> </tr>
<tr> <td class="customtd">2</td> <td class="customtd">Creditor Days</td> <td class="customtd"><?php echo $iterateFinance['working_capital_pay'] != "" ? $iterateFinance['working_capital_pay'] : "Data Not Provided"?></td></tr>
<tr> <td class="customtd">1</td> <td class="customtd">Debtor Days</td> <td class="customtd"><?php echo isset($iterateFinance['working_capital_receive']) && is_numeric($iterateFinance['working_capital_receive']) ? $iterateFinance['working_capital_receive'] :"Data Not provided"?></td> </tr>
<tr> <td class="customtd">2</td> <td class="customtd">Creditor Days</td> <td class="customtd"><?php echo isset($iterateFinance['working_capital_pay']) && is_numeric($iterateFinance['working_capital_pay']) ? $iterateFinance['working_capital_pay'] : "Data Not Provided"?></td></tr>
<tr> <td class="customtd">3</td> <td class="customtd">Stock Days</td> <td class="customtd"><?php echo $iterateFinance['working_capital_unsold_stock']?></td></tr>
</tbody>
</table>
@ -2370,7 +2366,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_second_row .= isset($main_raw_material['person_designation']) && $main_raw_material['person_designation']== 1 ? ' '.$main_raw_material['other_person_designation'] : ' ';//
$client_second_row .= isset($main_raw_material['person_designation_master']) ? $main_raw_material['person_designation_master'] : '' ;
$client_second_row .= isset($main_raw_material['person_designation_master']) && $main_raw_material['person_designation'] != 1? $main_raw_material['person_designation_master'] : '' ;
$client_second_row .= ' '.$main_raw_material['manufacturing_client_name'].'</td>';
@ -2414,7 +2410,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_second_row .= isset($trading_product['person_designation']) && $trading_product['person_designation']== 1 ? ' '.$trading_product['other_person_designation'] : ' ';//
$client_second_row .= isset($trading_product['person_designation_master']) ? $trading_product['person_designation_master'] : '' ;
$client_second_row .= isset($trading_product['person_designation_master']) & $trading_product['person_designation'] != 1? $trading_product['person_designation_master'] : '' ;
$client_second_row .= ' '.$trading_product['trade_client_name'].'</td>';
@ -2459,7 +2455,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_second_row .= isset($service_product['person_designation']) && $service_product['person_designation']== 1 ? ' '.$service_product['other_person_designation'] : ' ';//
$client_second_row .= isset($service_product['person_designation_master']) ? $service_product['person_designation_master'] : '' ;
$client_second_row .= isset($service_product['person_designation_master']) && $service_product['person_designation'] != 1 ? $service_product['person_designation_master'] : '' ;
$client_second_row .= ' '.$service_product['service_provider_client_name'].'</td>';
@ -2624,7 +2620,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_second_row .= isset($raw['person_designation']) && $raw['person_designation']== 1 ? ' '.$raw['other_person_designation'] : ' ';//
$supplier_second_row .= isset($raw['person_designation_master']) ? $raw['person_designation_master'] : '' ;
$supplier_second_row .= isset($raw['person_designation_master']) && $raw['person_designation'] != 1? $raw['person_designation_master'] : '' ;
$supplier_second_row .= ' '.$raw['manufacturing_supplier_name'].'</td>';
@ -2678,7 +2674,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_second_row .= isset($tradeRow['person_designation']) && $tradeRow['person_designation']== 1 ? ' '.$tradeRow['other_person_designation'] : ' ';//
$supplier_second_row .= isset($tradeRow['person_designation_master']) ? $tradeRow['person_designation_master'] : '' ;
$supplier_second_row .= isset($tradeRow['person_designation_master']) && $tradeRow['person_designation'] != 1? $tradeRow['person_designation_master'] : '' ;
$supplier_second_row .= ' '.$tradeRow['trade_supplier_name'].'</td>';
$temp['supplier_second_row'] = $supplier_second_row.'</tr>';
@ -2711,6 +2707,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(isset($supplierRow['servicing_details'][0]['service_providers']) && count($supplierRow['servicing_details'][0]['service_providers']))
{
foreach($supplierRow['servicing_details'][0]['service_providers'] as $serviceRow){
if($serviceRow['service_provider_name'] != "" || $serviceRow['service_provider_name'] != null)
{
@ -2719,7 +2716,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$total_payments_percent_on_credit_for_supplier += $serviceRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'];
$total_payments_percent_on_credit_for_supplier += isset($serviceRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $serviceRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0;
$temp['supplier_first_row'] = '<tr><td class="customtd">1</td><td class="customtd_leftalign">Item Purchased </td>'.'<td class="customtd">'.$serviceRow['service_provider_name'].'</td></tr>';
@ -2730,7 +2727,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_second_row .= isset($serviceRow['person_designation']) && $serviceRow['person_designation']== 1 ? ' '.$serviceRow['other_person_designation'] : ' ';//
$supplier_second_row .= isset($serviceRow['person_designation_master']) ? $serviceRow['person_designation_master'] : '' ;
$supplier_second_row .= isset($serviceRow['person_designation_master']) && $serviceRow['person_designation'] != 1? $serviceRow['person_designation_master'] : '' ;
$supplier_second_row .= ' '.$serviceRow['service_provider_supplier_name'].'</td>';
$temp['supplier_second_row'] = $supplier_second_row.'</tr>';
@ -2747,7 +2744,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp['supplier_sixth_row'] = '<tr><td class="customtd">6</td><td class="customtd_leftalign">Payment Mode</td>';
$temp['supplier_sixth_row'] .= $serviceRow['service_provider_payment_mode'] ? '<td class="customtd">'. $serviceRow['trade_product_payment_mode'] .'</td></tr>' : '<td class="customtd">NA</td></tr>';
$temp['supplier_sixth_row'] .= $serviceRow['service_provider_payment_mode'] ? '<td class="customtd">'. $serviceRow['service_provider_payment_mode'] .'</td></tr>' : '<td class="customtd">NA</td></tr>';
$temp['supplier_seventh_row'] = '<tr><td class="customtd">7</td><td class="customtd_leftalign">No of Days Credit</td>';
@ -3514,7 +3511,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</table>
<?php }
else {?>
<p>Personal asset is not available.</p>
<p>As per Loan applicant, he does not have any other assets.</p>
<?php }
if($other_assest_common_remrks != ""){ echo '<p>'.$other_assest_common_remrks.'</p>'; }
@ -3625,7 +3622,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
?>
<tr>
<td class="customtd"><?php echo (++$oidkey) ?></td>
<td class="customtd"><?php echo $oiRow['source'] ?></td>
<td class="customtd"><?php echo $oiRow['source']; if(!strcasecmp($oiRow['source'], 'RENTAL INCOME')){ echo '<br>(Details Available in Annexure B)'; $GLOBALS['is_rental_available'] = 1 ; } ?></td>
<td class="customtd"><?php echo $oiRow['earned_by'] ?></td>
<td class="customtd"><?php echo $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($oiRow['amount']).' '.$oiRow['frequency'] ?></td>
@ -3656,11 +3653,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
?>
<h3 contenteditable="true">Family Information:</h3>
<?php if(count($familyResult)>0){
//print_r($familyResult);
?>
<div id='page_break'></div>
<h3 contenteditable="true">Family Information:</h3>
<?php foreach($familyResult as $fmKey => $fmValue) { ?>
<!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> -->
<?php
@ -4017,7 +4015,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<!-- #################End Final Remarks Section#################-->
<!-- #################Annexure section start#################-->
<!-- #################Annexure A section start#################-->
<?php if($total_no_of_business > 0) {
for($business_count = 0;$business_count < $total_no_of_business; $business_count++)
@ -4125,9 +4123,95 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
?>
<!-- #################End Annexure section ################-->
<!-- #################End Annexure A section ################-->
<!-- #################Annexure B(RI) section start#################-->
<?php
if($GLOBALS['is_rental_available'] == 1)
{
$rental_data = array();
$first_owners_row = '<tr><td>Lessor Name / Property Owner Name</td>';
$second_lessee_name_row = '<tr><td>Lessee Name</td>';
$third_property_address_row = '<tr><td>Property Address</td>';
$fourth_type_of_property_row = '<tr><td>Type of Property</td>';
$fifth_lease_period_row = '<tr><td>Lease Period</td>';
$sixth_structure_of_property_row = '<tr><td>Structure of Property / No of Floors vs Units</td>';
$seventh_security_deposit_row = '<tr><td>Security Deposit</td>';
$eigth_current_rent_received_row = '<tr><td>Current Rent Received (Rs/ per month)</td>';
$nineth_expense_of_management_row = '<tr><td>Remarks</td>';
foreach($pd_processed_forms[17] as $rental_property_key => $rental_property)
{
//echo $rental_property_key;
$current_property = json_decode($rental_property['processed_json'],true);
$rental_data[] = RENTALFORM::getRentalText($current_property);
}
if(count($rental_data))
{
echo '<div id="page_break"></div>';
echo '<p><b>Annexure B : Rental Income Details</b></p>';
foreach ($rental_data as $key => $value) {
echo '<br><br><b>Property : '.($key + 1).'</b>';
echo '<br><br>Address of Property : <b>'.($value['address_property']).'</b>';
echo '<br><br>Type of Property : <b>'.($value['type_of_property']).'</b>';
echo '<br><br>Name of the Property Owner`s : <b>'.($value['property_owners_name']).'</b>';
echo '<br><br>Name of the person`s who showing Property : <b>'.($value['property_showing_persons_name']).'</b>';
echo '<br><br>Property Document Proof Visted : <b>'.($value['property_document_proof_visted']).'</b>';
if(!strcasecmp($value['property_document_proof_visted'],'yes')) { echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type of Property Document Visted : <b>'.($value['type_of_document_visited']).'</b>'; }
echo '<br><br>Unit Type : <b>' . ($value['unit_type']) . '</b>';
echo '<br><br>No of Floors/Units : <b>'.($value['no_of_floors']).'</b>';
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; echo $value['area_coverd'] != "" ? 'Area covered : <b>'.($value['area_coverd'].' '.$value['area_uom'].'</b>') : '';
//print_r($value['unit_details']);
if(count($value['unit_details']))
{
echo '<br><br><table class="scorecard_table">';
echo '<tr> <th>S.No</th> <th>Lessee Name</th> <th>Area of Unit</th> <th>Payment Mode</th> <th>Rent Agreement Executed</th><th>Lease Period</th> <th>Security Deposit</th> <th>Rent Received( per month)</th> </tr>';
$unit_wise_total_security_deposit = 0;
$unit_wise_total_rent_received = 0;
foreach ($value['unit_details'] as $u_key => $unit_value)
{
$unit_wise_total_security_deposit += $unit_value['agreement_security_deposit_amount'];
$unit_wise_total_rent_received += $unit_value['agreement_monthly_rent_amount'];
echo '<tr> <td class="customtd">'. ( $u_key + 1) .'</td> <td>'. $unit_value['agreement_tenant_lessees_name'] .'</td> <td class="customtd"> '. $unit_value['property_cover_area'] .'</td><td class="customtd"> '. $unit_value['payment_mode'] .'</td> <td class="customtd"> '. $unit_value['rent_agreement_executed'] .'</td><td class="customtd"> '. $unit_value['leease_period'] .' </td><td class="customtd"> '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_value['agreement_security_deposit_amount']) .' </td><td class="customtd"> '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $unit_value['agreement_monthly_rent_amount'] ).' </td> </tr>';
}
echo '<tr> <td class="customtd" colspan=6>Total</td> <td class="customtd">'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_security_deposit) .'</td> <td class="customtd">'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_rent_received) .'</td> </tr>';
echo '</table>';
}
//print_r($value['third_check_details']);
if($value['third_check_details']['done_third_party_check'])
{
echo '<br>For property'.($key + 1).' Third Party check has done with ' . $value['third_check_details']['whom_third_party_check_done'];
echo isset($value['third_check_details']['description_third_party_check_done']) ? ' ('. $value['third_check_details']['description_third_party_check_done'].'). ' : ' ';
echo ' ' . $rupee_symbol .' '. MYUTIL::customIndianNumberFormat( $value['third_check_details']['rental_rates_third_party_check_done'] ) .' is rental rate in the area as per person whom third party check is done.';
}
else
{
echo '<br>For property '.($key + 1).' Third Party check not done becasue ' .$value['third_check_details']['why_third_party_check_not_done'];
}
echo '<br>' . $value['property_remark'];
}
}
}
?>
<!-- #################END of Annexure B(RI) section start#################-->