From a8150ebb13809185552cce091492ffe5ec7aedac Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Wed, 21 Sep 2022 18:13:17 +0530 Subject: [PATCH] FI Changes 6 : ps --- api/application/controllers/PD_Controller.php | 12 +- .../JSONTOREPORT_DI_AI_TELE_PD.php | 2 +- .../JSONTOREPORT_FI_OV_DI.php | 5180 ++++++++++++++++ .../JSONTOREPORT_FI_OV_SAL.php | 5194 +++++++++++++++++ .../report_templates/JSONTOREPORT_FI_RV.php | 5194 +++++++++++++++++ 5 files changed, 15580 insertions(+), 2 deletions(-) create mode 100644 api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php create mode 100644 api/application/views/report_templates/JSONTOREPORT_FI_OV_SAL.php create mode 100644 api/application/views/report_templates/JSONTOREPORT_FI_RV.php diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index e2a7b0db..bd474cd8 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2704,7 +2704,9 @@ class PD_Controller extends REST_Controller $records['docs_to_be_sighted'] = isset($processed_json['docs_to_be_sighted']) ? $processed_json['docs_to_be_sighted'] : null; unset($processed_json['docs_to_be_sighted']); - + case 27: case 28: case 29: case 30: case 31: case 32: case 33: + $processed_json = $records; + break; //default: //echo "Something Wrong! Form ID did not match, Contact System Administrator"; } @@ -5854,6 +5856,14 @@ class PD_Controller extends REST_Controller } else if ($data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-DI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SE-AI' || $data['pd_master_details'][0]['customer_segment_abbr'] == 'SEP_INDV') { $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_TELE_PD', $data, true); } + } else if ($data['pd_master_details'][0]['fk_pd_type'] == 4){ //FI PD + if ($data['pd_master_details'][0]['fk_fi_type_id'] == 1 ){ + $t = $this->load->view('report_templates/JSONTOREPORT_FI_OV_DI', $data, true); + } else if ($data['pd_master_details'][0]['fk_fi_type_id'] == 2 ){ + $t = $this->load->view('report_templates/JSONTOREPORT_FI_OV_SAL', $data, true); + } else if ($data['pd_master_details'][0]['fk_fi_type_id'] == 3 ){ + $t = $this->load->view('report_templates/JSONTOREPORT_FI_RV', $data, true); + } } } else { $t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON', $data, true); diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php index a31406c5..f21b0878 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php @@ -7,7 +7,7 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa - + diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php new file mode 100644 index 00000000..f2c23dba --- /dev/null +++ b/api/application/views/report_templates/JSONTOREPORT_FI_OV_DI.php @@ -0,0 +1,5180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + ₹"; + ?> +
"; + + echo "
"; + echo "

PERSONAL DISCUSSION REPORT

"; + echo "
for the case of
"; + + echo "

" . $main_applicant_name . "

"; + echo "
"; + echo "



"; + ?> + + + + '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + ?> + + Loan Amount Applied For :

"; + //echo '
PD Initiated Date : ' . $pd_master_details[0]['createdon'] . '
FI PD Date : ' . $pd_master_details[0]['pd_visit_date'] . '
PD Report Date : ' . $pd_master_details[0]['pd_report_generated_date'] . '
PD Initiated by : ' . $pd_master_details[0]['branch_name'] . ' Branch
PD Type : Telephonic
Product : ' . $pd_master_details[0]['product_name'] . '
Customer Segment : ' . (explode('-', $pd_master_details[0]['customer_segment_name'])[0]) . '
+ echo '
'; + //echo "
"; + echo "

"; + echo "

"; + echo "

"; + echo "

"; + echo "

"; + echo "

"; + + $header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1); + if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) { + echo '

Disclaimer: ' . $header_lender_disclaimer['disclaimer'] . '

'; + } + + echo '

Registered / Corporate Office: SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002

'; + ?> + + + + + + $individual) { + //print_r($individual);die(); + if ($individual['is_person_met'] == true) { + //array_push($person_met_images); + $temp_person_met = array(); + $applicant_name = $individual['applicant_name']; + //$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ; + //echo '
'.$individual['applicant_title_name_master'] .' '. $applicant_name.'
' ; + $temp_person_met['name'] = $individual['applicant_title_name_master'] . ' ' . $applicant_name; + $temp_person_met['photo'] = ''; + $temp_person_met['id_proof'] = ''; + foreach ($pd_images[18] as $pm_Key => $pm_value) { + + //echo $applicant_name.'-'.$pm_value['pd_document_title']; + if (!strcasecmp(trim($applicant_name), trim($pm_value['pd_document_title']))) { + $temp_person_met['photo'] = $pm_value['doc_url']; + } + + $id = trim($applicant_name) . '-id_proof'; + if (!strcasecmp($id, trim($pm_value['pd_document_title']))) { + $temp_person_met['id_proof'] = $pm_value['doc_url']; + } + } + $company_relationship_data = null; + foreach ($general_form['company_with_relationships'] as $company_with_relationship) { + if ($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name']) { + //FInd Company Name from JSON + $company_relationship_data .= $company_with_relationship['company_relationship_master'] . ' ' . $company_with_relationship['company_name']; + + //$company_relationship_data.='
and

'; + $company_relationship_data .= ', '; + } + } + //$temp_person_met['name'] = + //print_r($general_form['persons_with_relationships']); + $personal_relationship_data = null; + foreach ($general_form['persons_with_relationships'] as $persons_with_relationship) { + if ($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship'])) { + + if (isset($persons_with_relationship['relation_to_master'])) { + //? $persons_with_relationship['relation_to_master'] : " Could Not Find"; + $RSNA = $persons_with_relationship['relation_to_master']; + if (isset($persons_with_relationship['relationship_master'])) { + $personal_relationship_data .= $persons_with_relationship['relationship_master'] . ' Of ' . $RSNA; + //$personal_relationship_data.='
and

'; + $personal_relationship_data .= ', '; + } + } + } + } + + $company_relationship_data .= $personal_relationship_data; + $temp_person_met['relations'] = $company_relationship_data; + array_push($person_met_data, $temp_person_met); + } + } + + + //print_r($person_met_data);die(); + echo '
'; + echo '

Person(s) Met:

'; + echo '
'; + foreach ($person_met_data as $pk => $person) { + $display_for_person_met = $person['relations'] != "" ? substr_replace($person['relations'], '.', strrpos($person['relations'], ','), 1) : ''; + + $person_met_details = $person['name']; + if (strcasecmp($pd_master_details[0]['customer_segment_abbr'], 'SEP_INDV')) { + $person_met_details .= ($display_for_person_met != "" ? ' - ' . $display_for_person_met : ''); + } + echo '

' . $person_met_details . '

'; + + //if($display_for_person_met != "" || $display_for_person_met != null){ + echo '

'; + //} + if ($person['photo']) { + echo ''; + } + echo '     '; + if ($person['id_proof']) { + echo ''; + } + + //echo count($person_met_data) != ($pk+1)? '
':''; + + + } + $faceimage_url = array(); + if (isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1) { + foreach ($pd_images['common_images'] as $com_key => $com_value) { + if ($com_value['pd_document_title'] == 'face_api_result_image') { + // $faceimage_url = $com_value['doc_url'];break; + array_push($faceimage_url, $com_value['doc_url']); + } + } + } + if (!empty($faceimage_url)) { + for ($i = 0; $i < count($faceimage_url); $i++) { + echo '     '; + echo ''; + } + } + echo '
'; + echo '
'; + ?> + +
+ Face Comparison"; + $notequal_mark = '
'; + $equal_mark = '
=
'; + for ($i = 0; $i < count($ci); $i++) { + $symbol = (round($ci[$i]["Similarity"]) > 50) ? '

' . $equal_mark . '

' : '

' . $notequal_mark . '

'; + echo '
+
+ ' . $si[ +
+
' . $symbol . '
+
+ ' . $ci[$i][ +
+
'; + + echo '

Similarity + ' . round($ci[$i]["Similarity"]) . ' +

+
+
+ ' . round($ci[$i]["Similarity"]) . ' +
+
'; + } + // ########################### End of Percentage Bar Section ######################################### + } + } + ?> + + + + + + + + + + + + + $individual) { + + if ($individual['is_applicant'] == true && $individual['is_active'] == true) { + + $education_qualification = $individual['qualification_master']; + $education_qualification = $individual['course_name'] != "" || $individual['course_name'] != null ? $education_qualification . '
(' . $individual['course_name'] . ')' : $education_qualification; + + + $applicant_name = array_key_exists('pd_co_applicant_id_master', $individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find"; + //echo $applicant_name.'**************************'; + + $title = isset($individual['applicant_title_name_master']) && $individual['applicant_title_name_master'] != "" ? $individual['applicant_title_name_master'] : ''; + + //$kyc_data = ''; + $applicant_name = $title . ' ' . $applicant_name; + if ($ind_key == 0 && array_key_exists('is_kyc', $general_form) && $general_form['is_kyc'] == 'no') { + $applicant_name = 'As per the request received applicant name is ' . $applicant_name . '
but as per KYC name is ' . $general_form['kyc_and_captur_the_name']; + //$kyc_data = "

Name noticed as per KYC is ". $general_form['kyc_and_captur_the_name']; + } + echo '"; + } + } + + if (isset($general_form['companies']) && count($general_form['companies'])) { + $business_entity_type_master = array(1 => 'Others', 2 => 'Public Ltd Company', 3 => 'Sole proprietorship', 4 => 'HUF (Hindu Undivided Family)', 5 => 'Partnership', 6 => 'Cooperative', 7 => 'Limited Liability Partnership(LLP)', 8 => 'OPC (One Person Company)', 9 => 'Society', 10 => 'Trust', 11 => 'Private Limited Company'); + foreach ($general_form['companies'] as $comp_key => $ind_company) { + if ($ind_company['is_company_applicant'] != null) { + + echo ''; + } + } + } + ?> + +
NameAge
(Yrs/Mns)
Qualification / Type of EntityRelationships
' . $applicant_name . '' . $individual['age'] . '' . $education_qualification . ''; + + $company_relationship_data = null; + //print_r($general_form['company_with_relationships']); + foreach ($general_form['company_with_relationships'] as $crk => $company_with_relationship) { + + //print_r($company_with_relationship); + + if ($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'] && $company_with_relationship['company_name'] != '') { + //FInd Company Name from JSON + + //echo "ONCE"; + //echo '### '.$crk.'-ICID'.$individual['pd_co_applicant_id'].'--'.$company_with_relationship['applicant_name'].'-'.$company_with_relationship['company_name']; + $company_relationship_data .= ($company_with_relationship['company_relationship_master'] . ' ' . $company_with_relationship['company_name']); + + $company_relationship_data .= '
and

'; + //echo $company_relationship_data; + } + } + //echo $company_relationship_data; + // die(); + $personal_relationship_data = null; + foreach ($general_form['persons_with_relationships'] as $persons_with_relationship) { + + + + if (($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] || !strcasecmp($applicant_name, $persons_with_relationship['applicant_name'])) && isset($persons_with_relationship['relationship'])) { + + + if (isset($persons_with_relationship['relation_to_master'])) { + $RSNA = $persons_with_relationship['relation_to_master']; + if (isset($persons_with_relationship['relationship_master'])) { + $personal_relationship_data .= $persons_with_relationship['relationship_master'] . ' of ' . $RSNA; + + $personal_relationship_data .= '
and

'; + } + } + } + } + $company_relationship_data .= $personal_relationship_data; + echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '
and

'), strlen($company_relationship_data)); + + echo "
' . $ind_company['company_name'] . '' . $ind_company['business_years'] . (isset($ind_company['business_month']) ? ' . ' . $ind_company['business_month'] : null) . '' . ($ind_company['business_entity_type'] == 1 ? $ind_company['business_entity_type_other'] : $business_entity_type_master[$ind_company['business_entity_type']]) . ' Not Applicable
+ + + + + ' . $general_form['general_remark'] . '

'; + } + ?> + + + + + + + 'well suited', 'fairly_suited' => 'fairly suited', 'not_suited' => 'not suited'); + //die(); + if (isset($pd_score) && count($pd_score)) { + echo '
'; + echo '

PD Score Summary

'; + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Actual ScoreMax ScoreScore %
General Section Score
Business Section Score
Final Remarks Score
Final PD Score
+ +
"; + + echo '

'; + } + // else + // { echo "Score Chart Not Generated"; } + + + + //######################### CHART ########################### + + + // if(isset($dsc_cards['base64_dsc_business'])) + // { + // echo "

"; + + // echo '

'; + + // } + // else + // { + // //echo "Score Chart Not Generated"; + // } + + // if(isset($dsc_cards['base64_dsc_general'])) + // { + // echo "

"; + + // echo '

'; + + // } + // else + // { + // //echo "Score Chart Not Generated"; + // } + + + echo "
"; + //######################### CHART ########################### + + $business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>", "owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>", "stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>"); + if ($pd_master_details[0]['lender_short_name'] != 'CFPL') { + $general_captions = array("otp_done" => "OTP authentication done >>", "person_met_is_applicant" => "Is person Met, a loan applicant >>", "qualification" => "Qualification of Loan Applicants >>", "comment_locality" => "Comment on Locality >>", "pd_location_approach" => "Approach to PD location >>", "customer_behaviour" => "Customer Behaviour >>", "neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>", "was_the_company_name_board_sighted" => "Business Board Sighted >>", "value_of_other_assets" => "Asset Value by Loan Amount % >>"); + } else { + $general_captions = array("otp_done" => "OTP authentication done >>", "person_met_is_applicant" => "Is person Met, a loan applicant >>", "qualification" => "Qualification of Loan Applicants >>", "comment_locality" => "Comment on Locality >>", "pd_location_approach" => "Approach to PD location >>", "customer_behaviour" => "Customer Behaviour >>", "neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>", "was_the_company_name_board_sighted" => "Business Board Sighted >>"); + } + + + + + echo ''; + echo ''; + + echo ''; + foreach ($pd_score['business'] as $bsk => $business_score) { + + $class = null; + $answer = null; + $per = $business_score['attributed_score'] > 0 && $business_score['max_score'] > 0 ? (($business_score['attributed_score'] / $business_score['max_score']) * 100) : 0; + + $class = ($per >= 80 ? 'rcorners_green' : ($per >= 65 && $per < 80 ? 'rcorners_light_green' : ($per >= 50 && $per < 65 ? 'rcorners_amber' : 'rcorners_red'))); + + // if($bsk == 'business_seasonality') + // { + // echo "BUSINESS"; + // echo $per; + // echo $class; + // echo $per >= 80 ? 'rcorners_green' : 'SOME'; + // die(); + // } + + if ($bsk == 'location_suited_for_busienss') { + $answer = $address_type_remarks_caption[$business_score['answer']]; + } else if ($bsk == 'cerificates') { + $answer = $per > 0 ? 'Yes' : 'No'; + } else if ($bsk == 'no_of_years_business_run') { + $answer = isset($business_score['answer']) ? $business_score['answer'] . ' Yrs' : ''; + } else if ($bsk == 'business_seasonality') { + $answer = isset($business_score['answer']) ? ((!strcasecmp($business_score['answer'], 'yes')) ? 'Seasonal' : 'Not Seasonal') : ''; + } else if ($bsk == 'vintage_of_business_account') { + $answer = isset($business_score['answer']) && $business_score['answer'] != '' ? $business_score['answer'] : 'No'; + } else { + $answer = isset($business_score['answer']) ? $business_score['answer'] : ''; + } + + if (strcasecmp($answer, 'Not Applicable')) { + echo ''; + } + } + echo ''; + echo '
Business Related Parameters Impacting Score Response
' . $business_captions[$bsk] . ' ' . '
' . ucfirst($answer) . '
'; + echo '


'; + + echo ''; + echo ''; + + echo ''; + foreach ($pd_score['general'] as $gsk => $general_score) { + $class = null; + $per = $general_score['attributed_score'] > 0 && $general_score['max_score'] > 0 ? (($general_score['attributed_score'] / $general_score['max_score']) * 100) : 0; + + $class = ($per >= 80 ? 'rcorners_green' : ($per >= 65 && $per < 80 ? 'rcorners_light_green' : ($per >= 50 && $per < 65 ? 'rcorners_amber' : 'rcorners_red'))); + + $answer = ucfirst($general_score['answer']); + + if ($gsk == 'value_of_other_assets') { + //print_r($general_score);die(); + $answer = round((($answer / $loan_form['loan_amount']) * 100), 2) . ' %'; + } + + if (strcasecmp($answer, 'Not Applicable')) { + echo ''; + } + } + echo ''; + echo '
Other Parameters Impacting ScoreResponse
' . $general_captions[$gsk] . ' ' . '
' . $answer . '
'; + + + // + } //end of is score card enabled for this pd + + ?> + + $address_image_value) { + if ($address_image_value['is_show_report'] == 1) { + $pd_location_approach_img_url = isset($address_image_value['doc_url']) ? $address_image_value['doc_url'] : ''; + //$pd_location_approach_img_location = $address_image_value['location']; + //$pd_location_approach_img_date = date('Y/m/d h:s:i A',$address_image_value['createdon']); + break; + } + } + + $name_board_seen_img_url = ''; + if (isset($pd_processed_forms[13][0])) { + + $first_business_form = json_decode($pd_processed_forms[13][0]['processed_json'], true); + //if($first_business_form['was_the_company_name_board_sighted']=='yes') + //{ + //echo 'YES';die(); + foreach ($pd_images[13] as $image_key => $image_value) { + if ($image_value['pd_document_title'] == 'Name Board Seen') { + + $name_board_seen_img_url = $image_value['doc_url']; + break; + } + } + //} + } + + //echo $name_board_seen_img_url;die(); + //print_r($address_images);die(); + ?> +
+

BUSINESS LOCATION

+ +

Address at which PD was initiated: ' . $pd_address['address'] . ', ' . $pd_address['city_master'] . ', ' . $pd_address['state_master'] . ' - ' . $pincode . '.'; + + echo '
Address at which PD Visit actually done: ' . $pd_alternative_address['alternative_address'] . ', ' . $pd_alternative_address['city_master'] . ', ' . $pd_alternative_address['state_master'] . ' - ' . $alter_native_pincode . '.'; + + echo '
Reason for change in PD address:' . $pd_alternative_address['reason_for_alternative_address']; + } else { + + echo 'Business Address : ' . $pd_address['address'] . ', ' . $pd_address['city_master'] . ', ' . $pd_address['state_master'] . ' - ' . $pincode . '.'; + } + + echo '

GPS Coordinates of Business Address : '; + echo isset($pd_master_details[0]['start_location']) ? $pd_master_details[0]['start_location'] : 'Not Available'; + echo '

'; + ?> + $com_value) { + if ($com_value['pd_document_title'] == 'satellite') { + $satellite_url = $com_value['doc_url']; + break; + } + } + } + + ?> +  Satellite Image of location of Where PD was Done


+ + + + + + + + + + + + +
Name Board of Business/Entrance
+ Name Board +
+ +

+
+

Location Summary

+ '; + echo 'The ' . $address_type . 'Address Form - Type of Address is ' . $property_owner_type . 'Business Assest Form - Owner of the Property and the business has been in operation from here for the last ' . $yrs_being_run . 'Business Assest Form - Business running Yrs in this premise .'; + echo '

The ' . $address_type . 'Address Form - Type of Address is located in ' . $locality . 'Address Form - Locality of Address ' . ($estimated_area != 0 ? 'and the estimated area of the ' . $address_type . 'Address Form - Type of Address is ' . $estimated_area . 'Address Form - Estimated Area .' : ''); + // echo '

The PD location was '. $pd_address['pd_location_master'].'Address Form - Approach to PD location . ' . 'As Per PD Officer, the '.$address_type .'Address Form - Type of Address is situated in '.$comment_locality_master .'Address Form - Comment on locality Locality.'; + // echo '

The PD officer also made the following observations:' ; + echo '
'; + + // echo '
  • The location of the '.$address_type.'Address Form - Type of Address is '.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].'Final Remarks Form - The location of the busienss suitability for Business to the nature of business.
  • '; + + if ($first_business_form['was_the_company_name_board_sighted'] == 'yes') { + echo '

    The business name board photograph was shared by applicant.Business Form'; + } else { + echo '

    The business name board photograph was not shared by applicant.Business Form'; + } + + if ($address_form['address_proof_provided'] == 'yes') { + echo ' The address proof was shared by applicant.Business Form'; + } else { + echo ' The address proof was not shared by applicant.Business Form'; + } + echo '

    '; + + + // if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes') + // { + // echo '
  • Business Activity was seen during visit.Business Assest Form - Busienss activity seen during PD visit
  • '; + // } + // else{ + // echo '
  • No business activity was seen during the PD visit.Business Assest Form - Busienss activity seen during PD visit
  • '; + // } + // if(isset($business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark']) && $business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] != ""){ + // echo '
  • '.$business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] .'Business Assest Form - Busienss Assest Form Remarks
  • ';} + + if (isset($final_remark_data['is_competition'])) { + if ($final_remark_data['is_competition'] == 'yes') { + echo '
  • ' . $final_remark_data['appx_outlet_or_stores'] . ' Units with similar business were sighted in the locality
  • '; + } else { + echo '
  • PD officer did not observe any similar business units in the locality.
  • '; + } + } + if (isset($final_remark_data['demolition_activity'])) { + if ($final_remark_data['demolition_activity'] == 'yes') { + echo '
  • ' . $final_remark_data['comment_of_demolition_activity'] . '
  • '; + echo '
    Demolition Image Not Available'; + } else { + echo '
  • No demolition activity was observed in the locality.
  • '; + } + } + + + if (isset($final_remark_data['sealing_activity'])) { + if ($final_remark_data['sealing_activity'] == 'yes') { + echo '
  • ' . $final_remark_data['comment_of_sealing_activity'] . '
  • '; + echo '
    Demolition Image Not Available'; + } else { + echo '
  • No sealing activity was observed in the locality.
  • '; + } + } + + if (isset($final_remark_data['outlet_location'])) { + if ($final_remark_data['outlet_location'] == 'heavy_footfall') { + echo '
  • Heavy Footfall ( Lots of customer in the locality / market place )
  • '; + } else if ($final_remark_data['outlet_location'] == 'medium_footfall') { + echo '
  • Medium Footfall ( Meduim no of customer in the locality / market place )
  • '; + } else if ($final_remark_data['outlet_location'] == 'low_footfall') { + echo '
  • LOw Footfall ( Few customer in the locality / market place )
  • '; + } + } + + echo ""; + + if ($address_form['address_form_remark']) { + echo '' . $address_form['address_form_remark'] . 'Address Form - Address Form Remarks '; + } + echo "

    "; + // echo "
    "; + //die(); + // + ?> + + + + + + + + The following loan related information was provided by applicant.'; + + $is_current_product_bl = $pd_master_details[0]['prod_catagory'] == "BL" ? true : false; + $is_current_product_lab = $pd_master_details[0]['prod_catagory'] == "LAP" ? true : false; + $is_current_product_laep = $pd_master_details[0]['prod_catagory'] == "LAEP" ? true : false; + // echo $pd_master_details[0]['product_abbr']; + // echo '-bl-'. $is_current_product_bl; + // echo '-lap-'.$is_current_product_lab; + // die(); + $loan_table_dispaly_rows = array(); + + + if ($is_current_product_bl || $is_current_product_laep) { + $to_dispaly = !strcasecmp($loan_form['is_there_total_fund'], 'yes disclose') ? ('Disclosed ' . "" . " " . MYUTIL::customIndianNumberFormat($loan_form['fund_amt']) . ' (' . MYUTIL::numtowords($loan_form['fund_amt']) . ')') : 'Not Disclosed'; + $loan_table_dispaly_rows[] = array('particulars' => 'Total Fund Requirement', 'details' => $to_dispaly); + } + + + $end_use = ''; + $to_remove_for = false; + foreach ($loan_form['end_use_master'] as $enduse) { + if (strpos(strval($enduse), 'Others') === false) { + $end_use .= $enduse . ' and '; + } else { + + $to_remove_for = true; + $end_use .= $loan_form['end_use_other'] . ' and'; + } + } + $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'), strlen($end_use)); + //echo substr($end_use,0,3); + + + if (strcasecmp(substr($end_use, 0, 3), 'for')) { + if (!(count($loan_form['end_use_master']) == 1 && $to_remove_for)) { + $end_use = 'For ' . $end_use; + } + } + + + + if (strcasecmp($loan_form['is_transfer'], 'no')) { + + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']) . ' (' . MYUTIL::numtowords($loan_form['balance_transfer_amount']) . ')'); + + $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['topup_amount']) . ($loan_form['topup_amount'] ? (' (' . MYUTIL::numtowords($loan_form['topup_amount']) . ')') : '')); + + if ($loan_form['end_use_topup_master']) { + $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'] == 1 ? $loan_form['other_bt_lender'] : $loan_form['lender_master']); + } else { + //echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab); die(); + if ((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep) { + $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution', 'details' => is_numeric($loan_form['own_contribution']) && $loan_form['own_contribution'] != 0 ? ("" . " " . MYUTIL::customIndianNumberFormat($loan_form['own_contribution']) . ' (' . MYUTIL::numtowords($loan_form['own_contribution']) . ')') : 'Not Provided'); + $source_of_own_contribution = ''; + + foreach ($loan_form['source_of_own_contribution_master'] as $own_source) { + + if (!strcasecmp($own_source, 'others')) { + $source_of_own_contribution .= $loan_form['other_source'] . ' and '; + } else { + $source_of_own_contribution .= $own_source . ' and '; + } + } + + $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '), strlen($source_of_own_contribution)); + + $loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution', 'details' => $source_of_own_contribution); + } + } + if (!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL')) { + $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying', 'details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0 ? ($rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emi_level']) . ' (' . MYUTIL::numtowords($loan_form['emi_level']) . ')') : "Not Provided"); + } + + if (!$is_current_product_bl && !$is_current_product_laep) { + + 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']); + + //print_r($loan_form);die(); + $owners_list = null; + foreach ($loan_form['owners_list_master'] as $owner) { + $owners_list .= $owner . ' and '; + } + ///echo $owners_list; + $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'), strlen($owners_list)); + if ($owners_list == '') { + if (isset($loan_form['owner_name_group'][0]['owner_name'])) { + $owners_list = $loan_form['owner_name_group'][0]['owner_name']['name']; + } + } + $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' => ($loan_form['emv_per_customer'] != "" ? $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']) . ' (' . MYUTIL::numtowords($loan_form['emv_per_customer']) . ')' : 'Not Provided')); + } + } + + if (isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') { + $loan_table_dispaly_rows[] = array('particulars' => 'Current Owner/Seller of the property', 'details' => $loan_form['property_seller']); + } + + if (isset($loan_form['address']) && $loan_form['address'] != '') { + $address_of_owner_seller_property = $loan_form['address'] . (isset($loan_form['city_master']) ? ', ' . $loan_form['city_master'] : '') . (isset($loan_form['state_master']) ? ', ' . $loan_form['state_master'] : '') . (isset($loan_form['pincode_master']) ? ', ' . $loan_form['pincode_master'] : ''); + + $loan_table_dispaly_rows[] = array('particulars' => 'Address of the property', 'details' => $address_of_owner_seller_property); + } + //print_r($loan_table_dispaly_rows); + if ($pd_master_details[0]['lender_short_name'] != 'CFPL') { + ?> +

    + + + + + + $row) { + echo '"; + } + ?> + +
    S.No
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    + +
    +

    Anchor Details Section:

    + + + + + + + + $row) { + echo '"; + } + ?> + +
    S.No Particulars Particular Details
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    +
    " . $loan_form['loandetails_remarks']; + ?> + + + + + + 0) { + for ($business_count = 0; $business_count < $total_no_of_business; $business_count++) { + + if ($general_form['companies'][$business_count]['is_active'] == true) { // $temp_show = null; + // if($temp_show == null) + // { + ?> + + .'; + } + $bindEachResult['company_employees'] = ''; + + + // this is for no of employees details + if (isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) { + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent'; + } else { + $bindEachResult['company_employees'] = 'As per loan applicant, 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 { + + $bindEachResult['company_employees'] .= ' and no temporary employees with company.'; + } + + if (($businessRow['employees_permanent'] != "" && $businessRow['employees_permanent'] == 0) && ($businessRow['employees_temporary'] != "" && $businessRow['employees_temporary'] == 0)) { + + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent or temporary employees with the company.'; + } + + if (isset($businessRow['employees_appx_salary']) && $businessRow['employees_appx_salary'] != "") { + $bindEachResult['employees_appx_salary'] = 'Approximately ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($businessRow['employees_appx_salary']) . ' is being paid as salary to employees'; + } + if (isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0) { + $emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee'; + $bindEachResult['officer_visit_company_employees'] = 'At the time of PD visit, the officer sighted ' . $businessRow['officer_total'] . ' ' . $emp . ' at the business premises.'; + } else { + + $bindEachResult['officer_visit_company_employees'] = ''; + //$bindEachResult['officer_visit_company_employees']='At the time of PD visit, no employees seen at the business premises.'; + } + //this is documents visited + $getDocuments = array(); + if (array_key_exists('shop_eat_act_cert', $businessRow) && strtoupper($businessRow['shop_eat_act_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Shop/Est act Certificate.', 'img' => isset($businessRow['shop_eat_act_cert_pic']) ? $businessRow['shop_eat_act_cert_pic'] : '', 'key_name' => 'shop_eat_act_cert_pic')); + } + if (array_key_exists('gst_Regn_cert', $businessRow) && strtoupper($businessRow['gst_Regn_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'GST Registration.', 'img' => isset($businessRow['gst_Regn_cert_pic']) ? $businessRow['gst_Regn_cert_pic'] : '', 'key_name' => 'gst_Regn_cert_pic')); + } + if (array_key_exists('pf_regn', $businessRow) && strtoupper($businessRow['pf_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'PF Registration.', 'img' => isset($businessRow['pf_regn_pic']) ? $businessRow['pf_regn_pic'] : '', 'key_name' => 'pf_regn_pic')); + } + if (array_key_exists('esic_regn', $businessRow) && strtoupper($businessRow['esic_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'ESIC Registration.', 'img' => isset($businessRow['esic_regn_pic']) ? $businessRow['esic_regn_pic'] : '', 'key_name' => 'esic_regn_pic')); + } + if (array_key_exists('export_import_cert', $businessRow) && strtoupper($businessRow['export_import_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Export/Import Certificate.', 'img' => isset($businessRow['export_import_cert_pic']) ? $businessRow['export_import_cert_pic'] : '', 'key_name' => 'export_import_cert_pic')); + } + if (array_key_exists('factory_cert', $businessRow) && strtoupper($businessRow['factory_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Factory Certificate.', 'img' => isset($businessRow['factory_cert_pic']) ? $businessRow['factory_cert_pic'] : '', 'key_name' => 'factory_cert_pic')); + } + if (array_key_exists('eb_bill', $businessRow) && strtoupper($businessRow['eb_bill']) == 'YES') { + array_push($getDocuments, array('name' => 'Electric Bill.', 'img' => isset($businessRow['eb_bill_pic']) ? $businessRow['eb_bill_pic'] : '', 'key_name' => 'eb_bill_pic')); + } + if (strtoupper($businessRow['other_documents']) == 'YES' && array_key_exists('documents', $businessRow)) { + foreach ($businessRow['documents'] as $docValue) { + array_push($getDocuments, array('name' => $docValue['document'], 'img' => isset($docValue['document_pic']) ? $docValue['document_pic'] : '', 'key_name' => $docValue['document'])); + } + } + + //print_r($getDocuments); + if (count($getDocuments)) { + foreach ($getDocuments as $getDocument_key => $getDocument_value) { + foreach ($pd_images[13] as $img_key => $img_value) { + if (!strcasecmp($getDocument_value['key_name'], $img_value['pd_document_title'])) { + $getDocuments[$getDocument_key]['img'] = $img_value['doc_url']; + break; + } + } + } + } + //print_r($getDocuments);die(); + $bindEachResult['visit_documents'] = $getDocuments; + array_push($businessResult, $bindEachResult); + + + + ?> +

    BUSINESS INFORMATION:

    + $fetchRow) { + //print_r($fetchRow['company_details']);die(); + ?> + +

    +

    +

    + +
    Date of Incorporation :
    + +
    Business Vintage : +

    + + +
    +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NameShare HoldingNo.of Years in Current BusinessTotal Work Experience(Yrs)Previous ExperienceStarted Business
    + + + 0) { ?> +
    +

    Other Family Members involved in business :

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NameIndividual RelationshipRelated toRelationship to Company / FirmStarted Business (Yes / No)
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    ' . $process_brief['description'] . '

    '; ?>
    + + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    ServicesArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + 0) { ?> + + +
    + + + + + + + + + + + + + + + +
    Other Business Activity
    +
    ' . $fetchRow['total_per_of_export'] . ' % of total sales is export.
    '; + } + + ?> + + + + + Loan applicant is using Mobile Wallets/UPI for business transactions.

    '; + } //else + //{ + // echo '

    As per person`s met,applicant using Mobile Wallets/UPI for business transactions.

    ' + //} + if (!strcasecmp($fetchRow['applicant_use_pos_machines'], 'yes')) { + echo '

    The applicant has the following POS machines:

    '; + echo ''; + echo ''; + foreach ($fetchRow['pos_machines_details'] as $pos) { + echo ''; + } + echo '
    Name of the Financial Insitution TID Number of POS machine
    ' . ($pos['pos_machines_financial_institution_name'] ? $pos['pos_machines_financial_institution_name'] : 'Not Provided') . ' ' . $pos['tid_no_of_pos_machine'] . '
    '; + } + + + + ?> + + + + + + + + + + + +
    +

    +
    + + + + +

    +

    +

    + + + + +

    The below document images were shared :

    + + + + '; + for ($doc = $from; $doc <= $to; $doc++) { + if (isset($visit_documents[$doc])) { + ?> + + '; + $from_index_increment = $from_index_increment + 2; + } ?> + +
    + +
    + + + + ' . $business_form_common_remarks . '

    '; + } + + ?> + + + + + + + +
    + + + + + + 0 && $is_business_asset_available) { + $bindBusinessAsset['details'] = ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'], $pd_master_details[0]['pd_id']); + } + array_push($businessAssetResult, $bindBusinessAsset); + + + //print_r($businessAssetResult);die(); + ?> + + + + +
    +
    +
    +

    Assets used in Business

    + $iterateAsset) { ?> +

    + + $value) { + echo ''; + echo ''; + echo $value['header_row']; ?> + +'; + echo '
    '; + echo '
    '; + } + } + } + } 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 +?> + + + + + + +
    +↑ /'; + + if (isset($pd_processed_forms[14][$business_count])) { + $baRow = $pd_processed_forms[14][$business_count]; + $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 (isset($businessFinancialRow['kuccha_records_shown'])) { + $financial_kuccha_info['kuccha_records_shown'] = $businessFinancialRow['kuccha_records_shown']; + $financial_kuccha_info['kuccha_bill_allowed'] = $businessFinancialRow['kuccha_bill_allowed']; + $financial_kuccha_info['customer_declared_turnover'] = $businessFinancialRow['customer_declared_turnover']; + } + + //only for Indusind Lender + if (isset($businessFinancialRow['tot_business_FY'])) { + $current_business_info['tot_business_FY'] = $businessFinancialRow['tot_business_FY']; + $current_business_info['remarks_tot_business_FY'] = $businessFinancialRow['remarks_tot_business_FY']; + $current_business_info['orders_hand_FY'] = $businessFinancialRow['orders_hand_FY']; + } + + //print_r($financial_kuccha_info);die(); + if (strtoupper($businessFinancialRow['is_financial_statements']) == 'YES' && count($businessFinancialRow['date_per_financial']) > 0) { + $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["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"] = ""; + //$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) { + + $bindBusinessFinancial["financial_customer"] = ""; + //$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 { + + + $bindBusinessFinancial["financial_customer"] = "As per Loan Applicant(s), the actual turnover and net profit of his business is same as disclosed in financial statements."; + $bindBusinessFinancial['customer_statements'] = array(); + $bindBusinessFinancial['customer_statements_header'] = array(); + $bindBusinessFinancial['is_customer_statement'] = 0; + } + + + // ############### this section only for CLIX HOUSING FINANCE LENDER + if (isset($businessFinancialRow['is_turnover_validated']) && strtoupper($businessFinancialRow['is_turnover_validated']) == 'YES') { + $bindBusinessFinancial['turnover_statements'] = FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['customer_statements_header'] = FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['how_turnover_validated'] = (!strcasecmp(strtolower($businessFinancialRow['how_turnover_validated']), 'others')) ? 'Validated from ' . $businessFinancialRow['turnover_validated_others'] : $businessFinancialRow['how_turnover_validated']; + $bindBusinessFinancial['is_turnover_validated'] = 1; + } + // ############### this section only for CLIX HOUSING FINANCE LENDER + $bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days']; + $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days']; + $bindBusinessFinancial['working_capital_unsold_stock'] = is_numeric($businessFinancialRow['unsold_stock_lies_in_days']) ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; + $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; + if (isset($businessFinancialRow['select_working_capital_facilities_availed'])) { + foreach ($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v) { + switch ($v['id']) { + case 1: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['name'] = $businessFinancialRow['other_reason_for_working_capital_facilities_availed']; + + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['reason_for_working_capital_facilities_availed']; + break; + + case 2: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['bank_guarantee']; + break; + + case 3: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['cash_credit_limit']; + break; + + case 4: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 5: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 6: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['letter_of_credit']; + break; + case 7: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit']; + break; + case 8: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name']; + break; + case 9: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount']; + break; + case 10: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type']; + break; + case 11: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor']; + break; + case 12: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date']; + break; + case 13: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi']; + break; + } + } + } + + $bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null; + + $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']); + if ($pd_master_details[0]['lender_short_name'] == 'CFPL') { + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year", 'details' => isset($businessFinancialRow['turnover_lastcomplete_year']) ? $businessFinancialRow['turnover_lastcomplete_year'] : null); + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)", 'details' => isset($businessFinancialRow['ytd_turnover']) ? $businessFinancialRow['ytd_turnover'] : null); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null ); + } + array_push($businessFinancialResult, $bindBusinessFinancial); + +?> + + 0) { + + ?> + +

    Financial Information

    + 0) { + ?> +

    Company / Firm Name : " . $iterateFinance['company_name']; ?>

    +

    No of Years of Financial Statements provided : " . $iterateFinance['years_data_provided']; ?>

    +

    Snapshot of Financials as per Books of Account Provided : "; ?>

    + + + + + + " . "FY " . $bfRow['financial_year'] . ""; + } ?> + + + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']) . ''; + } ?> + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']) . ''; + } else { + echo ''; + } + } ?> + + + + ' . $bfRow['financial_margin_of_profit'] . ' %'; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } ?> + + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + +
    Particulars
    Sales / Revenue (Rs)
    Net Profit / (Net Loss) (Rs) (' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']) . ')
    Net Profit or (Net Loss) to Sales % (' . $bfRow['financial_margin_of_loss'] . ' %)
    % () in Sales over PY' . $bfRow['sale_variation'] . ' %(' . $bfRow['sale_variation'] . ' %)NA
    % () in Net Profit over PY' . $bfRow['profit_variation'] . ' %(' . $bfRow['profit_variation'] . ')NA
    % () in Net Profit % over PY' . $bfRow['financial_profit_to_sale_variation'] . ' %(' . $bfRow['financial_profit_to_sale_variation'] . ' %)NA
    +

    ' . $comments_on_financials . '

    '; + } + } + //else{ echo "

    Financial statements not provided by Loan Applicants to PD officer.

    ";} + ?> + + + +

    + 0) { + //print_r($iterateFinance['customer_statements']); + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    As per Loan Applicant(s), the Financials are as below:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + + As per Loan Applicant(s) met,' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) . ' as Annual sales through credit cards / POS machines.

    '; + }; + } ?> + As per Loan Applicant(s) met, the financials figures were not provided.

    "; } + + // ####################### THIS SECTION ONLY FOR CLIX HOUSING FINANCE LENDER ##########################--> + + if (isset($iterateFinance['turnover_statements'])) { + foreach ($iterateFinance['turnover_statements'] as $turnover) { + if (!strcasecmp($turnover['estimate_net_margin_availablity'], 'yes')) { + ?> +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + Turnover and Netprofit was ' . $iterateFinance['how_turnover_validated']; + } + ?> + + + + + + Validation of Customer Declared Financials :

    '; + // echo 'Kuccha Record Seen (Yes/No) : ';echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.'; + if ($financial_kuccha_info['kuccha_records_shown'] == 'yes') { + echo '

    Validation of Customer Declared Financials :

    '; + echo 'Kuccha Record Seen (Yes/No) : '; + echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : ''; + echo '

    Photograph of Kuchha Bills Shared (Yes/No) : ' . ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report' : 'No'); + + // echo '

    Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No'); + } + } + + //only for Indusind Lender + if (count($current_business_info)) { + echo '

    Current Business :

    '; + echo 'Approximate Total Business / Sales Done for Current FY as on date is ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($current_business_info['tot_business_FY']); + echo $current_business_info['remarks_tot_business_FY'] != "" ? ' ( ' . $current_business_info['remarks_tot_business_FY'] . ' ) ' : ''; + echo '
    Orders in Hand to be executed in Current FY : ' . $current_business_info['orders_hand_FY']; + } + ?> + + + + + + + + + + + + $facility) { + echo ''; + } ?> + +
    S.NoParticularsDetails
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    S.NoParticularsDays
    1Debtor Days
    2Creditor Days
    3Stock Days
    + + + +

    + + + + + + + + + + + $facility) { + + echo ''; + } ?> + +
    S.NoFacility TypeFacility Details
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + The Loan Applicants have not availed any " . $business_fin_sub_title2 . " from any financial institution.

    "; + } + } + ?> + + ' . $financial_remarks . '

    '; + } + } else { ?> +

    Financial information is not available.

    + + + + + + 0) { + $getEachValues['is_od_cc'] = null; + foreach ($businessBankRow['banking_details'] as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $getEachValues['is_od_cc'] = true; + } + } + $getEachValues['bankDetails'] = BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getEachValues); + } + } + + ?> + + Business Banking:'; + if ($is_business_banking_available != null) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant(s), Applicant does not have any business account.

    '; + } + + if ($business_banking_common_remarks != "") { + echo '

    ' . $business_banking_common_remarks . '

    '; + } + } // end of busienss bankDetails available in this currrent index + ?> + + + + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $newBankingResult = array_merge($newBankingResult, $getBuinessEachValues); + } + } + // if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) + // { + // if(count($individualBankRow['banking_details'])>0){ + // $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); + // $newBankingResult = array_merge($newBankingResult,$getIndividualEachValues); + // } + // } + } + foreach ($newBankingResult as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $is_od_cc = true; + } + } + if (count($newBankingResult) > 0) { + $filteredBankingResult = array(); + $b = 0; + for ($a = 0; $a <= count($newBankingResult); $a++) { + if ($newBankingResult[$a]['account_name'] == $fetchRow['company_details']['company_name'] && $newBankingResult[$a]['str_flag'] == "buiness-company") { + $filteredBankingResult[$b] = $newBankingResult[$a]; + $b++; + } + } + } //forloop ends here. + ?> + Business Banking:'; + if (count($filteredBankingResult) > 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant, he does not have any business account.

    '; + } + } + ?> + + + 1Product / Service '; + $client_second_row = '2Contact Person '; + $client_third_row = '3Mobile Number '; + $client_fourth_row = '4Landline No'; + $client_fifth_row = '5Payment Terms'; + $client_sixth_row = '6Payment Mode'; + $client_seventh_row = '7No of Days Credit'; + + + // this is for manufacturing + if (array_key_exists('manufacturing_details', $clientRow)) { + + $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] ? $done_on_credit['manufacturing prodcuts'] = $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['manufacturing_details'] as $manuRow) { + + if (isset($manuRow['main_raw_materials'])) { + + //$to_no_of_clients += count($manuRow['main_raw_materials']); + + foreach ($manuRow['main_raw_materials'] as $main_raw_material_key => $main_raw_material) { + + if ($main_raw_material['manufacturing_product_name'] != "" || $main_raw_material['manufacturing_product_name'] != null) { + $to_no_of_clients++; + } + //print_r($main_raw_material); + $client_first_row .= '' . $main_raw_material['manufacturing_product_name'] . ''; + + $client_second_row .= isset($main_raw_material['person_title_name_master']) ? '' . $main_raw_material['person_title_name_master'] . ' ' : ''; + $client_second_row .= $main_raw_material['manufacturing_contact_person_name']; + + $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'] != 1 ? $main_raw_material['person_designation_master'] : ''; + + $client_second_row .= ' ' . $main_raw_material['manufacturing_client_name'] . ''; + + $client_third_row .= '' . ($main_raw_material['manufacturing_contact_person_mobile_number'] ? $main_raw_material['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $main_raw_material['person_stdcode'] && $main_raw_material['person_landline'] ? '' . $main_raw_material['person_stdcode'] . ' ' . $main_raw_material['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($main_raw_material['manufacturing_payment_type_master']) && $main_raw_material['manufacturing_payment_type_master'] ? '' . $main_raw_material['manufacturing_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $main_raw_material['manufacturing_payment_mode'] ? '' . $main_raw_material['manufacturing_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? '' . $main_raw_material['manufacturing_credit_days_from'] . ' to ' . $main_raw_material['manufacturing_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + + // this is for trading + if (array_key_exists('trade_details', $clientRow)) { + $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] ? $done_on_credit['trading products'] = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] : ''; + foreach ($clientRow['trade_details'] as $tradeRow) { + + if (isset($tradeRow['trading_products'])) { + + //$to_no_of_clients += count($tradeRow['trading_products']); + + foreach ($tradeRow['trading_products'] as $trading_product_key => $trading_product) { + + if ($trading_product['trade_product_name'] != "" || $trading_product['trade_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $trading_product['trade_product_name'] . ''; + + $client_second_row .= isset($trading_product['person_title_name_master']) ? '' . $trading_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $trading_product['trade_product_contact_person_name']; + + $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'] != 1 ? $trading_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $trading_product['trade_client_name'] . ''; + + $client_third_row .= '' . ($trading_product['trade_product_contact_person_mobile_number'] ? $trading_product['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? '' . $trading_product['person_stdcode'] . ' ' . $trading_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($trading_product['trade_product_payment_type_master']) ? '' . $trading_product['trade_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $trading_product['trade_product_payment_mode'] ? '' . $trading_product['trade_product_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to'] ? '' . $trading_product['trade_product_credit_days_from'] . ' to ' . $trading_product['trade_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + //this is for service + if (array_key_exists('service_provider_details', $clientRow)) { + + $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] ? $done_on_credit['service providing'] = $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['service_provider_details'] as $serviceRow) { + + if (isset($serviceRow['service_products'])) { + + //$to_no_of_clients += count($serviceRow['service_products']); + foreach ($serviceRow['service_products'] as $service_product_key => $service_product) { + + if ($service_product['service_provider_product_name'] != "" || $service_product['service_provider_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $service_product['service_provider_product_name'] . ''; + + $client_second_row .= isset($service_product['person_title_name_master']) ? '' . $service_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $service_product['service_provider_product_contact_person_name']; + + $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'] != 1 ? $service_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $service_product['service_provider_client_name'] . ''; + + $client_third_row .= '' . ($service_product['service_provider_product_contact_person_mobile_number'] ? $service_product['service_provider_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $service_product['person_stdcode'] && $service_product['person_landline'] ? '' . $service_product['person_stdcode'] . ' ' . $service_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= $service_product['service_provider_product_payment_type_master'] ? '' . $service_product['service_provider_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $service_product['service_provider_product_payment_mode'] ? '' . $service_product['service_provider_product_payment_mode'] . '' : 'NA'; + + $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to'] ? '' . $service_product['service_provider_product_credit_days_from'] . ' to ' . $service_product['service_provider_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + } + + + + $client_first_row .= ''; + $client_second_row .= ''; + $client_third_row .= ''; + $client_fourth_row .= ''; + $client_fifth_row .= ''; + $client_sixth_row .= ''; + $client_seventh_row .= ''; + //echo $client_third_row; + ?> + + Client Details'; + if ($is_client_details_available != null) { + + + + + ?> + + + + + + + + Client $i"; + } ?> + + + + + + + + + + + + + + + + +
    Sr.NoParticulars
    + $value) { + if (count($temp)) { + foreach ($temp as $tk => $tvalue) { + $value == $tvalue ? $all_same = true : $all_same = false; + array_push($temp, $value); + } + } else { + array_push($temp, $value); + } + } + + if ($all_same || count($done_on_credit) == 1) { + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $vals[0] . "% is done on credit.

    "; + } else { + $activities = ''; + foreach ($done_on_credit as $dkey => $dvalue) { + $activities .= $dkey . ' ' . $dvalue . '%, '; + } + $activities = substr_replace($activities, ' ', -2); + $activities = substr_replace($activities, ' and ', strripos($activities, ','), 2); + + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $activities . "are done on credit.

    "; + } + } + + + //CLient Photo Section + // $client_photo_count = $pd_images[2]; + // $client_img_row_count = ceil(count($client_photo_count) / 3); + + // if(count($client_photo_count)){ + // // echo '
    '; + // // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // // echo '
    '; + // echo ''; + + // $client_from_index_increment = 0; + // for($img_row = 1; $img_row <= $client_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $client_from_index_increment; + // $to = ($from + 2); + // for($client_photo_iter = $from; $client_photo_iter <= $to;$client_photo_iter++) + // { + + // if(isset($client_photo_count[$client_photo_iter]) &&$client_photo_count[$client_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $client_from_index_increment = $client_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // } + ?> + ' . $client_form_remarks . '

    '; + } // ENd of client info available in this current index + ?> + + + + + + + 1Item Purchased '; + $supplier_second_row = '2Contact Person '; + $supplier_third_row = '3Mobile Number '; + $supplier_fourth_row = '4Landline No'; + $supplier_fifth_row = '5Payment Terms'; + $supplier_sixth_row = '6Payment Mode'; + $supplier_seventh_row = '7No of Days Credit'; + + if (isset($pd_processed_forms[1][$business_count])) { + + $supplier_details = $pd_processed_forms[1][$business_count]; + $supplierRow = json_decode($supplier_details['processed_json'], true); + //print_r($supplierRow); + $supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : ''); + + if (isset($supplierRow['supplier_info_available']) && $supplierRow['supplier_info_available'] == 1) { + $is_supplier_details_avaialable = 1; + $company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details, $supplierRow['company_id'], 1); + //$supplierResult['company_name'] = $company_name; + $total_no_of_suppliers = 0; + $total_payments_percent_on_credit_for_supplier = 0; + + + foreach ($supplierRow['manufacturing_details'] as $manuRow) { + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit']) ? $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : 0; + + if (isset($manuRow['main_raw_materials'])) { + + + foreach ($manuRow['main_raw_materials'] as $rawkey => $raw) { + + if ($raw['manufacturing_raw_material_name'] != "" || $raw['manufacturing_raw_material_name'] != null) { + $total_no_of_suppliers++; + } + $supplier_first_row .= '' . $raw['manufacturing_raw_material_name'] . ''; + + $supplier_second_row .= isset($raw['person_title_name_master']) ? '' . $raw['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $raw['manufacturing_contact_person_name']; + + $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'] != 1 ? $raw['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $raw['manufacturing_supplier_name'] . ''; + + $supplier_third_row .= '' . ($raw['manufacturing_contact_person_mobile_number'] ? $raw['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '' . $raw['person_stdcode'] . ' ' . $raw['person_landline'] . '' : '' . 'Not Provided' . ''; + + + + $supplier_fifth_row .= $raw['manufacturing_payment_type_master'] ? '' . $raw['manufacturing_payment_type_master'] . '' : 'NA'; + + + + $supplier_sixth_row .= $raw['manufacturing_payment_mode'] ? '' . $raw['manufacturing_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? '' . $raw['manufacturing_credit_days_from'] . ' to ' . $raw['manufacturing_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + } + } + } + // this is for trading + //print_r($supplierRow['trade_details'][0]['trading_products']); + if (isset($supplierRow['trade_details'][0]['trading_products']) && count($supplierRow['trade_details'][0]['trading_products'])) { + $total_payments_percent_on_credit_for_supplier += $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; + foreach ($supplierRow['trade_details'][0]['trading_products'] as $tradeRow) { + + if ($tradeRow['trade_product_name'] != "" || $tradeRow['trade_product_name'] != null) { + $total_no_of_suppliers++; + } + + + + + + + $supplier_first_row .= '' . $tradeRow['trade_product_name'] . ''; + $supplier_second_row .= isset($tradeRow['person_title_name_master']) ? '' . $tradeRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $tradeRow['trade_product_contact_person_name']; + + $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'] != 1 ? $tradeRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $tradeRow['trade_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($tradeRow['trade_product_contact_person_mobile_number'] ? $tradeRow['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $tradeRow['person_stdcode'] && $tradeRow['person_landline'] ? '' . $tradeRow['person_stdcode'] . ' ' . $tradeRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + + $supplier_fifth_row .= isset($tradeRow['trade_product_payment_type_master']) ? '' . $tradeRow['trade_product_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $tradeRow['trade_product_payment_mode'] ? '' . $tradeRow['trade_product_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '' . $tradeRow['trade_product_credit_days_from'] . ' to ' . $tradeRow['trade_product_credit_days_to'] . ' days' : 'NA'; + ///array_push($supplierResult,$temp); + + //} + //} + + } + } + + if (isset($supplierRow['servicing_details'][0]['service_providers']) && count($supplierRow['servicing_details'][0]['service_providers'])) { + + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + //echo isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + + foreach ($supplierRow['servicing_details'][0]['service_providers'] as $serviceRow) { + + + if ($serviceRow['service_provider_name'] != "" || $serviceRow['service_provider_name'] != null) { + $total_no_of_suppliers++; + } + + $supplier_first_row .= '' . $serviceRow['service_provider_name'] . ''; + + + $supplier_second_row .= isset($serviceRow['person_title_name_master']) ? '' . $serviceRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $serviceRow['service_provider_contact_person_name']; + + $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'] != 1 ? $serviceRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $serviceRow['service_provider_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($serviceRow['service_provider_contact_person_mobile_number'] ? $serviceRow['service_provider_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $supplier_fourth_row .= $serviceRow['person_stdcode'] && $serviceRow['person_landline'] ? '' . $serviceRow['person_stdcode'] . ' ' . $serviceRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + $supplier_fifth_row .= isset($serviceRow['service_provider_payment_type_master']) ? '' . $serviceRow['service_provider_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $serviceRow['service_provider_payment_mode'] ? '' . $serviceRow['service_provider_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '' . $serviceRow['service_provider_credit_days_from'] . ' to ' . $serviceRow['service_provider_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + //} + } //} + + } + + $supplier_first_row .= ''; + $supplier_second_row .= ''; + $supplier_third_row .= ''; + $supplier_fourth_row .= ''; + $supplier_fifth_row .= ''; + $supplier_sixth_row .= ''; + $supplier_seventh_row .= ''; + } + // echo "dsfnsdkfnj**********"; + // print_r($supplierResult);// + + + + echo '

    Supplier Details

    '; + if ($is_supplier_details_avaialable != null) { + ?> + + + $fetchRow){ + //echo '
    Supplier '.($k+1).':

    '; + ?> + + + + + + + + Supplier $i"; + } ?> + + + + + + + +
    Sr.NoParticulars
    + '; + // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // echo '
    '; + // echo ''; + + // $supplier_from_index_increment = 0; + // for($img_row = 1; $img_row <= $supplier_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $supplier_from_index_increment; + // $to = ($from + 2); + // for($supplier_photo_iter = $from; $supplier_photo_iter <= $to;$supplier_photo_iter++) + // { + + // if(isset($supplier_photo_count[$supplier_photo_iter]) &&$supplier_photo_count[$supplier_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $supplier_from_index_increment = $supplier_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // }*/ + + + //End of Supplier Photo section + + //}//End of supplier foreach + ?> + + 0) { + //$company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1); + echo "

    Out of total purchases done by " . $company_name_for_supplier_form_dispaly . ", " . $total_payments_percent_on_credit_for_supplier . " % is done on credit.

    "; //in advance rest on delivery. + } + } + echo '

    ' . $supplier_form_remarks . '

    '; + } // End of supplier info avilable in this current index + ?> + + + + + + 0 || (is_array($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) && 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"]); + } else { + $bindStockResult["manufacturing"] = array(); + } + // this is for stock retail details + if (count($stockRow['retail_details'][0]['retail_traded_goods']) > 0) { + $bindStockResult["retail"] = Stockform::getStockRetailDetails($stockRow['retail_details'][0]['retail_traded_goods']); + } else { + $bindStockResult["retail"] = array(); + } + // this is for stock whole sale details + if (count($stockRow['trade_details'][0]['trading_traded_goods']) > 0) { + $bindStockResult["wholesale"] = Stockform::getStockWholesaleDetails($stockRow['trade_details'][0]['trading_traded_goods']); + } else { + $bindStockResult["wholesale"] = array(); + } + + // this is for stock service details + //print_r($stockRow['servicing_details']); + if (count($stockRow['servicing_details'][0]['service_provider']) > 0) { + $bindStockResult["service_stocks"] = Stockform::getStockServiceDetails($stockRow['servicing_details'][0]['service_provider']); + } else { + $bindStockResult["service_stocks"] = array(); + } + //print_r($bindStockResult);die(); + count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing']) || count($bindStockResult["service_stocks"]) ? array_push($stockResult, $bindStockResult) : array(); + //echo "**********************"; + //print_r($stockResult);die(); + ?> + +

    Stock Details

    + +

    + + + + + + + + + + + + + 0) { + foreach ($getstRow['manufacturing'] as $pstRow) { + if ($pstRow['name']) { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Sr.NoType of StockStock ItemStock Value (Rs)Stock Quantity
    + Considering the size of operations, the stock of finished goods maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of finished goods maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_stock_sufficient_enough_remarks.'

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

    Finished goods Stock not required to be maintained.

    '; + // } + + // if(!strcasecmp($is_raw_materials_sufficient_enough,'yes')) + // { + // echo '

    Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_raw_materials_sufficient_enough_remarks.'

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

    Raw material Stock not required to be maintained.

    '; + // } + + // //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 '

    '. $service_goods_enough_remarks.'

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

    Stock not required to be maintained.

    '; + // } + //echo '

    '.$stock_remarks.'

    '; + + + $stock_photo_count = array_filter($pd_images[11], function ($d) use ($business_count) { + if ($d['company_id'] == ($business_count + 1)) { + return 1; + } else { + return 0; + } + }); + //echo 'stock_photo_count - ' . count($stock_photo_count); + $stock_img_row_count = ceil(count($stock_photo_count) / 3); + if (count($stock_photo_count)) { + echo '
    '; + echo '

    Stock Photograph`s :

    '; + echo '
    '; + echo ''; + + for ($img_row = 0; $img_row < $stock_img_row_count; $img_row++) { + // if($img_row > 0) { break; } + echo ''; + $from = $img_row == 0 ? $img_row : ($img_row + 2); + $to = ($from + 2); + for ($stock_photo_iter = $from; $stock_photo_iter <= $to; $stock_photo_iter++) { + + if (isset($stock_photo_count[$stock_photo_iter]) && $stock_photo_count[$stock_photo_iter]['company_id'] == ($business_count + 1)) { + echo ''; + //unset($stock_photo_count[$stock_photo_iter]); + } + } + //echo "


    "; + echo ''; + } + //echo ''; + echo '
    '; + echo ''; + echo '
    '; + } + // + ?> + + + ' . $stock_form_remarks . '

    '; + //else { + ?> + + + + + + + + +

    Future Plan and Business Environment

    + + + + + + + + + '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + + ?> + +
    ParticularsDetails
    USP of the business (How applicant’s business is different from others in the business)' . $future_plan_business_environment['usp_of_the_business'] . '
    Future plan for business expansion' . $future_plan_business_environment['future_plans_for_business_expansion'] . '
    Impact of GST on business' . $future_plan_business_environment['impact_of_gst_on_the_business'] . '
    Key competitors in the business' . $future_plan_business_environment['key_competitors'] . '
    Succession Plan for business' . $future_plan_business_environment['succession_plan'] . '
    Brief of other group concerns/ Business run by the applicant' . $future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'] . '
    + '; + echo '

    ' . $future_plan_business_environment['remarks'] . '

    '; + } + } + + ?> + + + + + + Assessed Income - " . MYUTIL::findCompanyName($all_company_details, ($business_count + 1), 1) . ""; + if (isset($ai_core_details) && count($ai_summary_details_processed)) { + echo '

    ' . $order_dipaly_array[0] . ') Financial Snapshot

    '; + echo ''; + echo ''; + echo $ai_summary_details_processed['ai_table_header_row']; + echo ''; + echo ''; + echo $ai_summary_details_processed['sale_revenue_row']; + echo $ai_summary_details_processed['purchase_row']; + echo $ai_summary_details_processed['gross_profit_loss_row']; + echo $ai_summary_details_processed['gross_profit_loss_per_row']; + echo $ai_summary_details_processed['business_expense_row']; + echo $ai_summary_details_processed['net_profit_loss_row']; + echo $ai_summary_details_processed['house_hold_expense_row']; + echo $ai_summary_details_processed['disposable_income_row']; + echo $ai_summary_details_processed['net_margin_row']; + + echo ''; + echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + array_shift($order_dipaly_array); + } + + + echo '

    '; + //die(); + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '

    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // } + // array_shift($order_dipaly_array); + // echo '

    Detail Available on Annexure A'; + // } + + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '
    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // echo '
    '; + // $row_count = ceil(count($sale_month_wise['months']) / 5); + // //print_r(($sale_month_wise['months'])); + // // echo $row_count; + // //die(); + // echo ''; + + // for($i = 0; $i <= $row_count; $i++) + // { + // $from = $i== 0 ? $i : ($i + 3); + // $to = ($from + 3); + // echo ''; + // for($j = $from ; $j <= $to ;$j++) + // { + // //$sale_month_wise['months'] as $sale_month_data + // //echo ''; + // if(isset($sale_month_wise['months'][$j])) + // { + // echo ''; + // } + // } + // echo ''; + // } + // echo '
    '; + // echo ''; + // echo ''; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // }else if($sale_month_wise['months'][$j]['sales_type'] == 2) + // { + // echo ''; + // } + // echo ''; + + // echo ''; + + // foreach($sale_month_wise['months'][$j]['month_data'] as $m_key => $month) + // { + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($m_key == 20)break; + // else if($sale_month_wise['sales_type'] == 2) + // { + // echo ''; + // } + // } + // echo ''; + + // echo '
    '.$sale_month_wise['months'][$j]['month_to_dispaly'].'
    Date Value
    Frequncy Value
    '.$month['date'] .' '.$month['value'] .'
    '.$month['frequency_name'] .' '.$month['frequency_value'] .'
    '; + // echo '
    '; + // echo '
    '; + + // //} + // } + + // array_shift($order_dipaly_array); + // } + + + $GLOBALS['is_kuccha_records_available'] = null; + if (isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) { + echo '

    ' . $order_dipaly_array[0] . ') Sales Itemwise :

    '; + echo ''; + echo ''; + echo $ai_core_details_processed['sales_calculated_by_itemwise_header']; + echo ''; + echo ''; + //print_r($ai_core_details_processed['sales_item_wise_to_diaplay']);die(); + foreach ($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid) { + //print_r($sid); + if ($sid['sales_type'] == 3) { + $GLOBALS['is_kuccha_records_available'] = true; + } + $rate_per_unit = ($sid['rate_per_unit'] != 0 && $sid['rate_per_unit'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['rate_per_unit']) : '-'); + echo ''; + echo ''; + if (isset($sid['margin_per'])) { + echo ''; + } + // if(isset($sid['margin_per_uom'])){echo ''; } + if (isset($sid['margin_final_value'])) { + echo ''; + } + + echo ''; + } + echo ''; + echo '
    ' . ($sid['other_sales_item'] != '' ? $sid['other_sales_item'] : $sid['sale_item']) . '' . $sid['sales_qty'] . '' . $sid['uom'] . '' . $rate_per_unit . '' . $sid['frequency'] . '' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['annual_sale_value']) . ($sid['sales_type'] == 3 ? ' *' : '') . '' . ($sid['margin_per'] != 0 ? $sid['margin_per'] : '-') . ''.($sid['margin_per_uom'] != 0? $sid['margin_per_uom'] : '-').'' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['margin_final_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if ($GLOBALS['is_kuccha_records_available']) { + echo '
    * Assessed From Kuchha Records, Details Available in Annexure A'; + } + + + if (isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Sales Declared By Customer

    '; + + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) + // { + // echo '

    As per person met, the following Purchase details were shared:

    '; + // } + // else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + // } + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ) declared as annual sale value.'; + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + $str .= '
    and ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' )' . '( ' . $ai_core_details['sales_declared_by_customer'][0]['margin_per'] . '% sales declared ) as net margin amount.'; + } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) { + echo '

    As per person met, the following Purchase details were shared:

    '; + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + } + + echo '
    '; + if (isset($ai_core_details) && count($ai_core_details['purchase_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Purchase Declared By Customer

    '; + + + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ) declared as annual purchase value.'; + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // $str .= '
    and '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']).' ( '.MYUTIL::numtowords( $ai_core_details['sales_declared_by_customer'][0]['margin_value']).' )'.'( '.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'% sales declared ) as net margin amount.'; + // } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 1) { + echo '

    ' . $order_dipaly_array[0] . ') Itemwise Purchase Details :

    '; + + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($ai_core_details_processed['purchase_to_display'] as $dat) { + $rate = $dat['rate'] != 0 && $dat['rate'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['rate']) : '-'; + echo ''; + } + echo ''; + + echo '
    Raw Material/Trading Item Purchase Quantity UOM Rate/Unit of Purchase Frequency Annual Purchase(Rs)
    ' . $dat['material_name'] . ' ' . $dat['qty'] . ' ' . $dat['uom'] . ' ' . $rate . ' ' . $dat['frequency'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['annual_value']) . '
    '; + array_shift($order_dipaly_array); + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 2) { + echo '

    ' . $order_dipaly_array[0] . ') Billwise Purchase Details :

    '; + foreach ($ai_core_details_processed['purchase_to_display'] as $billwise) { + echo '
    '; + echo 'Item name : ' . $billwise['item_name'] . '
    '; + echo '' . $billwise['month_count'] . ' month(s) purchase value : ' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value']) . ' Annual Purchase value:' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value'] * (12 / $billwise['month_count'])) . ''; + echo '
    '; + foreach ($billwise['months'] as $month_data) { + //echo ''; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($month_data['month_data'] as $month) { + echo ''; + } + echo ''; + + echo '
    ' . $month_data['month_to_dispaly'] . '
    Date Value
    ' . $month['date'] . ' ' . $month['value'] . '
    '; + //echo '
    '; + } + echo '
    '; + } + array_shift($order_dipaly_array); + } + } + + // + if (isset($ai_core_details) && count($ai_core_details['business_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Business Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp) { + if ($b_exp['expense_value'] != 0) { + echo ''; + } + } + echo ''; + echo '
    Business Expense Amount Frequency Annual Expenses
    ' . $b_exp['expense_item'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['expense_value']) . ' ' . $b_exp['frequency_name'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['annual_expenses_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if (isset($ai_core_details) && count($ai_core_details['house_hold_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Household Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['household_expenses_to_diaplay'] as $h_exp) { + echo ''; + } + echo ''; + echo '
    Expense Particulars Amount (Rs) Frequency Annual Expenses(Rs)
    ' . $h_exp['expense_item'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['expense_value']) . ' ' . $h_exp['frequency_name'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['annual_expense_value']) . '
    '; + array_shift($order_dipaly_array); + } + + + // if(isset($ai_core_details) && count($ai_summary_details_processed)) + // { + // echo '

    The Summary of Income :

    '; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['ai_table_header_row']; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['sale_revenue_row']; + // echo $ai_summary_details_processed['purchase_row']; + // echo $ai_summary_details_processed['gross_profit_loss_row']; + // echo $ai_summary_details_processed['business_expense_row']; + // echo $ai_summary_details_processed['net_profit_loss_row']; + // echo $ai_summary_details_processed['house_hold_expense_row']; + // echo $ai_summary_details_processed['disposable_income_row']; + // echo $ai_summary_details_processed['net_margin_row']; + + // echo ''; + // echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + // } + // echo "
    "; + // + + ?> + + + + + + + + + + $oaRow) { + $otherAssetRow = json_decode($oaRow['processed_json'], true); + //print_r($otherAssetRow);die(); + $other_assest_common_remrks = $otherAssetRow['assets_form_remark']; + if (isset($otherAssetRow['asset_info_available']) && $otherAssetRow['asset_info_available'] == 1) { + $is_personal_info_available = 1; + + if (count($otherAssetRow['assets_details']) > 0) { + $otherAssetResult = ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'], $pd_master_details[0]['pd_id']); + + //print_r($otherAssetResult); + } + } +} +?> + +

    Personal Assets

    + + + + + + + + + + + + + + $paRow) { + ?> + + + + + + + + + + + +
    Sr.NoAsset TypeAsset DescriptionAsset Owned ByApprox Market Value(Rs)Age of the Assest
    ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : (($paRow['approximate_market_value'] != '' && $paRow['approximate_market_value'] != 0 ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : 'Not Provided')); ?>
    + +

    As per Loan applicant, he does not have any other assets.

    +' . $other_assest_common_remrks . '

    '; +} + +?> + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + // $is_personal_banking_available = 1; + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getBuinessEachValues); + } + } + if (isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) { + if (count($individualBankRow['banking_details']) > 0) { + $getIndividualEachValues = BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getIndividualEachValues); + } + } +} +if (count($bankingResult) > 0) { + $filteredPersonalBankingResult = array(); + $x = 0; + for ($y = 0; $y < count($bankingResult); $y++) { + if ($bankingResult[$y]['str_flag'] !== "buiness-company") { + $filteredPersonalBankingResult[$x] = $bankingResult[$y]; + $x++; + } + if ($bankingResult[$y]['same_ac_used_for'] == "Business") { + $stmt_flag++; + } + } +} + + +?> +

    Personal Banking Details:

    + 0) { ?> +

    Below bank account details were shared :

    + + + + + + + + + + + + + + + $bdRow) { + ?> + + + + + + + + + + + + +
    Sr.NoAccount Holder's NameBank NameAccount TypeOD / CC LimitVintage
    + 0) { + echo '

    The personal banking is done through same account used for business banking

    '; +} +if ($ind_banking_common_remarks != '') { + echo '

    ' . $ind_banking_common_remarks . '

    '; +} +if (count($filteredPersonalBankingResult) == 0) { + echo '

    As per loan applicant, he does not have any personal account

    '; +} ?> + + + + + + + $iRow) { + $otherIcomeRow = json_decode($iRow['processed_json'], true); + $other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks']; + //print_r($otherIcomeRow);die(); + + if (strtoupper($otherIcomeRow['other_income']) == 'YES' && count($otherIcomeRow['income_details']) > 0) { + $is_other_income_available = 1; + $otherIncomeResult = OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'], $pd_master_details[0]['pd_id']); + } +} +?> +
    + + + + + + + + + + + + + + $oiRow) { + ?> + + + + + + + + + +
    Sr.NoIncome SourceEarned byAmount(Rs)
    (Details Available in Annexure B)'; + $GLOBALS['is_rental_available'] = 1; + } ?>
    + +

    As per the loan applicants, they do not have any other source of Income.

    +' . $other_source_income_common_remarks . '

    '; +} + +?> + + + + + $fRow) { + $familyRow = json_decode($fRow['processed_json'], true); + //print_r($familyRow);die(); + $other_family_form_common_remarks = $familyRow['family_details_form_remark']; + if (array_key_exists('family_details', $familyRow) && count($familyRow['family_details']) > 0) { + $familyResult = OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'], $pd_master_details[0]['pd_id']); + } +} +?> + +

    Family Information:

    + 0) { + //print_r($familyResult); +?> + + + $fmValue) { ?> + + ' . $fmValue['selected_person_title'] . $fmValue['selected_person'] . 'Family Information - Select person for capturing family details, who is an applicant in the case, resides at ' . $fmValue['residency_address'] . 'Family Information - Residence Address of Select person .'; + + $residence_text = 'This is a ' . $fmValue['residence_ownership'] . ' Family Information - Ownership of Residence residence, where the applicant has been staying for ' . $fmValue['residence_No_of_years'] . 'Family Information - No of Yrs in current residence .'; + $residence_text .= (!strcasecmp($fmValue['residence_ownership'], 'rented')) ? ' The rent paid ' . $rupee_symbol . ' ' . $fmValue['rent'] . ' per month.' : ''; + + echo '

    ' . $intro_text . '

    '; + echo '

    ' . $residence_text . '

    '; + + ?> + + +

    The table below provides details of other family members of

    + + + + + + + + + + + + + $fmRow) { + ?> + + + + + + + + + + +
    Sr.NoNameRelationAgeEarning StatusOccupation Details
    + ' . $text . '

    '; + } + } ?> + +

    Other Family Members is not available.

    +' . $other_family_form_common_remarks . '

    '; +} + +?> + + + + + + $elRow) { + $otherLoanRow = json_decode($elRow['processed_json'], true); + $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; + $is_all_loan_details_availble = 'yes'; + $out_standing_loan_info = array(); + if (array_key_exists('loan_info_available', $otherLoanRow)) { + $is_all_loan_details_availble = $otherLoanRow['loan_info_available']; + } + $total_no_of_data = 0; + if (strtoupper($otherLoanRow['existing_loan']) == 'YES' && (!strcasecmp($is_all_loan_details_availble, 'yes') && count($otherLoanRow['loan_details']) > 0)) { + $is_existing_loans_available = 1; + $total_no_of_data = count($otherLoanRow['loan_details']); + $existLoanResult = FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'], $pd_master_details[0]['pd_id']); + } else if (!strcasecmp($is_all_loan_details_availble, 'no')) { + $out_standing_loan_info['tot_running_loans'] = $otherLoanRow['tot_running_loans']; + $out_standing_loan_info['tot_emi_paid'] = $otherLoanRow['tot_emi_paid']; + $out_standing_loan_info['tot_outstanding_loans'] = $otherLoanRow['tot_outstanding_loans']; + } +} +?> +
    +

    Existing loan obligation

    + + + + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. +

    + $single_table) { + //print_r($single_table);die(); + + if (is_numeric($table_key)) { + ?> + + + + + Loan $pre_loan_no"; + } ?> + + + + + + +
    Particulars
    +
    + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. + + + + + + + + + + + + + + + +
    Total No of Running LoansTotal Outstanding AmountTotal EMI being Paid (Monthly)
    + + +

    As per loan applicant he does not have any existing loan obligations.

    + +' . $existing_loan_form_common_remarks . '

    '; +} +?> + + + + + + + + + + +'; +echo '

    Credit Manager`s Specific Queries:

    '; +//echo '
    '; +if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { + + + foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) { + echo 'Question - ' . $value['question'] . '
    '; + echo 'Answer - ' . $value['answer']; + echo '

    '; + } +} else { + echo 'There are no specific queries raised by Credit Manager.'; +} + +echo '
    '; +echo '

    Document to be photographed/scanned:

    '; +// +if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { + + + foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) { + echo 'Document Required : ' . $doc_value['doc_name'] . '
    '; + echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
    ' : 'NO
    '); + if ($doc_value['ans'] != 'yes') { + echo 'Reason : ' . $doc_value['reason']; + } + echo '

    '; + } +} else { + echo 'There are no specific documents to be collect.'; +} + +if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) { + echo '
    '; + echo '

    Queries related to Covid-19:

    '; + + foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) { + if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) { + echo 'Question : ' . $covid_value['question'] . '
    '; + $temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) { + $temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')'; + } + echo 'Answer : ' . $temp_answer . '
    '; + $sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) { + echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '
    '; + } + + echo '
    '; + } + } +} + +//} + +?> + + + + +
    +
    +

    PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR & OVERALL PD STATUS

    + +
    + + '; + echo '

    Personal feedback or market intelligence on the case (if any):

    '; + echo '

    ' . $final_remark_data['market_intelligence'] . '

    '; + echo '
    '; + //echo '
    '; + } + ?> +
      +
    • Customer Behaviour:
    • + +

      + + ✔'; + ?> + + + + + + + + +
      +
      Polite
      +
      +
      +
      Rude
      +
      +
      +
      Others*
      +
      +
      +
      +
      '; + } ?> + + + +
      +
    • PD Officer’s overall assessment:
    • +

      + + + + + + + + + + + + + + + + +
      +
      Positive
      +
      +
      +
      Refer to Credit
      +
      +
      +
      Negative
      +
      +
      +
      Others*
      +
      +
      +
      + +
    +
    + + +

    PD officer recommendation is ' . $fo_diplay . '.

    '; ?> +

    The following key points were considered while arriving at the aforementioned status.

    +"; + foreach ($final_remark_data['recommendation_positive'] as $pos) { + echo "
  • " . $pos['reason_for_positive'] . "
  • "; + } + } else if ($negative) { + echo ""; + + if ($address_form['address_form_remark']) { + echo '' . $address_form['address_form_remark'] . 'Address Form - Address Form Remarks '; + } + echo "

    "; + // echo "
    "; + //die(); + // + ?> + + + + + + +

    DETAILS:

    + The following loan related information was provided by applicant.'; + + $is_current_product_bl = $pd_master_details[0]['prod_catagory'] == "BL" ? true : false; + $is_current_product_lab = $pd_master_details[0]['prod_catagory'] == "LAP" ? true : false; + $is_current_product_laep = $pd_master_details[0]['prod_catagory'] == "LAEP" ? true : false; + // echo $pd_master_details[0]['product_abbr']; + // echo '-bl-'. $is_current_product_bl; + // echo '-lap-'.$is_current_product_lab; + // die(); + $loan_table_dispaly_rows = array(); + + $loan_table_dispaly_rows[] = array('particulars' => ('Total ' . $loan_word . ' Amount applied for'), 'details' => "" . " " . $loan_amount . ' (' . MYUTIL::numtowords($loan_form['loan_amount']) . ')'); + if ($is_current_product_bl || $is_current_product_laep) { + $to_dispaly = !strcasecmp($loan_form['is_there_total_fund'], 'yes disclose') ? ('Disclosed ' . "" . " " . MYUTIL::customIndianNumberFormat($loan_form['fund_amt']) . ' (' . MYUTIL::numtowords($loan_form['fund_amt']) . ')') : 'Not Disclosed'; + $loan_table_dispaly_rows[] = array('particulars' => 'Total Fund Requirement', 'details' => $to_dispaly); + } + $loan_table_dispaly_rows[] = array('particulars' => ($loan_word . ' Tenure expected'), 'details' => $loan_form['loan_tenure'] != "" ? $loan_form['loan_tenure'] . ' Months' : 'Not provided'); + + $end_use = ''; + $to_remove_for = false; + foreach ($loan_form['end_use_master'] as $enduse) { + if (strpos(strval($enduse), 'Others') === false) { + $end_use .= $enduse . ' and '; + } else { + + $to_remove_for = true; + $end_use .= $loan_form['end_use_other'] . ' and'; + } + } + $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'), strlen($end_use)); + //echo substr($end_use,0,3); + + + if (strcasecmp(substr($end_use, 0, 3), 'for')) { + if (!(count($loan_form['end_use_master']) == 1 && $to_remove_for)) { + $end_use = 'For ' . $end_use; + } + } + + $loan_table_dispaly_rows[] = array('particulars' => ($loan_word . ' Purpose'), 'details' => $end_use); + + if (strcasecmp($loan_form['is_transfer'], 'no')) { + + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']) . ' (' . MYUTIL::numtowords($loan_form['balance_transfer_amount']) . ')'); + + $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['topup_amount']) . ($loan_form['topup_amount'] ? (' (' . MYUTIL::numtowords($loan_form['topup_amount']) . ')') : '')); + + if ($loan_form['end_use_topup_master']) { + $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'] == 1 ? $loan_form['other_bt_lender'] : $loan_form['lender_master']); + } else { + //echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab); die(); + if ((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep) { + $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution', 'details' => is_numeric($loan_form['own_contribution']) && $loan_form['own_contribution'] != 0 ? ("" . " " . MYUTIL::customIndianNumberFormat($loan_form['own_contribution']) . ' (' . MYUTIL::numtowords($loan_form['own_contribution']) . ')') : 'Not Provided'); + $source_of_own_contribution = ''; + + foreach ($loan_form['source_of_own_contribution_master'] as $own_source) { + + if (!strcasecmp($own_source, 'others')) { + $source_of_own_contribution .= $loan_form['other_source'] . ' and '; + } else { + $source_of_own_contribution .= $own_source . ' and '; + } + } + + $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '), strlen($source_of_own_contribution)); + + $loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution', 'details' => $source_of_own_contribution); + } + } + if (!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL')) { + $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying', 'details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0 ? ($rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emi_level']) . ' (' . MYUTIL::numtowords($loan_form['emi_level']) . ')') : "Not Provided"); + } + + if (!$is_current_product_bl && !$is_current_product_laep) { + + 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']); + + //print_r($loan_form);die(); + $owners_list = null; + foreach ($loan_form['owners_list_master'] as $owner) { + $owners_list .= $owner . ' and '; + } + ///echo $owners_list; + $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'), strlen($owners_list)); + if ($owners_list == '') { + if (isset($loan_form['owner_name_group'][0]['owner_name'])) { + $owners_list = $loan_form['owner_name_group'][0]['owner_name']['name']; + } + } + $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' => ($loan_form['emv_per_customer'] != "" ? $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']) . ' (' . MYUTIL::numtowords($loan_form['emv_per_customer']) . ')' : 'Not Provided')); + } + } + + if (isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') { + $loan_table_dispaly_rows[] = array('particulars' => 'Current Owner/Seller of the property', 'details' => $loan_form['property_seller']); + } + + if (isset($loan_form['address']) && $loan_form['address'] != '') { + $address_of_owner_seller_property = $loan_form['address'] . (isset($loan_form['city_master']) ? ', ' . $loan_form['city_master'] : '') . (isset($loan_form['state_master']) ? ', ' . $loan_form['state_master'] : '') . (isset($loan_form['pincode_master']) ? ', ' . $loan_form['pincode_master'] : ''); + + $loan_table_dispaly_rows[] = array('particulars' => 'Address of the property', 'details' => $address_of_owner_seller_property); + } + //print_r($loan_table_dispaly_rows); + if ($pd_master_details[0]['lender_short_name'] != 'CFPL') { + ?> +

    + + + + + + + + $row) { + echo '"; + } + ?> + +
    S.No Particulars Particular Details
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    + +
    +

    Anchor Details Section:

    + + + + + + + + $row) { + echo '"; + } + ?> + +
    S.No Particulars Particular Details
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    +
    " . $loan_form['loandetails_remarks']; + ?> + + + + + + 0) { + for ($business_count = 0; $business_count < $total_no_of_business; $business_count++) { + + if ($general_form['companies'][$business_count]['is_active'] == true) { // $temp_show = null; + // if($temp_show == null) + // { + ?> + + .'; + } + $bindEachResult['company_employees'] = ''; + + + // this is for no of employees details + if (isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) { + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent'; + } else { + $bindEachResult['company_employees'] = 'As per loan applicant, 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 { + + $bindEachResult['company_employees'] .= ' and no temporary employees with company.'; + } + + if (($businessRow['employees_permanent'] != "" && $businessRow['employees_permanent'] == 0) && ($businessRow['employees_temporary'] != "" && $businessRow['employees_temporary'] == 0)) { + + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent or temporary employees with the company.'; + } + + if (isset($businessRow['employees_appx_salary']) && $businessRow['employees_appx_salary'] != "") { + $bindEachResult['employees_appx_salary'] = 'Approximately ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($businessRow['employees_appx_salary']) . ' is being paid as salary to employees'; + } + if (isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0) { + $emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee'; + $bindEachResult['officer_visit_company_employees'] = 'At the time of PD visit, the officer sighted ' . $businessRow['officer_total'] . ' ' . $emp . ' at the business premises.'; + } else { + + $bindEachResult['officer_visit_company_employees'] = ''; + //$bindEachResult['officer_visit_company_employees']='At the time of PD visit, no employees seen at the business premises.'; + } + //this is documents visited + $getDocuments = array(); + if (array_key_exists('shop_eat_act_cert', $businessRow) && strtoupper($businessRow['shop_eat_act_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Shop/Est act Certificate.', 'img' => isset($businessRow['shop_eat_act_cert_pic']) ? $businessRow['shop_eat_act_cert_pic'] : '', 'key_name' => 'shop_eat_act_cert_pic')); + } + if (array_key_exists('gst_Regn_cert', $businessRow) && strtoupper($businessRow['gst_Regn_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'GST Registration.', 'img' => isset($businessRow['gst_Regn_cert_pic']) ? $businessRow['gst_Regn_cert_pic'] : '', 'key_name' => 'gst_Regn_cert_pic')); + } + if (array_key_exists('pf_regn', $businessRow) && strtoupper($businessRow['pf_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'PF Registration.', 'img' => isset($businessRow['pf_regn_pic']) ? $businessRow['pf_regn_pic'] : '', 'key_name' => 'pf_regn_pic')); + } + if (array_key_exists('esic_regn', $businessRow) && strtoupper($businessRow['esic_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'ESIC Registration.', 'img' => isset($businessRow['esic_regn_pic']) ? $businessRow['esic_regn_pic'] : '', 'key_name' => 'esic_regn_pic')); + } + if (array_key_exists('export_import_cert', $businessRow) && strtoupper($businessRow['export_import_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Export/Import Certificate.', 'img' => isset($businessRow['export_import_cert_pic']) ? $businessRow['export_import_cert_pic'] : '', 'key_name' => 'export_import_cert_pic')); + } + if (array_key_exists('factory_cert', $businessRow) && strtoupper($businessRow['factory_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Factory Certificate.', 'img' => isset($businessRow['factory_cert_pic']) ? $businessRow['factory_cert_pic'] : '', 'key_name' => 'factory_cert_pic')); + } + if (array_key_exists('eb_bill', $businessRow) && strtoupper($businessRow['eb_bill']) == 'YES') { + array_push($getDocuments, array('name' => 'Electric Bill.', 'img' => isset($businessRow['eb_bill_pic']) ? $businessRow['eb_bill_pic'] : '', 'key_name' => 'eb_bill_pic')); + } + if (strtoupper($businessRow['other_documents']) == 'YES' && array_key_exists('documents', $businessRow)) { + foreach ($businessRow['documents'] as $docValue) { + array_push($getDocuments, array('name' => $docValue['document'], 'img' => isset($docValue['document_pic']) ? $docValue['document_pic'] : '', 'key_name' => $docValue['document'])); + } + } + + //print_r($getDocuments); + if (count($getDocuments)) { + foreach ($getDocuments as $getDocument_key => $getDocument_value) { + foreach ($pd_images[13] as $img_key => $img_value) { + if (!strcasecmp($getDocument_value['key_name'], $img_value['pd_document_title'])) { + $getDocuments[$getDocument_key]['img'] = $img_value['doc_url']; + break; + } + } + } + } + //print_r($getDocuments);die(); + $bindEachResult['visit_documents'] = $getDocuments; + array_push($businessResult, $bindEachResult); + + + + ?> +

    BUSINESS INFORMATION:

    + $fetchRow) { + //print_r($fetchRow['company_details']);die(); + ?> + +

    +

    +

    + +
    Date of Incorporation :
    + +
    Business Vintage : +

    + + +
    +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NameShare HoldingNo.of Years in Current BusinessTotal Work Experience(Yrs)Previous ExperienceStarted Business
    + + + 0) { ?> +
    +

    Other Family Members involved in business :

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NameIndividual RelationshipRelated toRelationship to Company / FirmStarted Business (Yes / No)
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    ' . $process_brief['description'] . '

    '; ?>
    + + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    ServicesArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + 0) { ?> + + +
    + + + + + + + + + + + + + + + +
    Other Business Activity
    +
    ' . $fetchRow['total_per_of_export'] . ' % of total sales is export.
    '; + } + + ?> + + + + + Loan applicant is using Mobile Wallets/UPI for business transactions.

    '; + } //else + //{ + // echo '

    As per person`s met,applicant using Mobile Wallets/UPI for business transactions.

    ' + //} + if (!strcasecmp($fetchRow['applicant_use_pos_machines'], 'yes')) { + echo '

    The applicant has the following POS machines:

    '; + echo ''; + echo ''; + foreach ($fetchRow['pos_machines_details'] as $pos) { + echo ''; + } + echo '
    Name of the Financial Insitution TID Number of POS machine
    ' . ($pos['pos_machines_financial_institution_name'] ? $pos['pos_machines_financial_institution_name'] : 'Not Provided') . ' ' . $pos['tid_no_of_pos_machine'] . '
    '; + } + + + + ?> + + + + + + + + + + + +
    +

    +
    + + + + +

    +

    +

    + + + + +

    The below document images were shared :

    + + + + '; + for ($doc = $from; $doc <= $to; $doc++) { + if (isset($visit_documents[$doc])) { + ?> + + '; + $from_index_increment = $from_index_increment + 2; + } ?> + +
    + +
    + + + + ' . $business_form_common_remarks . '

    '; + } + + ?> + + + + + + + +
    + + + + + + 0 && $is_business_asset_available) { + $bindBusinessAsset['details'] = ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'], $pd_master_details[0]['pd_id']); + } + array_push($businessAssetResult, $bindBusinessAsset); + + + //print_r($businessAssetResult);die(); + ?> + + + + +
    +
    +
    +

    Assets used in Business

    + $iterateAsset) { ?> +

    + + $value) { + echo ''; + echo ''; + echo $value['header_row']; ?> + +'; + echo '
    '; + echo '
    '; + } + } + } + } 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 +?> + + + + + + +
    +↑ /'; + + if (isset($pd_processed_forms[14][$business_count])) { + $baRow = $pd_processed_forms[14][$business_count]; + $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 (isset($businessFinancialRow['kuccha_records_shown'])) { + $financial_kuccha_info['kuccha_records_shown'] = $businessFinancialRow['kuccha_records_shown']; + $financial_kuccha_info['kuccha_bill_allowed'] = $businessFinancialRow['kuccha_bill_allowed']; + $financial_kuccha_info['customer_declared_turnover'] = $businessFinancialRow['customer_declared_turnover']; + } + + //only for Indusind Lender + if (isset($businessFinancialRow['tot_business_FY'])) { + $current_business_info['tot_business_FY'] = $businessFinancialRow['tot_business_FY']; + $current_business_info['remarks_tot_business_FY'] = $businessFinancialRow['remarks_tot_business_FY']; + $current_business_info['orders_hand_FY'] = $businessFinancialRow['orders_hand_FY']; + } + + //print_r($financial_kuccha_info);die(); + if (strtoupper($businessFinancialRow['is_financial_statements']) == 'YES' && count($businessFinancialRow['date_per_financial']) > 0) { + $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["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"] = ""; + //$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) { + + $bindBusinessFinancial["financial_customer"] = ""; + //$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 { + + + $bindBusinessFinancial["financial_customer"] = "As per Loan Applicant(s), the actual turnover and net profit of his business is same as disclosed in financial statements."; + $bindBusinessFinancial['customer_statements'] = array(); + $bindBusinessFinancial['customer_statements_header'] = array(); + $bindBusinessFinancial['is_customer_statement'] = 0; + } + + + // ############### this section only for CLIX HOUSING FINANCE LENDER + if (isset($businessFinancialRow['is_turnover_validated']) && strtoupper($businessFinancialRow['is_turnover_validated']) == 'YES') { + $bindBusinessFinancial['turnover_statements'] = FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['customer_statements_header'] = FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['how_turnover_validated'] = (!strcasecmp(strtolower($businessFinancialRow['how_turnover_validated']), 'others')) ? 'Validated from ' . $businessFinancialRow['turnover_validated_others'] : $businessFinancialRow['how_turnover_validated']; + $bindBusinessFinancial['is_turnover_validated'] = 1; + } + // ############### this section only for CLIX HOUSING FINANCE LENDER + $bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days']; + $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days']; + $bindBusinessFinancial['working_capital_unsold_stock'] = is_numeric($businessFinancialRow['unsold_stock_lies_in_days']) ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; + $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; + if (isset($businessFinancialRow['select_working_capital_facilities_availed'])) { + foreach ($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v) { + switch ($v['id']) { + case 1: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['name'] = $businessFinancialRow['other_reason_for_working_capital_facilities_availed']; + + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['reason_for_working_capital_facilities_availed']; + break; + + case 2: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['bank_guarantee']; + break; + + case 3: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['cash_credit_limit']; + break; + + case 4: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 5: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 6: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['letter_of_credit']; + break; + case 7: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit']; + break; + case 8: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name']; + break; + case 9: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount']; + break; + case 10: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type']; + break; + case 11: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor']; + break; + case 12: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date']; + break; + case 13: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi']; + break; + } + } + } + + $bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null; + + $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']); + if ($pd_master_details[0]['lender_short_name'] == 'CFPL') { + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year", 'details' => isset($businessFinancialRow['turnover_lastcomplete_year']) ? $businessFinancialRow['turnover_lastcomplete_year'] : null); + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)", 'details' => isset($businessFinancialRow['ytd_turnover']) ? $businessFinancialRow['ytd_turnover'] : null); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null ); + } + array_push($businessFinancialResult, $bindBusinessFinancial); + +?> + + 0) { + + ?> + +

    Financial Information

    + 0) { + ?> +

    Company / Firm Name : " . $iterateFinance['company_name']; ?>

    +

    No of Years of Financial Statements provided : " . $iterateFinance['years_data_provided']; ?>

    +

    Snapshot of Financials as per Books of Account Provided : "; ?>

    + + + + + + " . "FY " . $bfRow['financial_year'] . ""; + } ?> + + + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']) . ''; + } ?> + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']) . ''; + } else { + echo ''; + } + } ?> + + + + ' . $bfRow['financial_margin_of_profit'] . ' %'; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } ?> + + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + +
    Particulars
    Sales / Revenue (Rs)
    Net Profit / (Net Loss) (Rs) (' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']) . ')
    Net Profit or (Net Loss) to Sales % (' . $bfRow['financial_margin_of_loss'] . ' %)
    % () in Sales over PY' . $bfRow['sale_variation'] . ' %(' . $bfRow['sale_variation'] . ' %)NA
    % () in Net Profit over PY' . $bfRow['profit_variation'] . ' %(' . $bfRow['profit_variation'] . ')NA
    % () in Net Profit % over PY' . $bfRow['financial_profit_to_sale_variation'] . ' %(' . $bfRow['financial_profit_to_sale_variation'] . ' %)NA
    +

    ' . $comments_on_financials . '

    '; + } + } + //else{ echo "

    Financial statements not provided by Loan Applicants to PD officer.

    ";} + ?> + + + +

    + 0) { + //print_r($iterateFinance['customer_statements']); + + ?> + + + +

    As per Applicant(s), the Financials are as below:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    As per Loan Applicant(s), the Financials are as below:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + + As per Loan Applicant(s) met,' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) . ' as Annual sales through credit cards / POS machines.

    '; + }; + } ?> + As per Loan Applicant(s) met, the financials figures were not provided.

    "; } + + // ####################### THIS SECTION ONLY FOR CLIX HOUSING FINANCE LENDER ##########################--> + + if (isset($iterateFinance['turnover_statements'])) { + foreach ($iterateFinance['turnover_statements'] as $turnover) { + if (!strcasecmp($turnover['estimate_net_margin_availablity'], 'yes')) { + ?> +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + Turnover and Netprofit was ' . $iterateFinance['how_turnover_validated']; + } + ?> + + + + + + Validation of Customer Declared Financials :

    '; + // echo 'Kuccha Record Seen (Yes/No) : ';echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.'; + if ($financial_kuccha_info['kuccha_records_shown'] == 'yes') { + echo '

    Validation of Customer Declared Financials :

    '; + echo 'Kuccha Record Seen (Yes/No) : '; + echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : ''; + echo '

    Photograph of Kuchha Bills Shared (Yes/No) : ' . ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report' : 'No'); + + // echo '

    Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No'); + } + } + + //only for Indusind Lender + if (count($current_business_info)) { + echo '

    Current Business :

    '; + echo 'Approximate Total Business / Sales Done for Current FY as on date is ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($current_business_info['tot_business_FY']); + echo $current_business_info['remarks_tot_business_FY'] != "" ? ' ( ' . $current_business_info['remarks_tot_business_FY'] . ' ) ' : ''; + echo '
    Orders in Hand to be executed in Current FY : ' . $current_business_info['orders_hand_FY']; + } + ?> + + + + + + + + + + + + $facility) { + echo ''; + } ?> + +
    S.NoParticularsDetails
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    S.NoParticularsDays
    1Debtor Days
    2Creditor Days
    3Stock Days
    + + + +

    + + + + + + + + + + + $facility) { + + echo ''; + } ?> + +
    S.NoFacility TypeFacility Details
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + The Loan Applicants have not availed any " . $business_fin_sub_title2 . " from any financial institution.

    "; + } + } + ?> + + ' . $financial_remarks . '

    '; + } + } else { ?> +

    Financial information is not available.

    + + + + + + 0) { + $getEachValues['is_od_cc'] = null; + foreach ($businessBankRow['banking_details'] as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $getEachValues['is_od_cc'] = true; + } + } + $getEachValues['bankDetails'] = BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getEachValues); + } + } + + ?> + + Business Banking:'; + if ($is_business_banking_available != null) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant(s), Applicant does not have any business account.

    '; + } + + if ($business_banking_common_remarks != "") { + echo '

    ' . $business_banking_common_remarks . '

    '; + } + } // end of busienss bankDetails available in this currrent index + ?> + + + + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $newBankingResult = array_merge($newBankingResult, $getBuinessEachValues); + } + } + // if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) + // { + // if(count($individualBankRow['banking_details'])>0){ + // $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); + // $newBankingResult = array_merge($newBankingResult,$getIndividualEachValues); + // } + // } + } + foreach ($newBankingResult as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $is_od_cc = true; + } + } + if (count($newBankingResult) > 0) { + $filteredBankingResult = array(); + $b = 0; + for ($a = 0; $a <= count($newBankingResult); $a++) { + if ($newBankingResult[$a]['account_name'] == $fetchRow['company_details']['company_name'] && $newBankingResult[$a]['str_flag'] == "buiness-company") { + $filteredBankingResult[$b] = $newBankingResult[$a]; + $b++; + } + } + } //forloop ends here. + ?> + Business Banking:'; + if (count($filteredBankingResult) > 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant, he does not have any business account.

    '; + } + } + ?> + + + 1Product / Service '; + $client_second_row = '2Contact Person '; + $client_third_row = '3Mobile Number '; + $client_fourth_row = '4Landline No'; + $client_fifth_row = '5Payment Terms'; + $client_sixth_row = '6Payment Mode'; + $client_seventh_row = '7No of Days Credit'; + + + // this is for manufacturing + if (array_key_exists('manufacturing_details', $clientRow)) { + + $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] ? $done_on_credit['manufacturing prodcuts'] = $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['manufacturing_details'] as $manuRow) { + + if (isset($manuRow['main_raw_materials'])) { + + //$to_no_of_clients += count($manuRow['main_raw_materials']); + + foreach ($manuRow['main_raw_materials'] as $main_raw_material_key => $main_raw_material) { + + if ($main_raw_material['manufacturing_product_name'] != "" || $main_raw_material['manufacturing_product_name'] != null) { + $to_no_of_clients++; + } + //print_r($main_raw_material); + $client_first_row .= '' . $main_raw_material['manufacturing_product_name'] . ''; + + $client_second_row .= isset($main_raw_material['person_title_name_master']) ? '' . $main_raw_material['person_title_name_master'] . ' ' : ''; + $client_second_row .= $main_raw_material['manufacturing_contact_person_name']; + + $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'] != 1 ? $main_raw_material['person_designation_master'] : ''; + + $client_second_row .= ' ' . $main_raw_material['manufacturing_client_name'] . ''; + + $client_third_row .= '' . ($main_raw_material['manufacturing_contact_person_mobile_number'] ? $main_raw_material['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $main_raw_material['person_stdcode'] && $main_raw_material['person_landline'] ? '' . $main_raw_material['person_stdcode'] . ' ' . $main_raw_material['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($main_raw_material['manufacturing_payment_type_master']) && $main_raw_material['manufacturing_payment_type_master'] ? '' . $main_raw_material['manufacturing_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $main_raw_material['manufacturing_payment_mode'] ? '' . $main_raw_material['manufacturing_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? '' . $main_raw_material['manufacturing_credit_days_from'] . ' to ' . $main_raw_material['manufacturing_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + + // this is for trading + if (array_key_exists('trade_details', $clientRow)) { + $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] ? $done_on_credit['trading products'] = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] : ''; + foreach ($clientRow['trade_details'] as $tradeRow) { + + if (isset($tradeRow['trading_products'])) { + + //$to_no_of_clients += count($tradeRow['trading_products']); + + foreach ($tradeRow['trading_products'] as $trading_product_key => $trading_product) { + + if ($trading_product['trade_product_name'] != "" || $trading_product['trade_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $trading_product['trade_product_name'] . ''; + + $client_second_row .= isset($trading_product['person_title_name_master']) ? '' . $trading_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $trading_product['trade_product_contact_person_name']; + + $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'] != 1 ? $trading_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $trading_product['trade_client_name'] . ''; + + $client_third_row .= '' . ($trading_product['trade_product_contact_person_mobile_number'] ? $trading_product['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? '' . $trading_product['person_stdcode'] . ' ' . $trading_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($trading_product['trade_product_payment_type_master']) ? '' . $trading_product['trade_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $trading_product['trade_product_payment_mode'] ? '' . $trading_product['trade_product_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to'] ? '' . $trading_product['trade_product_credit_days_from'] . ' to ' . $trading_product['trade_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + //this is for service + if (array_key_exists('service_provider_details', $clientRow)) { + + $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] ? $done_on_credit['service providing'] = $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['service_provider_details'] as $serviceRow) { + + if (isset($serviceRow['service_products'])) { + + //$to_no_of_clients += count($serviceRow['service_products']); + foreach ($serviceRow['service_products'] as $service_product_key => $service_product) { + + if ($service_product['service_provider_product_name'] != "" || $service_product['service_provider_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $service_product['service_provider_product_name'] . ''; + + $client_second_row .= isset($service_product['person_title_name_master']) ? '' . $service_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $service_product['service_provider_product_contact_person_name']; + + $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'] != 1 ? $service_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $service_product['service_provider_client_name'] . ''; + + $client_third_row .= '' . ($service_product['service_provider_product_contact_person_mobile_number'] ? $service_product['service_provider_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $service_product['person_stdcode'] && $service_product['person_landline'] ? '' . $service_product['person_stdcode'] . ' ' . $service_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= $service_product['service_provider_product_payment_type_master'] ? '' . $service_product['service_provider_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $service_product['service_provider_product_payment_mode'] ? '' . $service_product['service_provider_product_payment_mode'] . '' : 'NA'; + + $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to'] ? '' . $service_product['service_provider_product_credit_days_from'] . ' to ' . $service_product['service_provider_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + } + + + + $client_first_row .= ''; + $client_second_row .= ''; + $client_third_row .= ''; + $client_fourth_row .= ''; + $client_fifth_row .= ''; + $client_sixth_row .= ''; + $client_seventh_row .= ''; + //echo $client_third_row; + ?> + + Client Details'; + if ($is_client_details_available != null) { + + + + + ?> + + + + + + + + Client $i"; + } ?> + + + + + + + + + + + + + + + + +
    Sr.NoParticulars
    + $value) { + if (count($temp)) { + foreach ($temp as $tk => $tvalue) { + $value == $tvalue ? $all_same = true : $all_same = false; + array_push($temp, $value); + } + } else { + array_push($temp, $value); + } + } + + if ($all_same || count($done_on_credit) == 1) { + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $vals[0] . "% is done on credit.

    "; + } else { + $activities = ''; + foreach ($done_on_credit as $dkey => $dvalue) { + $activities .= $dkey . ' ' . $dvalue . '%, '; + } + $activities = substr_replace($activities, ' ', -2); + $activities = substr_replace($activities, ' and ', strripos($activities, ','), 2); + + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $activities . "are done on credit.

    "; + } + } + + + //CLient Photo Section + // $client_photo_count = $pd_images[2]; + // $client_img_row_count = ceil(count($client_photo_count) / 3); + + // if(count($client_photo_count)){ + // // echo '
    '; + // // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // // echo '
    '; + // echo ''; + + // $client_from_index_increment = 0; + // for($img_row = 1; $img_row <= $client_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $client_from_index_increment; + // $to = ($from + 2); + // for($client_photo_iter = $from; $client_photo_iter <= $to;$client_photo_iter++) + // { + + // if(isset($client_photo_count[$client_photo_iter]) &&$client_photo_count[$client_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $client_from_index_increment = $client_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // } + ?> + ' . $client_form_remarks . '

    '; + } // ENd of client info available in this current index + ?> + + + + + + + 1Item Purchased '; + $supplier_second_row = '2Contact Person '; + $supplier_third_row = '3Mobile Number '; + $supplier_fourth_row = '4Landline No'; + $supplier_fifth_row = '5Payment Terms'; + $supplier_sixth_row = '6Payment Mode'; + $supplier_seventh_row = '7No of Days Credit'; + + if (isset($pd_processed_forms[1][$business_count])) { + + $supplier_details = $pd_processed_forms[1][$business_count]; + $supplierRow = json_decode($supplier_details['processed_json'], true); + //print_r($supplierRow); + $supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : ''); + + if (isset($supplierRow['supplier_info_available']) && $supplierRow['supplier_info_available'] == 1) { + $is_supplier_details_avaialable = 1; + $company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details, $supplierRow['company_id'], 1); + //$supplierResult['company_name'] = $company_name; + $total_no_of_suppliers = 0; + $total_payments_percent_on_credit_for_supplier = 0; + + + foreach ($supplierRow['manufacturing_details'] as $manuRow) { + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit']) ? $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : 0; + + if (isset($manuRow['main_raw_materials'])) { + + + foreach ($manuRow['main_raw_materials'] as $rawkey => $raw) { + + if ($raw['manufacturing_raw_material_name'] != "" || $raw['manufacturing_raw_material_name'] != null) { + $total_no_of_suppliers++; + } + $supplier_first_row .= '' . $raw['manufacturing_raw_material_name'] . ''; + + $supplier_second_row .= isset($raw['person_title_name_master']) ? '' . $raw['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $raw['manufacturing_contact_person_name']; + + $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'] != 1 ? $raw['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $raw['manufacturing_supplier_name'] . ''; + + $supplier_third_row .= '' . ($raw['manufacturing_contact_person_mobile_number'] ? $raw['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '' . $raw['person_stdcode'] . ' ' . $raw['person_landline'] . '' : '' . 'Not Provided' . ''; + + + + $supplier_fifth_row .= $raw['manufacturing_payment_type_master'] ? '' . $raw['manufacturing_payment_type_master'] . '' : 'NA'; + + + + $supplier_sixth_row .= $raw['manufacturing_payment_mode'] ? '' . $raw['manufacturing_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? '' . $raw['manufacturing_credit_days_from'] . ' to ' . $raw['manufacturing_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + } + } + } + // this is for trading + //print_r($supplierRow['trade_details'][0]['trading_products']); + if (isset($supplierRow['trade_details'][0]['trading_products']) && count($supplierRow['trade_details'][0]['trading_products'])) { + $total_payments_percent_on_credit_for_supplier += $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; + foreach ($supplierRow['trade_details'][0]['trading_products'] as $tradeRow) { + + if ($tradeRow['trade_product_name'] != "" || $tradeRow['trade_product_name'] != null) { + $total_no_of_suppliers++; + } + + + + + + + $supplier_first_row .= '' . $tradeRow['trade_product_name'] . ''; + $supplier_second_row .= isset($tradeRow['person_title_name_master']) ? '' . $tradeRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $tradeRow['trade_product_contact_person_name']; + + $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'] != 1 ? $tradeRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $tradeRow['trade_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($tradeRow['trade_product_contact_person_mobile_number'] ? $tradeRow['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $tradeRow['person_stdcode'] && $tradeRow['person_landline'] ? '' . $tradeRow['person_stdcode'] . ' ' . $tradeRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + + $supplier_fifth_row .= isset($tradeRow['trade_product_payment_type_master']) ? '' . $tradeRow['trade_product_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $tradeRow['trade_product_payment_mode'] ? '' . $tradeRow['trade_product_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '' . $tradeRow['trade_product_credit_days_from'] . ' to ' . $tradeRow['trade_product_credit_days_to'] . ' days' : 'NA'; + ///array_push($supplierResult,$temp); + + //} + //} + + } + } + + if (isset($supplierRow['servicing_details'][0]['service_providers']) && count($supplierRow['servicing_details'][0]['service_providers'])) { + + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + //echo isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + + foreach ($supplierRow['servicing_details'][0]['service_providers'] as $serviceRow) { + + + if ($serviceRow['service_provider_name'] != "" || $serviceRow['service_provider_name'] != null) { + $total_no_of_suppliers++; + } + + $supplier_first_row .= '' . $serviceRow['service_provider_name'] . ''; + + + $supplier_second_row .= isset($serviceRow['person_title_name_master']) ? '' . $serviceRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $serviceRow['service_provider_contact_person_name']; + + $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'] != 1 ? $serviceRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $serviceRow['service_provider_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($serviceRow['service_provider_contact_person_mobile_number'] ? $serviceRow['service_provider_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $supplier_fourth_row .= $serviceRow['person_stdcode'] && $serviceRow['person_landline'] ? '' . $serviceRow['person_stdcode'] . ' ' . $serviceRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + $supplier_fifth_row .= isset($serviceRow['service_provider_payment_type_master']) ? '' . $serviceRow['service_provider_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $serviceRow['service_provider_payment_mode'] ? '' . $serviceRow['service_provider_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '' . $serviceRow['service_provider_credit_days_from'] . ' to ' . $serviceRow['service_provider_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + //} + } //} + + } + + $supplier_first_row .= ''; + $supplier_second_row .= ''; + $supplier_third_row .= ''; + $supplier_fourth_row .= ''; + $supplier_fifth_row .= ''; + $supplier_sixth_row .= ''; + $supplier_seventh_row .= ''; + } + // echo "dsfnsdkfnj**********"; + // print_r($supplierResult);// + + + + echo '

    Supplier Details

    '; + if ($is_supplier_details_avaialable != null) { + ?> + + + $fetchRow){ + //echo '
    Supplier '.($k+1).':

    '; + ?> + + + + + + + + Supplier $i"; + } ?> + + + + + + + +
    Sr.NoParticulars
    + '; + // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // echo '
    '; + // echo ''; + + // $supplier_from_index_increment = 0; + // for($img_row = 1; $img_row <= $supplier_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $supplier_from_index_increment; + // $to = ($from + 2); + // for($supplier_photo_iter = $from; $supplier_photo_iter <= $to;$supplier_photo_iter++) + // { + + // if(isset($supplier_photo_count[$supplier_photo_iter]) &&$supplier_photo_count[$supplier_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $supplier_from_index_increment = $supplier_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // }*/ + + + //End of Supplier Photo section + + //}//End of supplier foreach + ?> + + 0) { + //$company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1); + echo "

    Out of total purchases done by " . $company_name_for_supplier_form_dispaly . ", " . $total_payments_percent_on_credit_for_supplier . " % is done on credit.

    "; //in advance rest on delivery. + } + } + echo '

    ' . $supplier_form_remarks . '

    '; + } // End of supplier info avilable in this current index + ?> + + + + + + 0 || (is_array($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) && 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"]); + } else { + $bindStockResult["manufacturing"] = array(); + } + // this is for stock retail details + if (count($stockRow['retail_details'][0]['retail_traded_goods']) > 0) { + $bindStockResult["retail"] = Stockform::getStockRetailDetails($stockRow['retail_details'][0]['retail_traded_goods']); + } else { + $bindStockResult["retail"] = array(); + } + // this is for stock whole sale details + if (count($stockRow['trade_details'][0]['trading_traded_goods']) > 0) { + $bindStockResult["wholesale"] = Stockform::getStockWholesaleDetails($stockRow['trade_details'][0]['trading_traded_goods']); + } else { + $bindStockResult["wholesale"] = array(); + } + + // this is for stock service details + //print_r($stockRow['servicing_details']); + if (count($stockRow['servicing_details'][0]['service_provider']) > 0) { + $bindStockResult["service_stocks"] = Stockform::getStockServiceDetails($stockRow['servicing_details'][0]['service_provider']); + } else { + $bindStockResult["service_stocks"] = array(); + } + //print_r($bindStockResult);die(); + count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing']) || count($bindStockResult["service_stocks"]) ? array_push($stockResult, $bindStockResult) : array(); + //echo "**********************"; + //print_r($stockResult);die(); + ?> + +

    Stock Details

    + +

    + + + + + + + + + + + + + 0) { + foreach ($getstRow['manufacturing'] as $pstRow) { + if ($pstRow['name']) { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Sr.NoType of StockStock ItemStock Value (Rs)Stock Quantity
    + Considering the size of operations, the stock of finished goods maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of finished goods maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_stock_sufficient_enough_remarks.'

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

    Finished goods Stock not required to be maintained.

    '; + // } + + // if(!strcasecmp($is_raw_materials_sufficient_enough,'yes')) + // { + // echo '

    Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_raw_materials_sufficient_enough_remarks.'

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

    Raw material Stock not required to be maintained.

    '; + // } + + // //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 '

    '. $service_goods_enough_remarks.'

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

    Stock not required to be maintained.

    '; + // } + //echo '

    '.$stock_remarks.'

    '; + + + $stock_photo_count = array_filter($pd_images[11], function ($d) use ($business_count) { + if ($d['company_id'] == ($business_count + 1)) { + return 1; + } else { + return 0; + } + }); + //echo 'stock_photo_count - ' . count($stock_photo_count); + $stock_img_row_count = ceil(count($stock_photo_count) / 3); + if (count($stock_photo_count)) { + echo '
    '; + echo '

    Stock Photograph`s :

    '; + echo '
    '; + echo ''; + + for ($img_row = 0; $img_row < $stock_img_row_count; $img_row++) { + // if($img_row > 0) { break; } + echo ''; + $from = $img_row == 0 ? $img_row : ($img_row + 2); + $to = ($from + 2); + for ($stock_photo_iter = $from; $stock_photo_iter <= $to; $stock_photo_iter++) { + + if (isset($stock_photo_count[$stock_photo_iter]) && $stock_photo_count[$stock_photo_iter]['company_id'] == ($business_count + 1)) { + echo ''; + //unset($stock_photo_count[$stock_photo_iter]); + } + } + //echo "


    "; + echo ''; + } + //echo ''; + echo '
    '; + echo ''; + echo '
    '; + } + // + ?> + + + ' . $stock_form_remarks . '

    '; + //else { + ?> + + + + + + + + +

    Future Plan and Business Environment

    + + + + + + + + + '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + + ?> + +
    ParticularsDetails
    USP of the business (How applicant’s business is different from others in the business)' . $future_plan_business_environment['usp_of_the_business'] . '
    Future plan for business expansion' . $future_plan_business_environment['future_plans_for_business_expansion'] . '
    Impact of GST on business' . $future_plan_business_environment['impact_of_gst_on_the_business'] . '
    Key competitors in the business' . $future_plan_business_environment['key_competitors'] . '
    Succession Plan for business' . $future_plan_business_environment['succession_plan'] . '
    Brief of other group concerns/ Business run by the applicant' . $future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'] . '
    + '; + echo '

    ' . $future_plan_business_environment['remarks'] . '

    '; + } + } + + ?> + + + + + + Assessed Income - " . MYUTIL::findCompanyName($all_company_details, ($business_count + 1), 1) . ""; + if (isset($ai_core_details) && count($ai_summary_details_processed)) { + echo '

    ' . $order_dipaly_array[0] . ') Financial Snapshot

    '; + echo ''; + echo ''; + echo $ai_summary_details_processed['ai_table_header_row']; + echo ''; + echo ''; + echo $ai_summary_details_processed['sale_revenue_row']; + echo $ai_summary_details_processed['purchase_row']; + echo $ai_summary_details_processed['gross_profit_loss_row']; + echo $ai_summary_details_processed['gross_profit_loss_per_row']; + echo $ai_summary_details_processed['business_expense_row']; + echo $ai_summary_details_processed['net_profit_loss_row']; + echo $ai_summary_details_processed['house_hold_expense_row']; + echo $ai_summary_details_processed['disposable_income_row']; + echo $ai_summary_details_processed['net_margin_row']; + + echo ''; + echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + array_shift($order_dipaly_array); + } + + + echo '

    '; + //die(); + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '

    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // } + // array_shift($order_dipaly_array); + // echo '

    Detail Available on Annexure A'; + // } + + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '
    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // echo '
    '; + // $row_count = ceil(count($sale_month_wise['months']) / 5); + // //print_r(($sale_month_wise['months'])); + // // echo $row_count; + // //die(); + // echo ''; + + // for($i = 0; $i <= $row_count; $i++) + // { + // $from = $i== 0 ? $i : ($i + 3); + // $to = ($from + 3); + // echo ''; + // for($j = $from ; $j <= $to ;$j++) + // { + // //$sale_month_wise['months'] as $sale_month_data + // //echo ''; + // if(isset($sale_month_wise['months'][$j])) + // { + // echo ''; + // } + // } + // echo ''; + // } + // echo '
    '; + // echo ''; + // echo ''; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // }else if($sale_month_wise['months'][$j]['sales_type'] == 2) + // { + // echo ''; + // } + // echo ''; + + // echo ''; + + // foreach($sale_month_wise['months'][$j]['month_data'] as $m_key => $month) + // { + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($m_key == 20)break; + // else if($sale_month_wise['sales_type'] == 2) + // { + // echo ''; + // } + // } + // echo ''; + + // echo '
    '.$sale_month_wise['months'][$j]['month_to_dispaly'].'
    Date Value
    Frequncy Value
    '.$month['date'] .' '.$month['value'] .'
    '.$month['frequency_name'] .' '.$month['frequency_value'] .'
    '; + // echo '
    '; + // echo '
    '; + + // //} + // } + + // array_shift($order_dipaly_array); + // } + + + $GLOBALS['is_kuccha_records_available'] = null; + if (isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) { + echo '

    ' . $order_dipaly_array[0] . ') Sales Itemwise :

    '; + echo ''; + echo ''; + echo $ai_core_details_processed['sales_calculated_by_itemwise_header']; + echo ''; + echo ''; + //print_r($ai_core_details_processed['sales_item_wise_to_diaplay']);die(); + foreach ($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid) { + //print_r($sid); + if ($sid['sales_type'] == 3) { + $GLOBALS['is_kuccha_records_available'] = true; + } + $rate_per_unit = ($sid['rate_per_unit'] != 0 && $sid['rate_per_unit'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['rate_per_unit']) : '-'); + echo ''; + echo ''; + if (isset($sid['margin_per'])) { + echo ''; + } + // if(isset($sid['margin_per_uom'])){echo ''; } + if (isset($sid['margin_final_value'])) { + echo ''; + } + + echo ''; + } + echo ''; + echo '
    ' . ($sid['other_sales_item'] != '' ? $sid['other_sales_item'] : $sid['sale_item']) . '' . $sid['sales_qty'] . '' . $sid['uom'] . '' . $rate_per_unit . '' . $sid['frequency'] . '' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['annual_sale_value']) . ($sid['sales_type'] == 3 ? ' *' : '') . '' . ($sid['margin_per'] != 0 ? $sid['margin_per'] : '-') . ''.($sid['margin_per_uom'] != 0? $sid['margin_per_uom'] : '-').'' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['margin_final_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if ($GLOBALS['is_kuccha_records_available']) { + echo '
    * Assessed From Kuchha Records, Details Available in Annexure A'; + } + + + if (isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Sales Declared By Customer

    '; + + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) + // { + // echo '

    As per person met, the following Purchase details were shared:

    '; + // } + // else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + // } + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ) declared as annual sale value.'; + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + $str .= '
    and ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' )' . '( ' . $ai_core_details['sales_declared_by_customer'][0]['margin_per'] . '% sales declared ) as net margin amount.'; + } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) { + echo '

    As per person met, the following Purchase details were shared:

    '; + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + } + + echo '
    '; + if (isset($ai_core_details) && count($ai_core_details['purchase_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Purchase Declared By Customer

    '; + + + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ) declared as annual purchase value.'; + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // $str .= '
    and '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']).' ( '.MYUTIL::numtowords( $ai_core_details['sales_declared_by_customer'][0]['margin_value']).' )'.'( '.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'% sales declared ) as net margin amount.'; + // } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 1) { + echo '

    ' . $order_dipaly_array[0] . ') Itemwise Purchase Details :

    '; + + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($ai_core_details_processed['purchase_to_display'] as $dat) { + $rate = $dat['rate'] != 0 && $dat['rate'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['rate']) : '-'; + echo ''; + } + echo ''; + + echo '
    Raw Material/Trading Item Purchase Quantity UOM Rate/Unit of Purchase Frequency Annual Purchase(Rs)
    ' . $dat['material_name'] . ' ' . $dat['qty'] . ' ' . $dat['uom'] . ' ' . $rate . ' ' . $dat['frequency'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['annual_value']) . '
    '; + array_shift($order_dipaly_array); + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 2) { + echo '

    ' . $order_dipaly_array[0] . ') Billwise Purchase Details :

    '; + foreach ($ai_core_details_processed['purchase_to_display'] as $billwise) { + echo '
    '; + echo 'Item name : ' . $billwise['item_name'] . '
    '; + echo '' . $billwise['month_count'] . ' month(s) purchase value : ' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value']) . ' Annual Purchase value:' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value'] * (12 / $billwise['month_count'])) . ''; + echo '
    '; + foreach ($billwise['months'] as $month_data) { + //echo ''; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($month_data['month_data'] as $month) { + echo ''; + } + echo ''; + + echo '
    ' . $month_data['month_to_dispaly'] . '
    Date Value
    ' . $month['date'] . ' ' . $month['value'] . '
    '; + //echo '
    '; + } + echo '
    '; + } + array_shift($order_dipaly_array); + } + } + + // + if (isset($ai_core_details) && count($ai_core_details['business_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Business Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp) { + if ($b_exp['expense_value'] != 0) { + echo ''; + } + } + echo ''; + echo '
    Business Expense Amount Frequency Annual Expenses
    ' . $b_exp['expense_item'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['expense_value']) . ' ' . $b_exp['frequency_name'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['annual_expenses_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if (isset($ai_core_details) && count($ai_core_details['house_hold_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Household Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['household_expenses_to_diaplay'] as $h_exp) { + echo ''; + } + echo ''; + echo '
    Expense Particulars Amount (Rs) Frequency Annual Expenses(Rs)
    ' . $h_exp['expense_item'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['expense_value']) . ' ' . $h_exp['frequency_name'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['annual_expense_value']) . '
    '; + array_shift($order_dipaly_array); + } + + + // if(isset($ai_core_details) && count($ai_summary_details_processed)) + // { + // echo '

    The Summary of Income :

    '; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['ai_table_header_row']; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['sale_revenue_row']; + // echo $ai_summary_details_processed['purchase_row']; + // echo $ai_summary_details_processed['gross_profit_loss_row']; + // echo $ai_summary_details_processed['business_expense_row']; + // echo $ai_summary_details_processed['net_profit_loss_row']; + // echo $ai_summary_details_processed['house_hold_expense_row']; + // echo $ai_summary_details_processed['disposable_income_row']; + // echo $ai_summary_details_processed['net_margin_row']; + + // echo ''; + // echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + // } + // echo "
    "; + // + + ?> + + + + + + + + + + $oaRow) { + $otherAssetRow = json_decode($oaRow['processed_json'], true); + //print_r($otherAssetRow);die(); + $other_assest_common_remrks = $otherAssetRow['assets_form_remark']; + if (isset($otherAssetRow['asset_info_available']) && $otherAssetRow['asset_info_available'] == 1) { + $is_personal_info_available = 1; + + if (count($otherAssetRow['assets_details']) > 0) { + $otherAssetResult = ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'], $pd_master_details[0]['pd_id']); + + //print_r($otherAssetResult); + } + } +} +?> + +

    Personal Assets

    + + + + + + + + + + + + + + + $paRow) { + ?> + + + + + + + + + + + +
    Sr.NoAsset TypeAsset DescriptionAsset Owned ByApprox Market Value(Rs)Age of the Assest Again Assest
    ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : (($paRow['approximate_market_value'] != '' && $paRow['approximate_market_value'] != 0 ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : 'Not Provided')); ?>
    + +

    As per Loan applicant, he does not have any other assets.

    +' . $other_assest_common_remrks . '

    '; +} + +?> + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + // $is_personal_banking_available = 1; + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getBuinessEachValues); + } + } + if (isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) { + if (count($individualBankRow['banking_details']) > 0) { + $getIndividualEachValues = BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getIndividualEachValues); + } + } +} +if (count($bankingResult) > 0) { + $filteredPersonalBankingResult = array(); + $x = 0; + for ($y = 0; $y < count($bankingResult); $y++) { + if ($bankingResult[$y]['str_flag'] !== "buiness-company") { + $filteredPersonalBankingResult[$x] = $bankingResult[$y]; + $x++; + } + if ($bankingResult[$y]['same_ac_used_for'] == "Business") { + $stmt_flag++; + } + } +} + + +?> +

    Personal Banking Details:

    + 0) { ?> +

    Below bank account details were shared :

    + + + + + + + + + + + + + + + $bdRow) { + ?> + + + + + + + + + + + + +
    Sr.NoAccount Holder's NameBank NameAccount TypeOD / CC LimitVintage
    + 0) { + echo '

    The personal banking is done through same account used for business banking

    '; +} +if ($ind_banking_common_remarks != '') { + echo '

    ' . $ind_banking_common_remarks . '

    '; +} +if (count($filteredPersonalBankingResult) == 0) { + echo '

    As per loan applicant, he does not have any personal account

    '; +} ?> + + + + + + + $iRow) { + $otherIcomeRow = json_decode($iRow['processed_json'], true); + $other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks']; + //print_r($otherIcomeRow);die(); + + if (strtoupper($otherIcomeRow['other_income']) == 'YES' && count($otherIcomeRow['income_details']) > 0) { + $is_other_income_available = 1; + $otherIncomeResult = OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'], $pd_master_details[0]['pd_id']); + } +} +?> +
    +

    Other Sources of Income of Individual Applicants:

    + + + + + + + + + + + + + + $oiRow) { + ?> + + + + + + + + + +
    Sr.NoIncome SourceEarned byAmount(Rs)
    (Details Available in Annexure B)'; + $GLOBALS['is_rental_available'] = 1; + } ?>
    + +

    As per the loan applicants, they do not have any other source of Income.

    +' . $other_source_income_common_remarks . '

    '; +} + +?> + + + + + $fRow) { + $familyRow = json_decode($fRow['processed_json'], true); + //print_r($familyRow);die(); + $other_family_form_common_remarks = $familyRow['family_details_form_remark']; + if (array_key_exists('family_details', $familyRow) && count($familyRow['family_details']) > 0) { + $familyResult = OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'], $pd_master_details[0]['pd_id']); + } +} +?> + +

    Family Information:

    + 0) { + //print_r($familyResult); +?> + + + $fmValue) { ?> + + ' . $fmValue['selected_person_title'] . $fmValue['selected_person'] . 'Family Information - Select person for capturing family details, who is an applicant in the case, resides at ' . $fmValue['residency_address'] . 'Family Information - Residence Address of Select person .'; + + $residence_text = 'This is a ' . $fmValue['residence_ownership'] . ' Family Information - Ownership of Residence residence, where the applicant has been staying for ' . $fmValue['residence_No_of_years'] . 'Family Information - No of Yrs in current residence .'; + $residence_text .= (!strcasecmp($fmValue['residence_ownership'], 'rented')) ? ' The rent paid ' . $rupee_symbol . ' ' . $fmValue['rent'] . ' per month.' : ''; + + echo '

    ' . $intro_text . '

    '; + echo '

    ' . $residence_text . '

    '; + + ?> + + +

    The table below provides details of other family members of

    + + + + + + + + + + + + + $fmRow) { + ?> + + + + + + + + + + +
    Sr.NoNameRelationAgeEarning StatusOccupation Details
    + ' . $text . '

    '; + } + } ?> + +

    Other Family Members is not available.

    +' . $other_family_form_common_remarks . '

    '; +} + +?> + + + + + + $elRow) { + $otherLoanRow = json_decode($elRow['processed_json'], true); + $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; + $is_all_loan_details_availble = 'yes'; + $out_standing_loan_info = array(); + if (array_key_exists('loan_info_available', $otherLoanRow)) { + $is_all_loan_details_availble = $otherLoanRow['loan_info_available']; + } + $total_no_of_data = 0; + if (strtoupper($otherLoanRow['existing_loan']) == 'YES' && (!strcasecmp($is_all_loan_details_availble, 'yes') && count($otherLoanRow['loan_details']) > 0)) { + $is_existing_loans_available = 1; + $total_no_of_data = count($otherLoanRow['loan_details']); + $existLoanResult = FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'], $pd_master_details[0]['pd_id']); + } else if (!strcasecmp($is_all_loan_details_availble, 'no')) { + $out_standing_loan_info['tot_running_loans'] = $otherLoanRow['tot_running_loans']; + $out_standing_loan_info['tot_emi_paid'] = $otherLoanRow['tot_emi_paid']; + $out_standing_loan_info['tot_outstanding_loans'] = $otherLoanRow['tot_outstanding_loans']; + } +} +?> +
    +

    Existing loan obligation

    + + + + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. +

    + $single_table) { + //print_r($single_table);die(); + + if (is_numeric($table_key)) { + ?> + + + + + Loan $pre_loan_no"; + } ?> + + + + + + +
    Particulars
    +
    + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. + + + + + + + + + + + + + + + +
    Total No of Running LoansTotal Outstanding AmountTotal EMI being Paid (Monthly)
    + + +

    As per loan applicant he does not have any existing loan obligations.

    + +' . $existing_loan_form_common_remarks . '

    '; +} +?> + + + + + + + + + + +'; +echo '

    Credit Manager`s Specific Queries:

    '; +//echo '
    '; +if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { + + + foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) { + echo 'Question - ' . $value['question'] . '
    '; + echo 'Answer - ' . $value['answer']; + echo '

    '; + } +} else { + echo 'There are no specific queries raised by Credit Manager.'; +} + +echo '
    '; +echo '

    Document to be photographed/scanned:

    '; +// +if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { + + + foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) { + echo 'Document Required : ' . $doc_value['doc_name'] . '
    '; + echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
    ' : 'NO
    '); + if ($doc_value['ans'] != 'yes') { + echo 'Reason : ' . $doc_value['reason']; + } + echo '

    '; + } +} else { + echo 'There are no specific documents to be collect.'; +} + +if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) { + echo '
    '; + echo '

    Queries related to Covid-19:

    '; + + foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) { + if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) { + echo 'Question : ' . $covid_value['question'] . '
    '; + $temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) { + $temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')'; + } + echo 'Answer : ' . $temp_answer . '
    '; + $sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) { + echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '
    '; + } + + echo '
    '; + } + } +} + +//} + +?> + + + + +
    +
    +

    PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR & OVERALL PD STATUS

    + +
    + + '; + echo '

    Personal feedback or market intelligence on the case (if any):

    '; + echo '

    ' . $final_remark_data['market_intelligence'] . '

    '; + echo '
    '; + //echo '
    '; + } + ?> +
      +
    • Customer Behaviour:
    • + +

      + + ✔'; + ?> + + + + + + + + +
      +
      Polite
      +
      +
      +
      Rude
      +
      +
      +
      Others*
      +
      +
      +
      +
      '; + } ?> + + + +
      +
    • PD Officer’s overall assessment:
    • +

      + + + + + + + + + + + + + + + + +
      +
      Positive
      +
      +
      +
      Refer to Credit
      +
      +
      +
      Negative
      +
      +
      +
      Others*
      +
      +
      +
      + +
    +
    + + +

    PD officer recommendation is ' . $fo_diplay . '.

    '; ?> +

    The following key points were considered while arriving at the aforementioned status.

    +"; + foreach ($final_remark_data['recommendation_positive'] as $pos) { + echo "
  • " . $pos['reason_for_positive'] . "
  • "; + } + } else if ($negative) { + echo "
      "; + foreach ($final_remark_data['recommendation_negative'] as $neg) { + echo "
    • " . $neg['reason_for_negative'] . "
    • "; + } + } else if ($refer_to_credit) { + echo "
        "; + foreach ($final_remark_data['recommendation_refer_to_credit'] as $rtc) { + echo "
      • " . $rtc['reason_for_refer_to_credit'] . "
      • "; + } + } + echo "
      "; +?> +" . $other_command_remark . "

      "; + } + + echo '

      ' . $pd_officer_final_remark . '

      ' +?> + + + + + + 0) { + for ($business_count = 0; $business_count < $total_no_of_business; $business_count++) { + if (is_array($assessed_income_details) && count($assessed_income_details) && isset($assessed_income_details[($business_count + 1)]) && count($ai_core_details['sales_calculated_by_itemwise']) && $GLOBALS['is_kuccha_records_available']) { + echo '
      '; + echo '

      Annexure A

      '; + if (isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) { + //echo "
      "; + echo '

      Kuchha Sales Book/Bills Details:

      '; + //print_r($ai_core_details_processed['sales_item_wise_to_diaplay']);//die(); + foreach ($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sale_month_wise) { + + //echo '
      '; + if ($sale_month_wise['sales_type'] == 3 || $sale_month_wise['sales_type'] == 2) { + //print_r($sale_month_wise);//die(); + echo 'Item name : ' . $sale_month_wise['sale_item'] . '
      '; + if ($sale_month_wise['sales_type'] == 3) { + echo '' . $sale_month_wise['month_count'] . ' month sales value : ' . $rupee_symbol . '' . MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']) . ' Annual Sales value:' . $rupee_symbol . '' . MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']))) . ' (i.e. ' . (12 / $sale_month_wise['month_count']) . ' * ' . $sale_month_wise['total_months_value'] . ')'; + } else { + echo 'Annual Sales value:' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'])) . ''; + } + echo '
      '; + echo '
      '; + $row_count = ceil(count($sale_month_wise['months']) / 5); + //print_r(($sale_month_wise['months'])); + // echo $row_count; + //die(); + echo '
      '; + + for ($i = 0; $i <= $row_count; $i++) { + $from = $i == 0 ? $i : ($i + 3); + $to = ($from + 3); + //echo ''; + for ($j = $from; $j <= $to; $j++) { + //$sale_month_wise['months'] as $sale_month_data + //echo ''; + if (isset($sale_month_wise['months'][$j])) { + + //print_r($sale_month_wise['months'][$j]) ;die(); + echo '
      '; + //echo ''; + echo '
      '; + echo ''; + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + } + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + } else if (($sale_month_wise['sales_type'] == 2)) { + echo ''; + } + echo ''; + + echo ''; + + $month_sub_total = 0; + foreach ($sale_month_wise['months'][$j]['month_data'] as $m_key => $month) { + + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + $month_sub_total += $month['value']; + } + //if($m_key == 20)break; + else if ($sale_month_wise['sales_type'] == 2) { + echo ''; + $month_sub_total += $sale_month_wise['annual_sale_value']; + } + } + echo ''; + $month_sub_total = 0; + echo ''; + + echo '
      ' . $sale_month_wise['months'][$j]['month_to_dispaly'] . '
      Date Value
      Frequncy Value
      ' . $month['date'] . ' ' . $month['value'] . '
      ' . $month['frequency_name'] . ' ' . $month['frequency_value'] . '
      Total ' . MYUTIL::customIndianNumberFormat($month_sub_total) . '
      '; + echo '
      '; + echo '   '; + } + } + //echo ''; + } + echo '
      '; + echo '
      '; + } + } + } + } // end of if AI available in current business count + } //end of total no of business for loop +} +?> + + + + + + $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 '
      '; + echo '

      Annexure B : Rental Income Details

      '; + + foreach ($rental_data as $key => $value) { + + echo '
      Property : ' . ($key + 1) . ''; + echo '

      Address of Property : ' . ($value['address_property']) . ''; + echo '

      Type of Property : ' . ($value['type_of_property']) . ''; + echo '

      Name of the Property Owner`s : ' . ($value['property_owners_name']) . ''; + echo '

      Name of the person`s who showing Property : ' . ($value['property_showing_persons_name']) . ''; + echo '

      Property Document Proof Seen : ' . ($value['property_document_proof_visted']) . ''; + if (!strcasecmp($value['property_document_proof_visted'], 'yes')) { + echo '      Type of Property Document Visted : ' . ($value['type_of_document_visited']) . ''; + } + echo '

      Unit Type : ' . ($value['unit_type']) . ''; + echo '

      No of Floors/Units : ' . ($value['no_of_floors']) . ''; + echo '      '; + echo $value['area_coverd'] != "" ? 'Area covered : ' . ($value['area_coverd'] . ' ' . $value['area_uom'] . '') : ''; + + if (isset($value['unit_details']['multistorey']) && count($value['unit_details']['multistorey'])) { + echo '

      Multistorey Details:

      '; + echo ''; + echo ''; + foreach ($value['unit_details']['multistorey'] as $multistorey_key => $multistorey_value) { + echo ''; + } + echo ''; + echo '
      Floor Name No of Units Rent same for
      all Units
      Unit Details Total
      Rent Amount
      ' . $multistorey_value['floor_name'] . ' ' . $multistorey_value['no_units_in_floor'] . '' . $multistorey_value['same_rent'] . '' . $multistorey_value['unit_details'] . '' . $multistorey_value['total_floor_rent'] . '
      Total ' . $rupee_symbol . ' ' . $value['unit_details']['multistorey_over_all_total'] . '
      '; + } + + echo '

      Unit Details:

      '; + foreach ($value['unit_details']['property_core'] as $u_key => $unit_value) { + echo '
      '; + echo $unit_value['unit_name']; + echo ''; + echo $unit_value['header_row']; + echo $unit_value['first_owners_row']; + echo $unit_value['second_lessee_name_row']; + echo $unit_value['third_area_of_unit_row']; + echo $unit_value['fourth_payment_mode_row']; + echo $unit_value['fifth_lease_period_row']; + echo $unit_value['sixth_security_deposit_row']; + echo $unit_value['eigth_current_rent_received_row']; + echo $unit_value['nineth_difference_between_rent_amount_row']; + echo '
      '; + } + + //print_r($value['third_check_details']); + if ($value['third_check_details']['done_third_party_check']) { + echo '
      For property' . ($key + 1) . ' Third Party check was 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'] . '). ' : ' '; + if ($value['third_check_details']['rental_rates_third_party_check_done'] != "") { + echo 'Rental rates in the area as per person whom third party check is done is ' . $value['third_check_details']['rental_rates_third_party_check_done']; + } + } else { + + echo '
      For property ' . ($key + 1) . ' Third Party check not done.'; + echo isset($value['third_check_details']['why_third_party_check_not_done']) && $value['third_check_details']['why_third_party_check_not_done'] != "" ? 'Resaon - ' . $value['third_check_details']['why_third_party_check_not_done'] : ''; + } + echo '
      ' . $value['property_remark']; + } + } +} + + +?> + + + + +"; +$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3); +if (isset($footer_lender_stamp)) { + //$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3); + echo '

      '; +} + +$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2); + +if (isset($footer_lender_disclaimer)) { + echo '

      ' . $footer_lender_disclaimer['disclaimer'] . '

      '; +} +echo "

      "; + +// ########################### End disclaimer end ######################################### +?> + + + + + + +
      '; + echo "

      Detailed Score Card Section

      "; + // *** General Section Questions Score Table + echo ''; + echo ""; + foreach ($pd_score['general'] as $key => $general) { + + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $general['l1_weightage'] . '% * ' . $general['l2_weightage'] . '% * ' . $general['score_band'] . ')'; + $max_span = '(' . $general['l1_weightage'] . '% * ' . $general['l2_weightage'] . '% * ' . $general['max_score_band'] . ')'; + echo '' . ''; + } + + echo ''; + echo '
      General Questions L1(" . $pd_score['general']['otp_done']['l1_weightage'] . "%) L2 Answer Score Attributed Score Max Score
      ' . $question . '' . $general['l2_weightage'] . '%' . $general['answer'] . + '' . $general['score_band'] . '' . $general['attributed_score'] . '
      ' . $span . '
      ' . $general['max_score'] . '
      ' . $max_span . '
      General Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['general']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['general']['max_score'], 2, '.', ',') . '
      '; + + echo '

      '; + + + // *** Asset Caculation Score Table + echo ''; + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + + + echo '
      Asset Value Calculaitons
      Actual Value Of Assets (a)" . number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'], 2, '.', ',') . "
      Loan Amount (b)" . number_format($pd_score['score_summary']['asset_calculation_details']['loan_amount'], 2, '.', ',') . "
      Avg Expected Value Of Assets (c)" . round($pd_score['score_summary']['asset_calculation_details']['avg_expected_value_of_assets'], 2) . "%
      Expected Value Of Assets (d = c*b)" . number_format($pd_score['score_summary']['asset_calculation_details']['expected_value_of_assets'], 2, '.', ',') . "
      Actual Value Of Assets Percentage (e = (a/b) * 100)" . round($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets_percentage'], 2) . "%
      Variance (f = ((e-c)/c) * 100)" . round($pd_score['score_summary']['asset_calculation_details']['variance'], 2) . "%
      Score As per Grid" . round($pd_score['score_summary']['asset_calculation_details']['score'], 2) . "
      '; + + echo '


      '; + // *** Final Remarks Questions Score Table + echo ''; + echo ""; + foreach ($pd_score['final_remarks'] as $key => $final_remark) { + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + + $span = '(' . $final_remark['l1_weightage'] . '% * ' . $final_remark['l2_weightage'] . '% * ' . $final_remark['score_band'] . ')'; + + $max_span = '(' . $final_remark['l1_weightage'] . '% * ' . $final_remark['l2_weightage'] . '% * ' . $final_remark['max_score_band'] . ')'; + + echo '' . ''; + } + + echo ''; + echo '
      Final Remarks Questions L1(" . $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage'] . "%) L2Answer ScoreAttributed Score Max Score
      ' . $question . '' . $final_remark['l2_weightage'] . '%' . $final_remark['answer'] . '' . $final_remark['score_band'] . '' . $final_remark['attributed_score'] . '
      ' . $span . '
      ' . $final_remark['max_score'] . '
      ' . $max_span . '
      Final Remarks Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['final_remarks']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['final_remarks']['max_score'], 2, '.', ',') . '
      '; + echo '


      '; + + //print_r($pd_score['business']); + echo ''; + + // *** Business Section Questions Score Table + echo ""; + $certificates = array(); + foreach ($pd_score['business'] as $key => $business) { + + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $business['l1_weightage'] . '% * ' . $business['l2_weightage'] . '% * ' . $business['score_band'] . ')'; + $max_span = '(' . $business['l1_weightage'] . '% * ' . $business['l2_weightage'] . '% * ' . $business['max_score_band'] . ')'; + + if (($key != 'cerificates') && ($key != 'location_suited_for_busienss')) { + echo '' . ''; + } + + if ($key == 'location_suited_for_busienss') { + echo '' . ''; + } + + if ($key == 'cerificates') { + $certificates = $business; + + echo '' . ''; + } + } + + echo ''; + echo '
      Business Questions L1(" . $pd_score['business']['no_of_years_business_run']['l1_weightage'] . "%) L2Answer Score Attributed ScoreMax Score
      ' . $question . '' . $business['l2_weightage'] . '%' . $business['answer'] . '' . $business['score_band'] . '' . $business['attributed_score'] . '
      ' . $span . '
      ' . $business['max_score'] . '
      ' . $max_span . '
      ' . $question . '' . $business['l2_weightage'] . '%' . $address_type_remarks_caption[$business['answer']] . '' . $business['score_band'] . '' . $business['attributed_score'] . '
      ' . $span . '
      ' . $business['max_score'] . '
      ' . $max_span . '
      Certificates ' . round($business['l2_weightage'], 2) . '%' . 'Refer Cert Table' . '' . $business['score_band'] . '' . $business['attributed_score'] . '' . $business['max_score'] . '
      Business Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['business']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['business']['max_score'], 2, '.', ',') . '
      '; + + + // *** Business Certificates Score Table + + + echo '

      '; + + echo ""; + echo ""; + $index = 0; + // print_r($certificates); + foreach ($certificates as $key => $cerificate) { + $index++; + if ($index <= 7) { + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $cerificate['l1_weightage'] . '% * ' . $cerificate['l2_weightage'] . '% * ' . $cerificate['score_band'] . ')'; + + $max_span = '(' . $cerificate['l1_weightage'] . '% * ' . $cerificate['l2_weightage'] . '% * ' . $cerificate['max_score_band'] . ')'; + + echo '' . ''; + } + } + echo "
      Business Certificates Answer Score Attributed Score Max Score
      ' . $question . '' . $cerificate['answer'] . '' . $cerificate['score_band'] . '' . round($cerificate['attributed_score'], 3) . '
      ' . $span . '
      ' . round($cerificate['max_score'], 3) . '
      ' . $max_span . '
      "; +} +// ########################### End Of Score Card Section ######################################### + + + + + + +?> + + + + \ No newline at end of file diff --git a/api/application/views/report_templates/JSONTOREPORT_FI_RV.php b/api/application/views/report_templates/JSONTOREPORT_FI_RV.php new file mode 100644 index 00000000..b98413f4 --- /dev/null +++ b/api/application/views/report_templates/JSONTOREPORT_FI_RV.php @@ -0,0 +1,5194 @@ + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + Powered by PD Genie™ +
      + +
      +
      +
      +
      + + + ₹"; + ?> +
      "; + + echo "
      "; + echo "

      PERSONAL DISCUSSION REPORT

      "; + echo "
      for the case of
      "; + + echo "

      " . $main_applicant_name . "

      "; + echo "
      "; + echo "



      "; + ?> + + + + '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + ?> + + + + Loan Amount Applied For :

      "; + //echo '
      PD Initiated Date : ' . $pd_master_details[0]['createdon'] . '
      Tele PD Date : ' . $pd_master_details[0]['pd_visit_date'] . '
      PD Report Date : ' . $pd_master_details[0]['pd_report_generated_date'] . '
      PD Initiated by : ' . $pd_master_details[0]['branch_name'] . ' Branch
      PD Type : Telephonic
      ' . $loan_word . ' Application ID : ' . $pd_master_details[0]['lender_applicant_id'] . '
      Product : ' . $pd_master_details[0]['product_name'] . '
      Customer Segment : ' . (explode('-', $pd_master_details[0]['customer_segment_name'])[0]) . '
      + $pd_initiation_loan_amt = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? $loan_form['loan_amount'] : $loan_form['facility_amount']; + echo ''; + // echo ''; + echo '
      ' . $loan_word . ' Amount
      (As Per PD Initiation)
      : ' . ' ' . MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']) . '
      (' . MYUTIL::numtowords($pd_master_details[0]['loan_amount']) . ')
      ' . $loan_word . ' Amount
      (As Per ' . $loan_word . ' Applicants during PD)
      : ' . ' ' . MYUTIL::customIndianNumberFormat($pd_initiation_loan_amt) . '
      (' . MYUTIL::numtowords($pd_initiation_loan_amt) . ')
      '.$loan_word.' Amount
      (As Per PD Initiation)
      : ' .' '. MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '
      ('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
      '.$loan_word.' Amount
      (As Per '.$loan_word.' Applicants during PD)
      : ' .' '. MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '
      ('. MYUTIL::numtowords($loan_form['loan_amount']) .')
      '; + //echo "
      "; + echo "

      "; + echo "

      "; + echo "

      "; + echo "

      "; + echo "

      "; + echo "

      "; + + $header_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 1); + if (isset($header_lender_disclaimer['disclaimer']) && $header_lender_disclaimer['disclaimer'] != '' && $header_lender_disclaimer['type'] == 1) { + echo '

      Disclaimer: ' . $header_lender_disclaimer['disclaimer'] . '

      '; + } + + echo '

      Registered / Corporate Office: SineEdge Consulting Private Limited. A-211, Pioneer Urban Square, Golf Course Extension Road, Sector 62, Gurgaon, Haryana - 122002

      '; + ?> + + + + + + $individual) { + //print_r($individual);die(); + if ($individual['is_person_met'] == true) { + //array_push($person_met_images); + $temp_person_met = array(); + $applicant_name = $individual['applicant_name']; + //$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : "Not Available" ; + //echo '
      '.$individual['applicant_title_name_master'] .' '. $applicant_name.'
      ' ; + $temp_person_met['name'] = $individual['applicant_title_name_master'] . ' ' . $applicant_name; + $temp_person_met['photo'] = ''; + $temp_person_met['id_proof'] = ''; + foreach ($pd_images[18] as $pm_Key => $pm_value) { + + //echo $applicant_name.'-'.$pm_value['pd_document_title']; + if (!strcasecmp(trim($applicant_name), trim($pm_value['pd_document_title']))) { + $temp_person_met['photo'] = $pm_value['doc_url']; + } + + $id = trim($applicant_name) . '-id_proof'; + if (!strcasecmp($id, trim($pm_value['pd_document_title']))) { + $temp_person_met['id_proof'] = $pm_value['doc_url']; + } + } + $company_relationship_data = null; + foreach ($general_form['company_with_relationships'] as $company_with_relationship) { + if ($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name']) { + //FInd Company Name from JSON + $company_relationship_data .= $company_with_relationship['company_relationship_master'] . ' ' . $company_with_relationship['company_name']; + + //$company_relationship_data.='
      and

      '; + $company_relationship_data .= ', '; + } + } + //$temp_person_met['name'] = + //print_r($general_form['persons_with_relationships']); + $personal_relationship_data = null; + foreach ($general_form['persons_with_relationships'] as $persons_with_relationship) { + if ($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] && isset($persons_with_relationship['relationship'])) { + + if (isset($persons_with_relationship['relation_to_master'])) { + //? $persons_with_relationship['relation_to_master'] : " Could Not Find"; + $RSNA = $persons_with_relationship['relation_to_master']; + if (isset($persons_with_relationship['relationship_master'])) { + $personal_relationship_data .= $persons_with_relationship['relationship_master'] . ' Of ' . $RSNA; + //$personal_relationship_data.='
      and

      '; + $personal_relationship_data .= ', '; + } + } + } + } + + $company_relationship_data .= $personal_relationship_data; + $temp_person_met['relations'] = $company_relationship_data; + array_push($person_met_data, $temp_person_met); + } + } + + + //print_r($person_met_data);die(); + echo '
      '; + echo '

      Person(s) Met:

      '; + echo '
      '; + foreach ($person_met_data as $pk => $person) { + $display_for_person_met = $person['relations'] != "" ? substr_replace($person['relations'], '.', strrpos($person['relations'], ','), 1) : ''; + + $person_met_details = $person['name']; + if (strcasecmp($pd_master_details[0]['customer_segment_abbr'], 'SEP_INDV')) { + $person_met_details .= ($display_for_person_met != "" ? ' - ' . $display_for_person_met : ''); + } + echo '

      ' . $person_met_details . '

      '; + + //if($display_for_person_met != "" || $display_for_person_met != null){ + echo '

      '; + //} + if ($person['photo']) { + echo ''; + } + echo '     '; + if ($person['id_proof']) { + echo ''; + } + + //echo count($person_met_data) != ($pk+1)? '
      ':''; + + + } + $faceimage_url = array(); + if (isset($pd_images['common_images']) && count($pd_images['common_images']) && $pd_master_details[0]['is_face_api_enabled'] == 1) { + foreach ($pd_images['common_images'] as $com_key => $com_value) { + if ($com_value['pd_document_title'] == 'face_api_result_image') { + // $faceimage_url = $com_value['doc_url'];break; + array_push($faceimage_url, $com_value['doc_url']); + } + } + } + if (!empty($faceimage_url)) { + for ($i = 0; $i < count($faceimage_url); $i++) { + echo '     '; + echo ''; + } + } + echo '
      '; + echo '
      '; + ?> + +
      + Face Comparison"; + $notequal_mark = '
      '; + $equal_mark = '
      =
      '; + for ($i = 0; $i < count($ci); $i++) { + $symbol = (round($ci[$i]["Similarity"]) > 50) ? '

      ' . $equal_mark . '

      ' : '

      ' . $notequal_mark . '

      '; + echo '
      +
      + ' . $si[ +
      +
      ' . $symbol . '
      +
      + ' . $ci[$i][ +
      +
      '; + + echo '

      Similarity + ' . round($ci[$i]["Similarity"]) . ' +

      +
      +
      + ' . round($ci[$i]["Similarity"]) . ' +
      +
      '; + } + // ########################### End of Percentage Bar Section ######################################### + } + } + ?> + +

      Applicants:

      + + + + + + + + + + + $individual) { + + if ($individual['is_applicant'] == true && $individual['is_active'] == true) { + + $education_qualification = $individual['qualification_master']; + $education_qualification = $individual['course_name'] != "" || $individual['course_name'] != null ? $education_qualification . '
      (' . $individual['course_name'] . ')' : $education_qualification; + + + $applicant_name = array_key_exists('pd_co_applicant_id_master', $individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find"; + //echo $applicant_name.'**************************'; + + $title = isset($individual['applicant_title_name_master']) && $individual['applicant_title_name_master'] != "" ? $individual['applicant_title_name_master'] : ''; + + //$kyc_data = ''; + $applicant_name = $title . ' ' . $applicant_name; + if ($ind_key == 0 && array_key_exists('is_kyc', $general_form) && $general_form['is_kyc'] == 'no') { + $applicant_name = 'As per the request received applicant name is ' . $applicant_name . '
      but as per KYC name is ' . $general_form['kyc_and_captur_the_name']; + //$kyc_data = "

      Name noticed as per KYC is ". $general_form['kyc_and_captur_the_name']; + } + echo '"; + } + } + + if (isset($general_form['companies']) && count($general_form['companies'])) { + $business_entity_type_master = array(1 => 'Others', 2 => 'Public Ltd Company', 3 => 'Sole proprietorship', 4 => 'HUF (Hindu Undivided Family)', 5 => 'Partnership', 6 => 'Cooperative', 7 => 'Limited Liability Partnership(LLP)', 8 => 'OPC (One Person Company)', 9 => 'Society', 10 => 'Trust', 11 => 'Private Limited Company'); + foreach ($general_form['companies'] as $comp_key => $ind_company) { + if ($ind_company['is_company_applicant'] != null) { + + echo ''; + } + } + } + ?> + +
      NameAge
      (Yrs/Mns)
      Qualification / Type of EntityRelationships
      ' . $applicant_name . '' . $individual['age'] . '' . $education_qualification . ''; + + $company_relationship_data = null; + //print_r($general_form['company_with_relationships']); + foreach ($general_form['company_with_relationships'] as $crk => $company_with_relationship) { + + //print_r($company_with_relationship); + + if ($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name'] && $company_with_relationship['company_name'] != '') { + //FInd Company Name from JSON + + //echo "ONCE"; + //echo '### '.$crk.'-ICID'.$individual['pd_co_applicant_id'].'--'.$company_with_relationship['applicant_name'].'-'.$company_with_relationship['company_name']; + $company_relationship_data .= ($company_with_relationship['company_relationship_master'] . ' ' . $company_with_relationship['company_name']); + + $company_relationship_data .= '
      and

      '; + //echo $company_relationship_data; + } + } + //echo $company_relationship_data; + // die(); + $personal_relationship_data = null; + foreach ($general_form['persons_with_relationships'] as $persons_with_relationship) { + + + + if (($individual['pd_co_applicant_id'] == $persons_with_relationship['pd_co_applicant_id'] || !strcasecmp($applicant_name, $persons_with_relationship['applicant_name'])) && isset($persons_with_relationship['relationship'])) { + + + if (isset($persons_with_relationship['relation_to_master'])) { + $RSNA = $persons_with_relationship['relation_to_master']; + if (isset($persons_with_relationship['relationship_master'])) { + $personal_relationship_data .= $persons_with_relationship['relationship_master'] . ' of ' . $RSNA; + + $personal_relationship_data .= '
      and

      '; + } + } + } + } + $company_relationship_data .= $personal_relationship_data; + echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '
      and

      '), strlen($company_relationship_data)); + + echo "
      ' . $ind_company['company_name'] . '' . $ind_company['business_years'] . (isset($ind_company['business_month']) ? ' . ' . $ind_company['business_month'] : null) . '' . ($ind_company['business_entity_type'] == 1 ? $ind_company['business_entity_type_other'] : $business_entity_type_master[$ind_company['business_entity_type']]) . ' Not Applicable
      + + + + + ' . $general_form['general_remark'] . '

      '; + } + ?> + + + + + + + 'well suited', 'fairly_suited' => 'fairly suited', 'not_suited' => 'not suited'); + //die(); + if (isset($pd_score) && count($pd_score)) { + echo '
      '; + echo '

      PD Score Summary

      '; + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Actual ScoreMax ScoreScore %
      General Section Score
      Business Section Score
      Final Remarks Score
      Final PD Score
      + +
      "; + + echo '

      '; + } + // else + // { echo "Score Chart Not Generated"; } + + + + //######################### CHART ########################### + + + // if(isset($dsc_cards['base64_dsc_business'])) + // { + // echo "

      "; + + // echo '

      '; + + // } + // else + // { + // //echo "Score Chart Not Generated"; + // } + + // if(isset($dsc_cards['base64_dsc_general'])) + // { + // echo "

      "; + + // echo '

      '; + + // } + // else + // { + // //echo "Score Chart Not Generated"; + // } + + + echo "
      "; + //######################### CHART ########################### + + $business_captions = array("no_of_years_business_run" => "Business Vintage >>", "location_suited_for_busienss" => "Business Location suitability >>", "business_seasonality" => "Seasonality >>", "employees_total" => "Employee Strength >>", "cerificates" => "Business Certifications Sighted >>", "owned_property" => "Business Premise Ownership >>", "owned_vechile" => "Vehicle Ownership >>", "business_activity_has_seen" => "Business Activity Observed >>", "minimum_supplier_info" => "Supplier Information Provided >>", "minimum_client_info" => "Client Information Provided >>", "stock_raw_material_enough" => "Raw Materials Stock Sufficiency >>", "stock_finished_goods_enough" => "Finished/Traded Stock Sufficiency >>", "vintage_of_business_account" => "Main Business Banking Account Vintage >>"); + if ($pd_master_details[0]['lender_short_name'] != 'CFPL') { + $general_captions = array("otp_done" => "OTP authentication done >>", "person_met_is_applicant" => "Is person Met, a loan applicant >>", "qualification" => "Qualification of Loan Applicants >>", "comment_locality" => "Comment on Locality >>", "pd_location_approach" => "Approach to PD location >>", "customer_behaviour" => "Customer Behaviour >>", "neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>", "was_the_company_name_board_sighted" => "Business Board Sighted >>", "value_of_other_assets" => "Asset Value by Loan Amount % >>"); + } else { + $general_captions = array("otp_done" => "OTP authentication done >>", "person_met_is_applicant" => "Is person Met, a loan applicant >>", "qualification" => "Qualification of Loan Applicants >>", "comment_locality" => "Comment on Locality >>", "pd_location_approach" => "Approach to PD location >>", "customer_behaviour" => "Customer Behaviour >>", "neibourhood_check_as_per_pd_officer" => "Neighbourhood check >>", "was_the_company_name_board_sighted" => "Business Board Sighted >>"); + } + + + + + echo ''; + echo ''; + + echo ''; + foreach ($pd_score['business'] as $bsk => $business_score) { + + $class = null; + $answer = null; + $per = $business_score['attributed_score'] > 0 && $business_score['max_score'] > 0 ? (($business_score['attributed_score'] / $business_score['max_score']) * 100) : 0; + + $class = ($per >= 80 ? 'rcorners_green' : ($per >= 65 && $per < 80 ? 'rcorners_light_green' : ($per >= 50 && $per < 65 ? 'rcorners_amber' : 'rcorners_red'))); + + // if($bsk == 'business_seasonality') + // { + // echo "BUSINESS"; + // echo $per; + // echo $class; + // echo $per >= 80 ? 'rcorners_green' : 'SOME'; + // die(); + // } + + if ($bsk == 'location_suited_for_busienss') { + $answer = $address_type_remarks_caption[$business_score['answer']]; + } else if ($bsk == 'cerificates') { + $answer = $per > 0 ? 'Yes' : 'No'; + } else if ($bsk == 'no_of_years_business_run') { + $answer = isset($business_score['answer']) ? $business_score['answer'] . ' Yrs' : ''; + } else if ($bsk == 'business_seasonality') { + $answer = isset($business_score['answer']) ? ((!strcasecmp($business_score['answer'], 'yes')) ? 'Seasonal' : 'Not Seasonal') : ''; + } else if ($bsk == 'vintage_of_business_account') { + $answer = isset($business_score['answer']) && $business_score['answer'] != '' ? $business_score['answer'] : 'No'; + } else { + $answer = isset($business_score['answer']) ? $business_score['answer'] : ''; + } + + if (strcasecmp($answer, 'Not Applicable')) { + echo ''; + } + } + echo ''; + echo '
      Business Related Parameters Impacting Score Response
      ' . $business_captions[$bsk] . ' ' . '
      ' . ucfirst($answer) . '
      '; + echo '


      '; + + echo ''; + echo ''; + + echo ''; + foreach ($pd_score['general'] as $gsk => $general_score) { + $class = null; + $per = $general_score['attributed_score'] > 0 && $general_score['max_score'] > 0 ? (($general_score['attributed_score'] / $general_score['max_score']) * 100) : 0; + + $class = ($per >= 80 ? 'rcorners_green' : ($per >= 65 && $per < 80 ? 'rcorners_light_green' : ($per >= 50 && $per < 65 ? 'rcorners_amber' : 'rcorners_red'))); + + $answer = ucfirst($general_score['answer']); + + if ($gsk == 'value_of_other_assets') { + //print_r($general_score);die(); + $answer = round((($answer / $loan_form['loan_amount']) * 100), 2) . ' %'; + } + + if (strcasecmp($answer, 'Not Applicable')) { + echo ''; + } + } + echo ''; + echo '
      Other Parameters Impacting ScoreResponse
      ' . $general_captions[$gsk] . ' ' . '
      ' . $answer . '
      '; + + + // + } //end of is score card enabled for this pd + + ?> + + $address_image_value) { + if ($address_image_value['is_show_report'] == 1) { + $pd_location_approach_img_url = isset($address_image_value['doc_url']) ? $address_image_value['doc_url'] : ''; + //$pd_location_approach_img_location = $address_image_value['location']; + //$pd_location_approach_img_date = date('Y/m/d h:s:i A',$address_image_value['createdon']); + break; + } + } + + $name_board_seen_img_url = ''; + if (isset($pd_processed_forms[13][0])) { + + $first_business_form = json_decode($pd_processed_forms[13][0]['processed_json'], true); + //if($first_business_form['was_the_company_name_board_sighted']=='yes') + //{ + //echo 'YES';die(); + foreach ($pd_images[13] as $image_key => $image_value) { + if ($image_value['pd_document_title'] == 'Name Board Seen') { + + $name_board_seen_img_url = $image_value['doc_url']; + break; + } + } + //} + } + + //echo $name_board_seen_img_url;die(); + //print_r($address_images);die(); + ?> +
      +

      BUSINESS LOCATION

      + +

      Address at which PD was initiated: ' . $pd_address['address'] . ', ' . $pd_address['city_master'] . ', ' . $pd_address['state_master'] . ' - ' . $pincode . '.'; + + echo '
      Address at which PD Visit actually done: ' . $pd_alternative_address['alternative_address'] . ', ' . $pd_alternative_address['city_master'] . ', ' . $pd_alternative_address['state_master'] . ' - ' . $alter_native_pincode . '.'; + + echo '
      Reason for change in PD address:' . $pd_alternative_address['reason_for_alternative_address']; + } else { + + echo 'Business Address : ' . $pd_address['address'] . ', ' . $pd_address['city_master'] . ', ' . $pd_address['state_master'] . ' - ' . $pincode . '.'; + } + + echo '

      GPS Coordinates of Business Address : '; + echo isset($pd_master_details[0]['start_location']) ? $pd_master_details[0]['start_location'] : 'Not Available'; + echo '

      '; + ?> + $com_value) { + if ($com_value['pd_document_title'] == 'satellite') { + $satellite_url = $com_value['doc_url']; + break; + } + } + } + + ?> +  Satellite Image of location of Where PD was Done


      + + + + + + + + + + + + +
      Name Board of Business/Entrance
      + Name Board +
      + +

      +
      +

      Location Summary

      + '; + echo 'The PD was telephonically done with the ' . strtolower($loan_word) . ' applicant(s) at ' . $address_type . 'Address Form - Type of Address . '; + echo 'The ' . $address_type . 'Address Form - Type of Address is ' . $property_owner_type . 'Business Assest Form - Owner of the Property and the business has been in operation from here for the last ' . $yrs_being_run . 'Business Assest Form - Business running Yrs in this premise .'; + echo '

      The ' . $address_type . 'Address Form - Type of Address is located in ' . $locality . 'Address Form - Locality of Address ' . ($estimated_area != 0 ? 'and the estimated area of the ' . $address_type . 'Address Form - Type of Address is ' . $estimated_area . 'Address Form - Estimated Area .' : ''); + // echo '

      The PD location was '. $pd_address['pd_location_master'].'Address Form - Approach to PD location . ' . 'As Per PD Officer, the '.$address_type .'Address Form - Type of Address is situated in '.$comment_locality_master .'Address Form - Comment on locality Locality.'; + // echo '

      The PD officer also made the following observations:' ; + echo '
      '; + + // echo '
    • The location of the '.$address_type.'Address Form - Type of Address is '.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].'Final Remarks Form - The location of the busienss suitability for Business to the nature of business.
    • '; + + if ($first_business_form['was_the_company_name_board_sighted'] == 'yes') { + echo '

      The business name board photograph was shared by applicant.Business Form'; + } else { + echo '

      The business name board photograph was not shared by applicant.Business Form'; + } + + if ($address_form['address_proof_provided'] == 'yes') { + echo ' The address proof was shared by applicant.Business Form'; + } else { + echo ' The address proof was not shared by applicant.Business Form'; + } + echo '

      '; + + + // if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes') + // { + // echo '
    • Business Activity was seen during visit.Business Assest Form - Busienss activity seen during PD visit
    • '; + // } + // else{ + // echo '
    • No business activity was seen during the PD visit.Business Assest Form - Busienss activity seen during PD visit
    • '; + // } + // if(isset($business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark']) && $business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] != ""){ + // echo '
    • '.$business_assets_details['business_assets_for_address'][0]['business_pd_visited_remark'] .'Business Assest Form - Busienss Assest Form Remarks
    • ';} + + if (isset($final_remark_data['is_competition'])) { + if ($final_remark_data['is_competition'] == 'yes') { + echo '
    • ' . $final_remark_data['appx_outlet_or_stores'] . ' Units with similar business were sighted in the locality
    • '; + } else { + echo '
    • PD officer did not observe any similar business units in the locality.
    • '; + } + } + if (isset($final_remark_data['demolition_activity'])) { + if ($final_remark_data['demolition_activity'] == 'yes') { + echo '
    • ' . $final_remark_data['comment_of_demolition_activity'] . '
    • '; + echo '
      Demolition Image Not Available'; + } else { + echo '
    • No demolition activity was observed in the locality.
    • '; + } + } + + + if (isset($final_remark_data['sealing_activity'])) { + if ($final_remark_data['sealing_activity'] == 'yes') { + echo '
    • ' . $final_remark_data['comment_of_sealing_activity'] . '
    • '; + echo '
      Demolition Image Not Available'; + } else { + echo '
    • No sealing activity was observed in the locality.
    • '; + } + } + + if (isset($final_remark_data['outlet_location'])) { + if ($final_remark_data['outlet_location'] == 'heavy_footfall') { + echo '
    • Heavy Footfall ( Lots of customer in the locality / market place )
    • '; + } else if ($final_remark_data['outlet_location'] == 'medium_footfall') { + echo '
    • Medium Footfall ( Meduim no of customer in the locality / market place )
    • '; + } else if ($final_remark_data['outlet_location'] == 'low_footfall') { + echo '
    • LOw Footfall ( Few customer in the locality / market place )
    • '; + } + } + + echo "
    "; + + if ($address_form['address_form_remark']) { + echo '' . $address_form['address_form_remark'] . 'Address Form - Address Form Remarks '; + } + echo "

    "; + // echo "
    "; + //die(); + // + ?> + + + + + + +

    DETAILS:

    + The following loan related information was provided by applicant.'; + + $is_current_product_bl = $pd_master_details[0]['prod_catagory'] == "BL" ? true : false; + $is_current_product_lab = $pd_master_details[0]['prod_catagory'] == "LAP" ? true : false; + $is_current_product_laep = $pd_master_details[0]['prod_catagory'] == "LAEP" ? true : false; + // echo $pd_master_details[0]['product_abbr']; + // echo '-bl-'. $is_current_product_bl; + // echo '-lap-'.$is_current_product_lab; + // die(); + $loan_table_dispaly_rows = array(); + + $loan_table_dispaly_rows[] = array('particulars' => ('Total ' . $loan_word . ' Amount applied for'), 'details' => "" . " " . $loan_amount . ' (' . MYUTIL::numtowords($loan_form['loan_amount']) . ')'); + if ($is_current_product_bl || $is_current_product_laep) { + $to_dispaly = !strcasecmp($loan_form['is_there_total_fund'], 'yes disclose') ? ('Disclosed ' . "" . " " . MYUTIL::customIndianNumberFormat($loan_form['fund_amt']) . ' (' . MYUTIL::numtowords($loan_form['fund_amt']) . ')') : 'Not Disclosed'; + $loan_table_dispaly_rows[] = array('particulars' => 'Total Fund Requirement', 'details' => $to_dispaly); + } + $loan_table_dispaly_rows[] = array('particulars' => ($loan_word . ' Tenure expected'), 'details' => $loan_form['loan_tenure'] != "" ? $loan_form['loan_tenure'] . ' Months' : 'Not provided'); + + $end_use = ''; + $to_remove_for = false; + foreach ($loan_form['end_use_master'] as $enduse) { + if (strpos(strval($enduse), 'Others') === false) { + $end_use .= $enduse . ' and '; + } else { + + $to_remove_for = true; + $end_use .= $loan_form['end_use_other'] . ' and'; + } + } + $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'), strlen($end_use)); + //echo substr($end_use,0,3); + + + if (strcasecmp(substr($end_use, 0, 3), 'for')) { + if (!(count($loan_form['end_use_master']) == 1 && $to_remove_for)) { + $end_use = 'For ' . $end_use; + } + } + + $loan_table_dispaly_rows[] = array('particulars' => ($loan_word . ' Purpose'), 'details' => $end_use); + + if (strcasecmp($loan_form['is_transfer'], 'no')) { + + $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer Amount', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['balance_transfer_amount']) . ' (' . MYUTIL::numtowords($loan_form['balance_transfer_amount']) . ')'); + + $loan_table_dispaly_rows[] = array('particulars' => 'Top Up Amount applied for', 'details' => "" . " " . MYUTIL::customIndianNumberFormat($loan_form['topup_amount']) . ($loan_form['topup_amount'] ? (' (' . MYUTIL::numtowords($loan_form['topup_amount']) . ')') : '')); + + if ($loan_form['end_use_topup_master']) { + $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'] == 1 ? $loan_form['other_bt_lender'] : $loan_form['lender_master']); + } else { + //echo 'sdn-'.((!$is_current_product_bl) && !$is_current_product_lab); die(); + if ((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep) { + $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution', 'details' => is_numeric($loan_form['own_contribution']) && $loan_form['own_contribution'] != 0 ? ("" . " " . MYUTIL::customIndianNumberFormat($loan_form['own_contribution']) . ' (' . MYUTIL::numtowords($loan_form['own_contribution']) . ')') : 'Not Provided'); + $source_of_own_contribution = ''; + + foreach ($loan_form['source_of_own_contribution_master'] as $own_source) { + + if (!strcasecmp($own_source, 'others')) { + $source_of_own_contribution .= $loan_form['other_source'] . ' and '; + } else { + $source_of_own_contribution .= $own_source . ' and '; + } + } + + $source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '), strlen($source_of_own_contribution)); + + $loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution', 'details' => $source_of_own_contribution); + } + } + if (!($pd_master_details[0]['lender_short_name'] == 'UDAAN' || $pd_master_details[0]['lender_short_name'] == 'CFPL')) { + $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying', 'details' => is_numeric($loan_form['emi_level']) && $loan_form['emi_level'] != 0 ? ($rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emi_level']) . ' (' . MYUTIL::numtowords($loan_form['emi_level']) . ')') : "Not Provided"); + } + + if (!$is_current_product_bl && !$is_current_product_laep) { + + 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']); + + //print_r($loan_form);die(); + $owners_list = null; + foreach ($loan_form['owners_list_master'] as $owner) { + $owners_list .= $owner . ' and '; + } + ///echo $owners_list; + $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'), strlen($owners_list)); + if ($owners_list == '') { + if (isset($loan_form['owner_name_group'][0]['owner_name'])) { + $owners_list = $loan_form['owner_name_group'][0]['owner_name']['name']; + } + } + $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' => ($loan_form['emv_per_customer'] != "" ? $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']) . ' (' . MYUTIL::numtowords($loan_form['emv_per_customer']) . ')' : 'Not Provided')); + } + } + + if (isset($loan_form['property_seller']) && $loan_form['property_seller'] != '') { + $loan_table_dispaly_rows[] = array('particulars' => 'Current Owner/Seller of the property', 'details' => $loan_form['property_seller']); + } + + if (isset($loan_form['address']) && $loan_form['address'] != '') { + $address_of_owner_seller_property = $loan_form['address'] . (isset($loan_form['city_master']) ? ', ' . $loan_form['city_master'] : '') . (isset($loan_form['state_master']) ? ', ' . $loan_form['state_master'] : '') . (isset($loan_form['pincode_master']) ? ', ' . $loan_form['pincode_master'] : ''); + + $loan_table_dispaly_rows[] = array('particulars' => 'Address of the property', 'details' => $address_of_owner_seller_property); + } + //print_r($loan_table_dispaly_rows); + if ($pd_master_details[0]['lender_short_name'] != 'CFPL') { + ?> +

    + + + + + + + + $row) { + echo '"; + } + ?> + +
    S.No Particulars Particular Details
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    + +
    +

    Anchor Details Section:

    + + + + + + + + $row) { + echo '"; + } + ?> + +
    S.No Particulars Particular Details
    ' . ($row_key + 1) . " " . $row['particulars'] . " " . $row['details'] . "
    +
    " . $loan_form['loandetails_remarks']; + ?> + + + + + + 0) { + for ($business_count = 0; $business_count < $total_no_of_business; $business_count++) { + + if ($general_form['companies'][$business_count]['is_active'] == true) { // $temp_show = null; + // if($temp_show == null) + // { + ?> + + .'; + } + $bindEachResult['company_employees'] = ''; + + + // this is for no of employees details + if (isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) { + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent'; + } else { + $bindEachResult['company_employees'] = 'As per loan applicant, 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 { + + $bindEachResult['company_employees'] .= ' and no temporary employees with company.'; + } + + if (($businessRow['employees_permanent'] != "" && $businessRow['employees_permanent'] == 0) && ($businessRow['employees_temporary'] != "" && $businessRow['employees_temporary'] == 0)) { + + $bindEachResult['company_employees'] = 'As per loan applicant, there are no permanent or temporary employees with the company.'; + } + + if (isset($businessRow['employees_appx_salary']) && $businessRow['employees_appx_salary'] != "") { + $bindEachResult['employees_appx_salary'] = 'Approximately ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($businessRow['employees_appx_salary']) . ' is being paid as salary to employees'; + } + if (isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0) { + $emp = $businessRow['officer_total'] > 1 ? 'employees' : 'employee'; + $bindEachResult['officer_visit_company_employees'] = 'At the time of PD visit, the officer sighted ' . $businessRow['officer_total'] . ' ' . $emp . ' at the business premises.'; + } else { + + $bindEachResult['officer_visit_company_employees'] = ''; + //$bindEachResult['officer_visit_company_employees']='At the time of PD visit, no employees seen at the business premises.'; + } + //this is documents visited + $getDocuments = array(); + if (array_key_exists('shop_eat_act_cert', $businessRow) && strtoupper($businessRow['shop_eat_act_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Shop/Est act Certificate.', 'img' => isset($businessRow['shop_eat_act_cert_pic']) ? $businessRow['shop_eat_act_cert_pic'] : '', 'key_name' => 'shop_eat_act_cert_pic')); + } + if (array_key_exists('gst_Regn_cert', $businessRow) && strtoupper($businessRow['gst_Regn_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'GST Registration.', 'img' => isset($businessRow['gst_Regn_cert_pic']) ? $businessRow['gst_Regn_cert_pic'] : '', 'key_name' => 'gst_Regn_cert_pic')); + } + if (array_key_exists('pf_regn', $businessRow) && strtoupper($businessRow['pf_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'PF Registration.', 'img' => isset($businessRow['pf_regn_pic']) ? $businessRow['pf_regn_pic'] : '', 'key_name' => 'pf_regn_pic')); + } + if (array_key_exists('esic_regn', $businessRow) && strtoupper($businessRow['esic_regn']) == 'YES') { + array_push($getDocuments, array('name' => 'ESIC Registration.', 'img' => isset($businessRow['esic_regn_pic']) ? $businessRow['esic_regn_pic'] : '', 'key_name' => 'esic_regn_pic')); + } + if (array_key_exists('export_import_cert', $businessRow) && strtoupper($businessRow['export_import_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Export/Import Certificate.', 'img' => isset($businessRow['export_import_cert_pic']) ? $businessRow['export_import_cert_pic'] : '', 'key_name' => 'export_import_cert_pic')); + } + if (array_key_exists('factory_cert', $businessRow) && strtoupper($businessRow['factory_cert']) == 'YES') { + array_push($getDocuments, array('name' => 'Factory Certificate.', 'img' => isset($businessRow['factory_cert_pic']) ? $businessRow['factory_cert_pic'] : '', 'key_name' => 'factory_cert_pic')); + } + if (array_key_exists('eb_bill', $businessRow) && strtoupper($businessRow['eb_bill']) == 'YES') { + array_push($getDocuments, array('name' => 'Electric Bill.', 'img' => isset($businessRow['eb_bill_pic']) ? $businessRow['eb_bill_pic'] : '', 'key_name' => 'eb_bill_pic')); + } + if (strtoupper($businessRow['other_documents']) == 'YES' && array_key_exists('documents', $businessRow)) { + foreach ($businessRow['documents'] as $docValue) { + array_push($getDocuments, array('name' => $docValue['document'], 'img' => isset($docValue['document_pic']) ? $docValue['document_pic'] : '', 'key_name' => $docValue['document'])); + } + } + + //print_r($getDocuments); + if (count($getDocuments)) { + foreach ($getDocuments as $getDocument_key => $getDocument_value) { + foreach ($pd_images[13] as $img_key => $img_value) { + if (!strcasecmp($getDocument_value['key_name'], $img_value['pd_document_title'])) { + $getDocuments[$getDocument_key]['img'] = $img_value['doc_url']; + break; + } + } + } + } + //print_r($getDocuments);die(); + $bindEachResult['visit_documents'] = $getDocuments; + array_push($businessResult, $bindEachResult); + + + + ?> +

    BUSINESS INFORMATION:

    + $fetchRow) { + //print_r($fetchRow['company_details']);die(); + ?> + +

    +

    +

    + +
    Date of Incorporation :
    + +
    Business Vintage : +

    + + +
    +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NameShare HoldingNo.of Years in Current BusinessTotal Work Experience(Yrs)Previous ExperienceStarted Business
    + + + 0) { ?> +
    +

    Other Family Members involved in business :

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NameIndividual RelationshipRelated toRelationship to Company / FirmStarted Business (Yes / No)
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    ' . $process_brief['description'] . '

    '; ?>
    + + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    ServicesArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + + 0) { ?> + +

    Key Products and Area of Operations

    + + + + + + + + + + + + + + + + + + + + + + +
    Key ProductsArea of OperationsArea of Sale / ServiceArea where Max Sale / Service done
    +
    + +
    + + +
    + + +



    +

    Brief of the Business / Service Model

    + + + + + + + + + + + + + + + + +
    Product / ServiceProcess Brief
    + + + + + + 0) { ?> + + +
    + + + + + + + + + + + + + + + +
    Other Business Activity
    +
    ' . $fetchRow['total_per_of_export'] . ' % of total sales is export.
    '; + } + + ?> + + + + + Loan applicant is using Mobile Wallets/UPI for business transactions.

    '; + } //else + //{ + // echo '

    As per person`s met,applicant using Mobile Wallets/UPI for business transactions.

    ' + //} + if (!strcasecmp($fetchRow['applicant_use_pos_machines'], 'yes')) { + echo '

    The applicant has the following POS machines:

    '; + echo ''; + echo ''; + foreach ($fetchRow['pos_machines_details'] as $pos) { + echo ''; + } + echo '
    Name of the Financial Insitution TID Number of POS machine
    ' . ($pos['pos_machines_financial_institution_name'] ? $pos['pos_machines_financial_institution_name'] : 'Not Provided') . ' ' . $pos['tid_no_of_pos_machine'] . '
    '; + } + + + + ?> + + + + + + + + + + + +
    +

    +
    + + + + +

    +

    +

    + + + + +

    The below document images were shared :

    + + + + '; + for ($doc = $from; $doc <= $to; $doc++) { + if (isset($visit_documents[$doc])) { + ?> + + '; + $from_index_increment = $from_index_increment + 2; + } ?> + +
    + +
    + + + + ' . $business_form_common_remarks . '

    '; + } + + ?> + + + + + + + +
    + + + + + + 0 && $is_business_asset_available) { + $bindBusinessAsset['details'] = ASSETSFORM::getBusinessAssetsDetails($businessAssetRow['business_assets_details'], $pd_master_details[0]['pd_id']); + } + array_push($businessAssetResult, $bindBusinessAsset); + + + //print_r($businessAssetResult);die(); + ?> + + + + +
    +
    +
    +

    Assets used in Business

    + $iterateAsset) { ?> +

    + + $value) { + echo ''; + echo ''; + echo $value['header_row']; ?> + +'; + echo '
    '; + echo '
    '; + } + } + } + } 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 +?> + + + + + + +
    +↑ /'; + + if (isset($pd_processed_forms[14][$business_count])) { + $baRow = $pd_processed_forms[14][$business_count]; + $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 (isset($businessFinancialRow['kuccha_records_shown'])) { + $financial_kuccha_info['kuccha_records_shown'] = $businessFinancialRow['kuccha_records_shown']; + $financial_kuccha_info['kuccha_bill_allowed'] = $businessFinancialRow['kuccha_bill_allowed']; + $financial_kuccha_info['customer_declared_turnover'] = $businessFinancialRow['customer_declared_turnover']; + } + + //only for Indusind Lender + if (isset($businessFinancialRow['tot_business_FY'])) { + $current_business_info['tot_business_FY'] = $businessFinancialRow['tot_business_FY']; + $current_business_info['remarks_tot_business_FY'] = $businessFinancialRow['remarks_tot_business_FY']; + $current_business_info['orders_hand_FY'] = $businessFinancialRow['orders_hand_FY']; + } + + //print_r($financial_kuccha_info);die(); + if (strtoupper($businessFinancialRow['is_financial_statements']) == 'YES' && count($businessFinancialRow['date_per_financial']) > 0) { + $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["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"] = ""; + //$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) { + + $bindBusinessFinancial["financial_customer"] = ""; + //$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 { + + + $bindBusinessFinancial["financial_customer"] = "As per Loan Applicant(s), the actual turnover and net profit of his business is same as disclosed in financial statements."; + $bindBusinessFinancial['customer_statements'] = array(); + $bindBusinessFinancial['customer_statements_header'] = array(); + $bindBusinessFinancial['is_customer_statement'] = 0; + } + + + // ############### this section only for CLIX HOUSING FINANCE LENDER + if (isset($businessFinancialRow['is_turnover_validated']) && strtoupper($businessFinancialRow['is_turnover_validated']) == 'YES') { + $bindBusinessFinancial['turnover_statements'] = FINANCIALFORM::getBusinessCustomerFinancialDetails($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['customer_statements_header'] = FINANCIALFORM::getBusinessCustomerHeader($businessFinancialRow['turnover_values']); + $bindBusinessFinancial['how_turnover_validated'] = (!strcasecmp(strtolower($businessFinancialRow['how_turnover_validated']), 'others')) ? 'Validated from ' . $businessFinancialRow['turnover_validated_others'] : $businessFinancialRow['how_turnover_validated']; + $bindBusinessFinancial['is_turnover_validated'] = 1; + } + // ############### this section only for CLIX HOUSING FINANCE LENDER + $bindBusinessFinancial['working_capital_receive'] = $businessFinancialRow['receive_the_money_in_days']; + $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days']; + $bindBusinessFinancial['working_capital_unsold_stock'] = is_numeric($businessFinancialRow['unsold_stock_lies_in_days']) ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; + $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; + if (isset($businessFinancialRow['select_working_capital_facilities_availed'])) { + foreach ($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v) { + switch ($v['id']) { + case 1: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['name'] = $businessFinancialRow['other_reason_for_working_capital_facilities_availed']; + + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['reason_for_working_capital_facilities_availed']; + break; + + case 2: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['bank_guarantee']; + break; + + case 3: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['cash_credit_limit']; + break; + + case 4: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 5: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['factoring']; + break; + case 6: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['letter_of_credit']; + break; + case 7: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit']; + break; + case 8: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name']; + break; + case 9: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount']; + break; + case 10: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type']; + break; + case 11: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor']; + break; + case 12: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date']; + break; + case 13: + $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi']; + break; + } + } + } + + $bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null; + + $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']); + if ($pd_master_details[0]['lender_short_name'] == 'CFPL') { + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year", 'details' => isset($businessFinancialRow['turnover_lastcomplete_year']) ? $businessFinancialRow['turnover_lastcomplete_year'] : null); + $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)", 'details' => isset($businessFinancialRow['ytd_turnover']) ? $businessFinancialRow['ytd_turnover'] : null); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null ); + // $bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null ); + } + array_push($businessFinancialResult, $bindBusinessFinancial); + +?> + + 0) { + + ?> + +

    Financial Information

    + 0) { + ?> +

    Company / Firm Name : " . $iterateFinance['company_name']; ?>

    +

    No of Years of Financial Statements provided : " . $iterateFinance['years_data_provided']; ?>

    +

    Snapshot of Financials as per Books of Account Provided : "; ?>

    + + + + + + " . "FY " . $bfRow['financial_year'] . ""; + } ?> + + + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']) . ''; + } ?> + + + + ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']) . ''; + } else { + echo ''; + } + } ?> + + + + ' . $bfRow['financial_margin_of_profit'] . ' %'; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } ?> + + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + + + + = 0 ? '' : ''; + } else { + echo ''; + } + } ?> + + +
    Particulars
    Sales / Revenue (Rs)
    Net Profit / (Net Loss) (Rs) (' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']) . ')
    Net Profit or (Net Loss) to Sales % (' . $bfRow['financial_margin_of_loss'] . ' %)
    % () in Sales over PY' . $bfRow['sale_variation'] . ' %(' . $bfRow['sale_variation'] . ' %)NA
    % () in Net Profit over PY' . $bfRow['profit_variation'] . ' %(' . $bfRow['profit_variation'] . ')NA
    % () in Net Profit % over PY' . $bfRow['financial_profit_to_sale_variation'] . ' %(' . $bfRow['financial_profit_to_sale_variation'] . ' %)NA
    +

    ' . $comments_on_financials . '

    '; + } + } + //else{ echo "

    Financial statements not provided by Loan Applicants to PD officer.

    ";} + ?> + + + +

    + 0) { + //print_r($iterateFinance['customer_statements']); + + ?> + + + +

    As per Applicant(s), the Financials are as below:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    As per Loan Applicant(s), the Financials are as below:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + + As per Loan Applicant(s) met,' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($iterateFinance['estimate_posmachine_or_cc_annual_sales']) . ' as Annual sales through credit cards / POS machines.

    '; + }; + } ?> + As per Loan Applicant(s) met, the financials figures were not provided.

    "; } + + // ####################### THIS SECTION ONLY FOR CLIX HOUSING FINANCE LENDER ##########################--> + + if (isset($iterateFinance['turnover_statements'])) { + foreach ($iterateFinance['turnover_statements'] as $turnover) { + if (!strcasecmp($turnover['estimate_net_margin_availablity'], 'yes')) { + ?> +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales %>
    Net Profit / (Net Loss) (Rs) >>>>>
    + + +

    Turnover Validated During PD:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParticularsRange providedFinal Considered
    FromTo
    Sales / Revenue (Rs)
    Net Profit or (Net Loss) to Sales (Rs) >
    Net Profit / (Net Loss)% >>>> >
    + Turnover and Netprofit was ' . $iterateFinance['how_turnover_validated']; + } + ?> + + + + + + Validation of Customer Declared Financials :

    '; + // echo 'Kuccha Record Seen (Yes/No) : ';echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : 'No Kuccha Records made available to PD officer and therefore validation of customer declared financials was not possible.'; + if ($financial_kuccha_info['kuccha_records_shown'] == 'yes') { + echo '

    Validation of Customer Declared Financials :

    '; + echo 'Kuccha Record Seen (Yes/No) : '; + echo $financial_kuccha_info['kuccha_records_shown'] == 'yes' ? 'Yes' : ''; + echo '

    Photograph of Kuchha Bills Shared (Yes/No) : ' . ($financial_kuccha_info['kuccha_bill_allowed'] == 'yes' ? 'Yes, enclosed with report' : 'No'); + + // echo '

    Number of Kuccha Bills and Values therein, justifies the customer declared turnover (Yes / No): '. ( $financial_kuccha_info['customer_declared_turnover'] == 'yes' ? 'Yes': 'No'); + } + } + + //only for Indusind Lender + if (count($current_business_info)) { + echo '

    Current Business :

    '; + echo 'Approximate Total Business / Sales Done for Current FY as on date is ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($current_business_info['tot_business_FY']); + echo $current_business_info['remarks_tot_business_FY'] != "" ? ' ( ' . $current_business_info['remarks_tot_business_FY'] . ' ) ' : ''; + echo '
    Orders in Hand to be executed in Current FY : ' . $current_business_info['orders_hand_FY']; + } + ?> + + + + + + + + + + + + $facility) { + echo ''; + } ?> + +
    S.NoParticularsDetails
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    S.NoParticularsDays
    1Debtor Days
    2Creditor Days
    3Stock Days
    + + + +

    + + + + + + + + + + + $facility) { + + echo ''; + } ?> + +
    S.NoFacility TypeFacility Details
    ' . (++$fk) . '' . $facility['name'] . ' ' . $facility['details'] . '
    + The Loan Applicants have not availed any " . $business_fin_sub_title2 . " from any financial institution.

    "; + } + } + ?> + + ' . $financial_remarks . '

    '; + } + } else { ?> +

    Financial information is not available.

    + + + + + + 0) { + $getEachValues['is_od_cc'] = null; + foreach ($businessBankRow['banking_details'] as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $getEachValues['is_od_cc'] = true; + } + } + $getEachValues['bankDetails'] = BANKINGFORM::getBusinessBankingDetails($businessBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getEachValues); + } + } + + ?> + + Business Banking:'; + if ($is_business_banking_available != null) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant(s), Applicant does not have any business account.

    '; + } + + if ($business_banking_common_remarks != "") { + echo '

    ' . $business_banking_common_remarks . '

    '; + } + } // end of busienss bankDetails available in this currrent index + ?> + + + + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $newBankingResult = array_merge($newBankingResult, $getBuinessEachValues); + } + } + // if(isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) + // { + // if(count($individualBankRow['banking_details'])>0){ + // $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'],$pd_master_details[0]['pd_id']); + // $newBankingResult = array_merge($newBankingResult,$getIndividualEachValues); + // } + // } + } + foreach ($newBankingResult as $bd) { + if ($bd['account_type'] == 4 || $bd['account_type'] == 3) { + $is_od_cc = true; + } + } + if (count($newBankingResult) > 0) { + $filteredBankingResult = array(); + $b = 0; + for ($a = 0; $a <= count($newBankingResult); $a++) { + if ($newBankingResult[$a]['account_name'] == $fetchRow['company_details']['company_name'] && $newBankingResult[$a]['str_flag'] == "buiness-company") { + $filteredBankingResult[$b] = $newBankingResult[$a]; + $b++; + } + } + } //forloop ends here. + ?> + Business Banking:'; + if (count($filteredBankingResult) > 0) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business A/c
    + As per loan applicant, he does not have any business account.

    '; + } + } + ?> + + + 1Product / Service '; + $client_second_row = '2Contact Person '; + $client_third_row = '3Mobile Number '; + $client_fourth_row = '4Landline No'; + $client_fifth_row = '5Payment Terms'; + $client_sixth_row = '6Payment Mode'; + $client_seventh_row = '7No of Days Credit'; + + + // this is for manufacturing + if (array_key_exists('manufacturing_details', $clientRow)) { + + $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] ? $done_on_credit['manufacturing prodcuts'] = $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['manufacturing_details'] as $manuRow) { + + if (isset($manuRow['main_raw_materials'])) { + + //$to_no_of_clients += count($manuRow['main_raw_materials']); + + foreach ($manuRow['main_raw_materials'] as $main_raw_material_key => $main_raw_material) { + + if ($main_raw_material['manufacturing_product_name'] != "" || $main_raw_material['manufacturing_product_name'] != null) { + $to_no_of_clients++; + } + //print_r($main_raw_material); + $client_first_row .= '' . $main_raw_material['manufacturing_product_name'] . ''; + + $client_second_row .= isset($main_raw_material['person_title_name_master']) ? '' . $main_raw_material['person_title_name_master'] . ' ' : ''; + $client_second_row .= $main_raw_material['manufacturing_contact_person_name']; + + $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'] != 1 ? $main_raw_material['person_designation_master'] : ''; + + $client_second_row .= ' ' . $main_raw_material['manufacturing_client_name'] . ''; + + $client_third_row .= '' . ($main_raw_material['manufacturing_contact_person_mobile_number'] ? $main_raw_material['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $main_raw_material['person_stdcode'] && $main_raw_material['person_landline'] ? '' . $main_raw_material['person_stdcode'] . ' ' . $main_raw_material['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($main_raw_material['manufacturing_payment_type_master']) && $main_raw_material['manufacturing_payment_type_master'] ? '' . $main_raw_material['manufacturing_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $main_raw_material['manufacturing_payment_mode'] ? '' . $main_raw_material['manufacturing_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? '' . $main_raw_material['manufacturing_credit_days_from'] . ' to ' . $main_raw_material['manufacturing_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + + // this is for trading + if (array_key_exists('trade_details', $clientRow)) { + $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] ? $done_on_credit['trading products'] = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] : ''; + foreach ($clientRow['trade_details'] as $tradeRow) { + + if (isset($tradeRow['trading_products'])) { + + //$to_no_of_clients += count($tradeRow['trading_products']); + + foreach ($tradeRow['trading_products'] as $trading_product_key => $trading_product) { + + if ($trading_product['trade_product_name'] != "" || $trading_product['trade_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $trading_product['trade_product_name'] . ''; + + $client_second_row .= isset($trading_product['person_title_name_master']) ? '' . $trading_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $trading_product['trade_product_contact_person_name']; + + $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'] != 1 ? $trading_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $trading_product['trade_client_name'] . ''; + + $client_third_row .= '' . ($trading_product['trade_product_contact_person_mobile_number'] ? $trading_product['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? '' . $trading_product['person_stdcode'] . ' ' . $trading_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= isset($trading_product['trade_product_payment_type_master']) ? '' . $trading_product['trade_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $trading_product['trade_product_payment_mode'] ? '' . $trading_product['trade_product_payment_mode'] . '' : 'NA';; + + $client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to'] ? '' . $trading_product['trade_product_credit_days_from'] . ' to ' . $trading_product['trade_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + + //this is for service + if (array_key_exists('service_provider_details', $clientRow)) { + + $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] ? $done_on_credit['service providing'] = $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] : ''; + + foreach ($clientRow['service_provider_details'] as $serviceRow) { + + if (isset($serviceRow['service_products'])) { + + //$to_no_of_clients += count($serviceRow['service_products']); + foreach ($serviceRow['service_products'] as $service_product_key => $service_product) { + + if ($service_product['service_provider_product_name'] != "" || $service_product['service_provider_product_name'] != null) { + $to_no_of_clients++; + } + $client_first_row .= '' . $service_product['service_provider_product_name'] . ''; + + $client_second_row .= isset($service_product['person_title_name_master']) ? '' . $service_product['person_title_name_master'] . ' ' : ''; + $client_second_row .= $service_product['service_provider_product_contact_person_name']; + + $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'] != 1 ? $service_product['person_designation_master'] : ''; + + $client_second_row .= ' ' . $service_product['service_provider_client_name'] . ''; + + $client_third_row .= '' . ($service_product['service_provider_product_contact_person_mobile_number'] ? $service_product['service_provider_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $client_fourth_row .= $service_product['person_stdcode'] && $service_product['person_landline'] ? '' . $service_product['person_stdcode'] . ' ' . $service_product['person_landline'] . '' : '' . 'Not Provided' . ''; + + $client_fifth_row .= $service_product['service_provider_product_payment_type_master'] ? '' . $service_product['service_provider_product_payment_type_master'] . '' : 'NA'; + + $client_sixth_row .= $service_product['service_provider_product_payment_mode'] ? '' . $service_product['service_provider_product_payment_mode'] . '' : 'NA'; + + $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to'] ? '' . $service_product['service_provider_product_credit_days_from'] . ' to ' . $service_product['service_provider_product_credit_days_to'] . ' days' . '' : ' NIL '; + } + } + } + } + } + + + + $client_first_row .= ''; + $client_second_row .= ''; + $client_third_row .= ''; + $client_fourth_row .= ''; + $client_fifth_row .= ''; + $client_sixth_row .= ''; + $client_seventh_row .= ''; + //echo $client_third_row; + ?> + + Client Details'; + if ($is_client_details_available != null) { + + + + + ?> + + + + + + + + Client $i"; + } ?> + + + + + + + + + + + + + + + + +
    Sr.NoParticulars
    + $value) { + if (count($temp)) { + foreach ($temp as $tk => $tvalue) { + $value == $tvalue ? $all_same = true : $all_same = false; + array_push($temp, $value); + } + } else { + array_push($temp, $value); + } + } + + if ($all_same || count($done_on_credit) == 1) { + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $vals[0] . "% is done on credit.

    "; + } else { + $activities = ''; + foreach ($done_on_credit as $dkey => $dvalue) { + $activities .= $dkey . ' ' . $dvalue . '%, '; + } + $activities = substr_replace($activities, ' ', -2); + $activities = substr_replace($activities, ' and ', strripos($activities, ','), 2); + + echo "

    Out of total sales done by " . $name_of_the_company . ", " . $activities . "are done on credit.

    "; + } + } + + + //CLient Photo Section + // $client_photo_count = $pd_images[2]; + // $client_img_row_count = ceil(count($client_photo_count) / 3); + + // if(count($client_photo_count)){ + // // echo '
    '; + // // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // // echo '
    '; + // echo ''; + + // $client_from_index_increment = 0; + // for($img_row = 1; $img_row <= $client_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $client_from_index_increment; + // $to = ($from + 2); + // for($client_photo_iter = $from; $client_photo_iter <= $to;$client_photo_iter++) + // { + + // if(isset($client_photo_count[$client_photo_iter]) &&$client_photo_count[$client_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $client_from_index_increment = $client_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // } + ?> + ' . $client_form_remarks . '

    '; + } // ENd of client info available in this current index + ?> + + + + + + + 1Item Purchased '; + $supplier_second_row = '2Contact Person '; + $supplier_third_row = '3Mobile Number '; + $supplier_fourth_row = '4Landline No'; + $supplier_fifth_row = '5Payment Terms'; + $supplier_sixth_row = '6Payment Mode'; + $supplier_seventh_row = '7No of Days Credit'; + + if (isset($pd_processed_forms[1][$business_count])) { + + $supplier_details = $pd_processed_forms[1][$business_count]; + $supplierRow = json_decode($supplier_details['processed_json'], true); + //print_r($supplierRow); + $supplier_form_remarks = (isset($supplierRow['supplier_info_form_remark']) ? $supplierRow['supplier_info_form_remark'] : ''); + + if (isset($supplierRow['supplier_info_available']) && $supplierRow['supplier_info_available'] == 1) { + $is_supplier_details_avaialable = 1; + $company_name_for_supplier_form_dispaly = MYUTIL::findCompanyName($all_company_details, $supplierRow['company_id'], 1); + //$supplierResult['company_name'] = $company_name; + $total_no_of_suppliers = 0; + $total_payments_percent_on_credit_for_supplier = 0; + + + foreach ($supplierRow['manufacturing_details'] as $manuRow) { + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit']) ? $supplierRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : 0; + + if (isset($manuRow['main_raw_materials'])) { + + + foreach ($manuRow['main_raw_materials'] as $rawkey => $raw) { + + if ($raw['manufacturing_raw_material_name'] != "" || $raw['manufacturing_raw_material_name'] != null) { + $total_no_of_suppliers++; + } + $supplier_first_row .= '' . $raw['manufacturing_raw_material_name'] . ''; + + $supplier_second_row .= isset($raw['person_title_name_master']) ? '' . $raw['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $raw['manufacturing_contact_person_name']; + + $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'] != 1 ? $raw['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $raw['manufacturing_supplier_name'] . ''; + + $supplier_third_row .= '' . ($raw['manufacturing_contact_person_mobile_number'] ? $raw['manufacturing_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '' . $raw['person_stdcode'] . ' ' . $raw['person_landline'] . '' : '' . 'Not Provided' . ''; + + + + $supplier_fifth_row .= $raw['manufacturing_payment_type_master'] ? '' . $raw['manufacturing_payment_type_master'] . '' : 'NA'; + + + + $supplier_sixth_row .= $raw['manufacturing_payment_mode'] ? '' . $raw['manufacturing_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? '' . $raw['manufacturing_credit_days_from'] . ' to ' . $raw['manufacturing_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + } + } + } + // this is for trading + //print_r($supplierRow['trade_details'][0]['trading_products']); + if (isset($supplierRow['trade_details'][0]['trading_products']) && count($supplierRow['trade_details'][0]['trading_products'])) { + $total_payments_percent_on_credit_for_supplier += $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; + foreach ($supplierRow['trade_details'][0]['trading_products'] as $tradeRow) { + + if ($tradeRow['trade_product_name'] != "" || $tradeRow['trade_product_name'] != null) { + $total_no_of_suppliers++; + } + + + + + + + $supplier_first_row .= '' . $tradeRow['trade_product_name'] . ''; + $supplier_second_row .= isset($tradeRow['person_title_name_master']) ? '' . $tradeRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $tradeRow['trade_product_contact_person_name']; + + $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'] != 1 ? $tradeRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $tradeRow['trade_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($tradeRow['trade_product_contact_person_mobile_number'] ? $tradeRow['trade_product_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + + + $supplier_fourth_row .= $tradeRow['person_stdcode'] && $tradeRow['person_landline'] ? '' . $tradeRow['person_stdcode'] . ' ' . $tradeRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + + $supplier_fifth_row .= isset($tradeRow['trade_product_payment_type_master']) ? '' . $tradeRow['trade_product_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $tradeRow['trade_product_payment_mode'] ? '' . $tradeRow['trade_product_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '' . $tradeRow['trade_product_credit_days_from'] . ' to ' . $tradeRow['trade_product_credit_days_to'] . ' days' : 'NA'; + ///array_push($supplierResult,$temp); + + //} + //} + + } + } + + if (isset($supplierRow['servicing_details'][0]['service_providers']) && count($supplierRow['servicing_details'][0]['service_providers'])) { + + $total_payments_percent_on_credit_for_supplier += isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + //echo isset($supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit']) ? $supplierRow['servicing_details'][0]['service_providers_total_payments_percent_on_credit'] : 0; + + foreach ($supplierRow['servicing_details'][0]['service_providers'] as $serviceRow) { + + + if ($serviceRow['service_provider_name'] != "" || $serviceRow['service_provider_name'] != null) { + $total_no_of_suppliers++; + } + + $supplier_first_row .= '' . $serviceRow['service_provider_name'] . ''; + + + $supplier_second_row .= isset($serviceRow['person_title_name_master']) ? '' . $serviceRow['person_title_name_master'] . ' ' : '' . ''; + $supplier_second_row .= $serviceRow['service_provider_contact_person_name']; + + $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'] != 1 ? $serviceRow['person_designation_master'] : ''; + + $supplier_second_row .= ' ' . $serviceRow['service_provider_supplier_name'] . ''; + //$supplier_second_row .= $supplier_second_row; + + $supplier_third_row .= '' . ($serviceRow['service_provider_contact_person_mobile_number'] ? $serviceRow['service_provider_contact_person_mobile_number'] . '' : 'Not Provided' . ''); + + $supplier_fourth_row .= $serviceRow['person_stdcode'] && $serviceRow['person_landline'] ? '' . $serviceRow['person_stdcode'] . ' ' . $serviceRow['person_landline'] . '' : '' . 'Not Provided' . ''; + + $supplier_fifth_row .= isset($serviceRow['service_provider_payment_type_master']) ? '' . $serviceRow['service_provider_payment_type_master'] . '' : 'NA'; + + $supplier_sixth_row .= $serviceRow['service_provider_payment_mode'] ? '' . $serviceRow['service_provider_payment_mode'] . '' : 'NA'; + + $supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '' . $serviceRow['service_provider_credit_days_from'] . ' to ' . $serviceRow['service_provider_credit_days_to'] . ' days' : 'NA'; + //array_push($supplierResult,$temp); + + //} + } //} + + } + + $supplier_first_row .= ''; + $supplier_second_row .= ''; + $supplier_third_row .= ''; + $supplier_fourth_row .= ''; + $supplier_fifth_row .= ''; + $supplier_sixth_row .= ''; + $supplier_seventh_row .= ''; + } + // echo "dsfnsdkfnj**********"; + // print_r($supplierResult);// + + + + echo '

    Supplier Details

    '; + if ($is_supplier_details_avaialable != null) { + ?> + + + $fetchRow){ + //echo '
    Supplier '.($k+1).':

    '; + ?> + + + + + + + + Supplier $i"; + } ?> + + + + + + + +
    Sr.NoParticulars
    + '; + // echo '

    Supplier '.($k+1).' Photograph`s :

    '; + // echo '
    '; + // echo ''; + + // $supplier_from_index_increment = 0; + // for($img_row = 1; $img_row <= $supplier_img_row_count; $img_row++) + // { + + // echo ''; + // $from = $supplier_from_index_increment; + // $to = ($from + 2); + // for($supplier_photo_iter = $from; $supplier_photo_iter <= $to;$supplier_photo_iter++) + // { + + // if(isset($supplier_photo_count[$supplier_photo_iter]) &&$supplier_photo_count[$supplier_photo_iter]['company_id'] == ($business_count+1)) + // { + // echo ''; + // //unset($stock_photo_count[$stock_photo_iter]); + // } + + // } + // //echo "


    "; + // echo ''; + // $supplier_from_index_increment = $supplier_from_index_increment + 3; + // } + // //echo ''; + // echo '
    '; + // echo ''; + // echo '
    '; + // }*/ + + + //End of Supplier Photo section + + //}//End of supplier foreach + ?> + + 0) { + //$company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1); + echo "

    Out of total purchases done by " . $company_name_for_supplier_form_dispaly . ", " . $total_payments_percent_on_credit_for_supplier . " % is done on credit.

    "; //in advance rest on delivery. + } + } + echo '

    ' . $supplier_form_remarks . '

    '; + } // End of supplier info avilable in this current index + ?> + + + + + + 0 || (is_array($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) && 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"]); + } else { + $bindStockResult["manufacturing"] = array(); + } + // this is for stock retail details + if (count($stockRow['retail_details'][0]['retail_traded_goods']) > 0) { + $bindStockResult["retail"] = Stockform::getStockRetailDetails($stockRow['retail_details'][0]['retail_traded_goods']); + } else { + $bindStockResult["retail"] = array(); + } + // this is for stock whole sale details + if (count($stockRow['trade_details'][0]['trading_traded_goods']) > 0) { + $bindStockResult["wholesale"] = Stockform::getStockWholesaleDetails($stockRow['trade_details'][0]['trading_traded_goods']); + } else { + $bindStockResult["wholesale"] = array(); + } + + // this is for stock service details + //print_r($stockRow['servicing_details']); + if (count($stockRow['servicing_details'][0]['service_provider']) > 0) { + $bindStockResult["service_stocks"] = Stockform::getStockServiceDetails($stockRow['servicing_details'][0]['service_provider']); + } else { + $bindStockResult["service_stocks"] = array(); + } + //print_r($bindStockResult);die(); + count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing']) || count($bindStockResult["service_stocks"]) ? array_push($stockResult, $bindStockResult) : array(); + //echo "**********************"; + //print_r($stockResult);die(); + ?> + +

    Stock Details

    + +

    + + + + + + + + + + + + + 0) { + foreach ($getstRow['manufacturing'] as $pstRow) { + if ($pstRow['name']) { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Sr.NoType of StockStock ItemStock Value (Rs)Stock Quantity
    + Considering the size of operations, the stock of finished goods maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of finished goods maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_stock_sufficient_enough_remarks.'

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

    Finished goods Stock not required to be maintained.

    '; + // } + + // if(!strcasecmp($is_raw_materials_sufficient_enough,'yes')) + // { + // echo '

    Considering the size of operations, the stock of raw materials maintained is sufficient as per the PD Officer’s observations.

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

    Considering the size of operations, the stock of raw materials maintained is not sufficient as per the PD Officer’s observations.

    '; + // echo '

    '. $is_raw_materials_sufficient_enough_remarks.'

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

    Raw material Stock not required to be maintained.

    '; + // } + + // //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 '

    '. $service_goods_enough_remarks.'

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

    Stock not required to be maintained.

    '; + // } + //echo '

    '.$stock_remarks.'

    '; + + + $stock_photo_count = array_filter($pd_images[11], function ($d) use ($business_count) { + if ($d['company_id'] == ($business_count + 1)) { + return 1; + } else { + return 0; + } + }); + //echo 'stock_photo_count - ' . count($stock_photo_count); + $stock_img_row_count = ceil(count($stock_photo_count) / 3); + if (count($stock_photo_count)) { + echo '
    '; + echo '

    Stock Photograph`s :

    '; + echo '
    '; + echo ''; + + for ($img_row = 0; $img_row < $stock_img_row_count; $img_row++) { + // if($img_row > 0) { break; } + echo ''; + $from = $img_row == 0 ? $img_row : ($img_row + 2); + $to = ($from + 2); + for ($stock_photo_iter = $from; $stock_photo_iter <= $to; $stock_photo_iter++) { + + if (isset($stock_photo_count[$stock_photo_iter]) && $stock_photo_count[$stock_photo_iter]['company_id'] == ($business_count + 1)) { + echo ''; + //unset($stock_photo_count[$stock_photo_iter]); + } + } + //echo "


    "; + echo ''; + } + //echo ''; + echo '
    '; + echo ''; + echo '
    '; + } + // + ?> + + + ' . $stock_form_remarks . '

    '; + //else { + ?> + + + + + + + + +

    Future Plan and Business Environment

    + + + + + + + + + '; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + + ?> + +
    ParticularsDetails
    USP of the business (How applicant’s business is different from others in the business)' . $future_plan_business_environment['usp_of_the_business'] . '
    Future plan for business expansion' . $future_plan_business_environment['future_plans_for_business_expansion'] . '
    Impact of GST on business' . $future_plan_business_environment['impact_of_gst_on_the_business'] . '
    Key competitors in the business' . $future_plan_business_environment['key_competitors'] . '
    Succession Plan for business' . $future_plan_business_environment['succession_plan'] . '
    Brief of other group concerns/ Business run by the applicant' . $future_plan_business_environment['brief_of_other_group_concerns_or_businesses_run_by_the_applicants'] . '
    + '; + echo '

    ' . $future_plan_business_environment['remarks'] . '

    '; + } + } + + ?> + + + + + + Assessed Income - " . MYUTIL::findCompanyName($all_company_details, ($business_count + 1), 1) . ""; + if (isset($ai_core_details) && count($ai_summary_details_processed)) { + echo '

    ' . $order_dipaly_array[0] . ') Financial Snapshot

    '; + echo ''; + echo ''; + echo $ai_summary_details_processed['ai_table_header_row']; + echo ''; + echo ''; + echo $ai_summary_details_processed['sale_revenue_row']; + echo $ai_summary_details_processed['purchase_row']; + echo $ai_summary_details_processed['gross_profit_loss_row']; + echo $ai_summary_details_processed['gross_profit_loss_per_row']; + echo $ai_summary_details_processed['business_expense_row']; + echo $ai_summary_details_processed['net_profit_loss_row']; + echo $ai_summary_details_processed['house_hold_expense_row']; + echo $ai_summary_details_processed['disposable_income_row']; + echo $ai_summary_details_processed['net_margin_row']; + + echo ''; + echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + array_shift($order_dipaly_array); + } + + + echo '

    '; + //die(); + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '

    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // } + // array_shift($order_dipaly_array); + // echo '

    Detail Available on Annexure A'; + // } + + + // if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) + // { + // echo "
    "; + // echo '

    '.$order_dipaly_array[0].') Kuchha Sales Book/Bills :

    '; + // foreach($ai_core_details_processed['sales_month_wise_to_display'] as $sale_month_wise) + // { + // // if($sale_month_wise['sales_type'] == 1) + // // { + // echo '
    '; + // echo 'Item name : ' . $sale_month_wise['sales_item'].'
    '; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''.$sale_month_wise['month_count'].' month sales value : '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Sales value:'.$rupee_symbol.'' .MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; + // } + // else + // { + // echo 'Annual Sales value:'. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; + // } + // echo '
    '; + // $row_count = ceil(count($sale_month_wise['months']) / 5); + // //print_r(($sale_month_wise['months'])); + // // echo $row_count; + // //die(); + // echo ''; + + // for($i = 0; $i <= $row_count; $i++) + // { + // $from = $i== 0 ? $i : ($i + 3); + // $to = ($from + 3); + // echo ''; + // for($j = $from ; $j <= $to ;$j++) + // { + // //$sale_month_wise['months'] as $sale_month_data + // //echo ''; + // if(isset($sale_month_wise['months'][$j])) + // { + // echo ''; + // } + // } + // echo ''; + // } + // echo '
    '; + // echo ''; + // echo ''; + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // }else if($sale_month_wise['months'][$j]['sales_type'] == 2) + // { + // echo ''; + // } + // echo ''; + + // echo ''; + + // foreach($sale_month_wise['months'][$j]['month_data'] as $m_key => $month) + // { + // if($sale_month_wise['sales_type'] == 1) + // { + // echo ''; + // } + // if($m_key == 20)break; + // else if($sale_month_wise['sales_type'] == 2) + // { + // echo ''; + // } + // } + // echo ''; + + // echo '
    '.$sale_month_wise['months'][$j]['month_to_dispaly'].'
    Date Value
    Frequncy Value
    '.$month['date'] .' '.$month['value'] .'
    '.$month['frequency_name'] .' '.$month['frequency_value'] .'
    '; + // echo '
    '; + // echo '
    '; + + // //} + // } + + // array_shift($order_dipaly_array); + // } + + + $GLOBALS['is_kuccha_records_available'] = null; + if (isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) { + echo '

    ' . $order_dipaly_array[0] . ') Sales Itemwise :

    '; + echo ''; + echo ''; + echo $ai_core_details_processed['sales_calculated_by_itemwise_header']; + echo ''; + echo ''; + //print_r($ai_core_details_processed['sales_item_wise_to_diaplay']);die(); + foreach ($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid) { + //print_r($sid); + if ($sid['sales_type'] == 3) { + $GLOBALS['is_kuccha_records_available'] = true; + } + $rate_per_unit = ($sid['rate_per_unit'] != 0 && $sid['rate_per_unit'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['rate_per_unit']) : '-'); + echo ''; + echo ''; + if (isset($sid['margin_per'])) { + echo ''; + } + // if(isset($sid['margin_per_uom'])){echo ''; } + if (isset($sid['margin_final_value'])) { + echo ''; + } + + echo ''; + } + echo ''; + echo '
    ' . ($sid['other_sales_item'] != '' ? $sid['other_sales_item'] : $sid['sale_item']) . '' . $sid['sales_qty'] . '' . $sid['uom'] . '' . $rate_per_unit . '' . $sid['frequency'] . '' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['annual_sale_value']) . ($sid['sales_type'] == 3 ? ' *' : '') . '' . ($sid['margin_per'] != 0 ? $sid['margin_per'] : '-') . ''.($sid['margin_per_uom'] != 0? $sid['margin_per_uom'] : '-').'' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($sid['margin_final_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if ($GLOBALS['is_kuccha_records_available']) { + echo '
    * Assessed From Kuchha Records, Details Available in Annexure A'; + } + + + if (isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Sales Declared By Customer

    '; + + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) + // { + // echo '

    As per person met, the following Purchase details were shared:

    '; + // } + // else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + // } + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['sales_declared_by_customer']) . ' ) declared as annual sale value.'; + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + $str .= '
    and ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' ( ' . MYUTIL::numtowords($ai_core_details['sales_declared_by_customer'][0]['margin_value']) . ' )' . '( ' . $ai_core_details['sales_declared_by_customer'][0]['margin_per'] . '% sales declared ) as net margin amount.'; + } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1) { + echo '

    As per person met, the following Purchase details were shared:

    '; + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) { + echo '

    As per person met, Purchase details were not shared, income calculated by Net margin percentage.

    '; + } + + echo '
    '; + if (isset($ai_core_details) && count($ai_core_details['purchase_declared_by_customer'])) { + + echo '

    ' . $order_dipaly_array[0] . ') Purchase Declared By Customer

    '; + + + + + $str = 'As per person met, ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ( ' . MYUTIL::numtowords($ai_core_details['purchase_declared_by_customer'][0]['purchase_declared_by_customer']) . ' ) declared as annual purchase value.'; + // if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 2) + // { + // $str .= '
    and '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($ai_core_details['sales_declared_by_customer'][0]['margin_value']).' ( '.MYUTIL::numtowords( $ai_core_details['sales_declared_by_customer'][0]['margin_value']).' )'.'( '.$ai_core_details['sales_declared_by_customer'][0]['margin_per'].'% sales declared ) as net margin amount.'; + // } + + echo $str; + echo '


    '; + array_shift($order_dipaly_array); + } + + + + if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 1) { + echo '

    ' . $order_dipaly_array[0] . ') Itemwise Purchase Details :

    '; + + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($ai_core_details_processed['purchase_to_display'] as $dat) { + $rate = $dat['rate'] != 0 && $dat['rate'] != '' ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['rate']) : '-'; + echo ''; + } + echo ''; + + echo '
    Raw Material/Trading Item Purchase Quantity UOM Rate/Unit of Purchase Frequency Annual Purchase(Rs)
    ' . $dat['material_name'] . ' ' . $dat['qty'] . ' ' . $dat['uom'] . ' ' . $rate . ' ' . $dat['frequency'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($dat['annual_value']) . '
    '; + array_shift($order_dipaly_array); + } else if ($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 && $ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 2) { + echo '

    ' . $order_dipaly_array[0] . ') Billwise Purchase Details :

    '; + foreach ($ai_core_details_processed['purchase_to_display'] as $billwise) { + echo '
    '; + echo 'Item name : ' . $billwise['item_name'] . '
    '; + echo '' . $billwise['month_count'] . ' month(s) purchase value : ' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value']) . ' Annual Purchase value:' . MYUTIL::customIndianNumberFormat($billwise['annual_purchase_value'] * (12 / $billwise['month_count'])) . ''; + echo '
    '; + foreach ($billwise['months'] as $month_data) { + //echo ''; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + foreach ($month_data['month_data'] as $month) { + echo ''; + } + echo ''; + + echo '
    ' . $month_data['month_to_dispaly'] . '
    Date Value
    ' . $month['date'] . ' ' . $month['value'] . '
    '; + //echo '
    '; + } + echo '
    '; + } + array_shift($order_dipaly_array); + } + } + + // + if (isset($ai_core_details) && count($ai_core_details['business_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Business Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp) { + if ($b_exp['expense_value'] != 0) { + echo ''; + } + } + echo ''; + echo '
    Business Expense Amount Frequency Annual Expenses
    ' . $b_exp['expense_item'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['expense_value']) . ' ' . $b_exp['frequency_name'] . ' ' . $rupee_symbol . " " . MYUTIL::customIndianNumberFormat($b_exp['annual_expenses_value']) . '
    '; + array_shift($order_dipaly_array); + } + + if (isset($ai_core_details) && count($ai_core_details['house_hold_expenses'])) { + echo '

    ' . $order_dipaly_array[0] . ') Household Expenses Details :

    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($ai_core_details_processed['household_expenses_to_diaplay'] as $h_exp) { + echo ''; + } + echo ''; + echo '
    Expense Particulars Amount (Rs) Frequency Annual Expenses(Rs)
    ' . $h_exp['expense_item'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['expense_value']) . ' ' . $h_exp['frequency_name'] . ' ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($h_exp['annual_expense_value']) . '
    '; + array_shift($order_dipaly_array); + } + + + // if(isset($ai_core_details) && count($ai_summary_details_processed)) + // { + // echo '

    The Summary of Income :

    '; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['ai_table_header_row']; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['sale_revenue_row']; + // echo $ai_summary_details_processed['purchase_row']; + // echo $ai_summary_details_processed['gross_profit_loss_row']; + // echo $ai_summary_details_processed['business_expense_row']; + // echo $ai_summary_details_processed['net_profit_loss_row']; + // echo $ai_summary_details_processed['house_hold_expense_row']; + // echo $ai_summary_details_processed['disposable_income_row']; + // echo $ai_summary_details_processed['net_margin_row']; + + // echo ''; + // echo '
    '; + + // echo '
    '; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo ''; + // echo $ai_summary_details_processed['considered_sales_revenue_row']; + // echo $ai_summary_details_processed['considered_net_profit_row']; + // echo $ai_summary_details_processed['considered_net_margint_row']; + // echo ''; + // echo '
    Particulars Details
    '; + // } + // echo "
    "; + // + + ?> + + + + + + + + + + $oaRow) { + $otherAssetRow = json_decode($oaRow['processed_json'], true); + //print_r($otherAssetRow);die(); + $other_assest_common_remrks = $otherAssetRow['assets_form_remark']; + if (isset($otherAssetRow['asset_info_available']) && $otherAssetRow['asset_info_available'] == 1) { + $is_personal_info_available = 1; + + if (count($otherAssetRow['assets_details']) > 0) { + $otherAssetResult = ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'], $pd_master_details[0]['pd_id']); + + //print_r($otherAssetResult); + } + } +} +?> + +

    Personal Assets

    + + + + + + + + + + + + + + + $paRow) { + ?> + + + + + + + + + + + +
    Sr.NoAsset TypeAsset DescriptionAsset Owned ByApprox Market Value(Rs)Age of the Assest Again Assest
    ' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : (($paRow['approximate_market_value'] != '' && $paRow['approximate_market_value'] != 0 ? $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : 'Not Provided')); ?>
    + +

    As per Loan applicant, he does not have any other assets.

    +' . $other_assest_common_remrks . '

    '; +} + +?> + + + $ibRow) { + $individualBankRow = json_decode($ibRow['processed_json'], true); + $ind_banking_common_remarks = $individualBankRow['banking_form_remark']; + if (isset($individualBankRow['bank_info_available_business']) && $individualBankRow['bank_info_available_business'] == 1) { + // $is_personal_banking_available = 1; + if (count($individualBankRow['business_details']) > 0) { + $getBuinessEachValues = BANKINGFORM::getNewBuinessBankingDetails($individualBankRow['business_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getBuinessEachValues); + } + } + if (isset($individualBankRow['bank_info_available']) && $individualBankRow['bank_info_available'] == 1) { + if (count($individualBankRow['banking_details']) > 0) { + $getIndividualEachValues = BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details'], $pd_master_details[0]['pd_id']); + $bankingResult = array_merge($bankingResult, $getIndividualEachValues); + } + } +} +if (count($bankingResult) > 0) { + $filteredPersonalBankingResult = array(); + $x = 0; + for ($y = 0; $y < count($bankingResult); $y++) { + if ($bankingResult[$y]['str_flag'] !== "buiness-company") { + $filteredPersonalBankingResult[$x] = $bankingResult[$y]; + $x++; + } + if ($bankingResult[$y]['same_ac_used_for'] == "Business") { + $stmt_flag++; + } + } +} + + +?> +

    Personal Banking Details:

    + 0) { ?> +

    Below bank account details were shared :

    + + + + + + + + + + + + + + + $bdRow) { + ?> + + + + + + + + + + + + +
    Sr.NoAccount Holder's NameBank NameAccount TypeOD / CC LimitVintage
    + 0) { + echo '

    The personal banking is done through same account used for business banking

    '; +} +if ($ind_banking_common_remarks != '') { + echo '

    ' . $ind_banking_common_remarks . '

    '; +} +if (count($filteredPersonalBankingResult) == 0) { + echo '

    As per loan applicant, he does not have any personal account

    '; +} ?> + + + + + + + $iRow) { + $otherIcomeRow = json_decode($iRow['processed_json'], true); + $other_source_income_common_remarks = $otherIcomeRow['otherincome_remarks']; + //print_r($otherIcomeRow);die(); + + if (strtoupper($otherIcomeRow['other_income']) == 'YES' && count($otherIcomeRow['income_details']) > 0) { + $is_other_income_available = 1; + $otherIncomeResult = OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details'], $pd_master_details[0]['pd_id']); + } +} +?> +
    +

    Other Sources of Income of Individual Applicants:

    + + + + + + + + + + + + + + $oiRow) { + ?> + + + + + + + + + +
    Sr.NoIncome SourceEarned byAmount(Rs)
    (Details Available in Annexure B)'; + $GLOBALS['is_rental_available'] = 1; + } ?>
    + +

    As per the loan applicants, they do not have any other source of Income.

    +' . $other_source_income_common_remarks . '

    '; +} + +?> + + + + + $fRow) { + $familyRow = json_decode($fRow['processed_json'], true); + //print_r($familyRow);die(); + $other_family_form_common_remarks = $familyRow['family_details_form_remark']; + if (array_key_exists('family_details', $familyRow) && count($familyRow['family_details']) > 0) { + $familyResult = OTHERFAMILYFORM::getFamilyDetails($familyRow['family_details'], $pd_master_details[0]['pd_id']); + } +} +?> + +

    Family Information:

    + 0) { + //print_r($familyResult); +?> + + + $fmValue) { ?> + + ' . $fmValue['selected_person_title'] . $fmValue['selected_person'] . 'Family Information - Select person for capturing family details, who is an applicant in the case, resides at ' . $fmValue['residency_address'] . 'Family Information - Residence Address of Select person .'; + + $residence_text = 'This is a ' . $fmValue['residence_ownership'] . ' Family Information - Ownership of Residence residence, where the applicant has been staying for ' . $fmValue['residence_No_of_years'] . 'Family Information - No of Yrs in current residence .'; + $residence_text .= (!strcasecmp($fmValue['residence_ownership'], 'rented')) ? ' The rent paid ' . $rupee_symbol . ' ' . $fmValue['rent'] . ' per month.' : ''; + + echo '

    ' . $intro_text . '

    '; + echo '

    ' . $residence_text . '

    '; + + ?> + + +

    The table below provides details of other family members of

    + + + + + + + + + + + + + $fmRow) { + ?> + + + + + + + + + + +
    Sr.NoNameRelationAgeEarning StatusOccupation Details
    + ' . $text . '

    '; + } + } ?> + +

    Other Family Members is not available.

    +' . $other_family_form_common_remarks . '

    '; +} + +?> + + + + + + $elRow) { + $otherLoanRow = json_decode($elRow['processed_json'], true); + $existing_loan_form_common_remarks = $otherLoanRow['currentloan_remarks']; + $is_all_loan_details_availble = 'yes'; + $out_standing_loan_info = array(); + if (array_key_exists('loan_info_available', $otherLoanRow)) { + $is_all_loan_details_availble = $otherLoanRow['loan_info_available']; + } + $total_no_of_data = 0; + if (strtoupper($otherLoanRow['existing_loan']) == 'YES' && (!strcasecmp($is_all_loan_details_availble, 'yes') && count($otherLoanRow['loan_details']) > 0)) { + $is_existing_loans_available = 1; + $total_no_of_data = count($otherLoanRow['loan_details']); + $existLoanResult = FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details'], $pd_master_details[0]['pd_id']); + } else if (!strcasecmp($is_all_loan_details_availble, 'no')) { + $out_standing_loan_info['tot_running_loans'] = $otherLoanRow['tot_running_loans']; + $out_standing_loan_info['tot_emi_paid'] = $otherLoanRow['tot_emi_paid']; + $out_standing_loan_info['tot_outstanding_loans'] = $otherLoanRow['tot_outstanding_loans']; + } +} +?> +
    +

    Existing loan obligation

    + + + + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. +

    + $single_table) { + //print_r($single_table);die(); + + if (is_numeric($table_key)) { + ?> + + + + + Loan $pre_loan_no"; + } ?> + + + + + + +
    Particulars
    +
    + + The table below lists the details of Existing Loan Obligations of the Loan Applicants. + + + + + + + + + + + + + + + +
    Total No of Running LoansTotal Outstanding AmountTotal EMI being Paid (Monthly)
    + + +

    As per loan applicant he does not have any existing loan obligations.

    + +' . $existing_loan_form_common_remarks . '

    '; +} +?> + + + + + + + + + + +'; +echo '

    Credit Manager`s Specific Queries:

    '; +//echo '
    '; +if (isset($credit_officier_specific_queries['additional_requirements_processed']) && count($credit_officier_specific_queries['additional_requirements_processed'])) { + + + foreach ($credit_officier_specific_queries['additional_requirements_processed'] as $key => $value) { + echo 'Question - ' . $value['question'] . '
    '; + echo 'Answer - ' . $value['answer']; + echo '

    '; + } +} else { + echo 'There are no specific queries raised by Credit Manager.'; +} + +echo '
    '; +echo '

    Document to be photographed/scanned:

    '; +// +if (isset($credit_officier_specific_queries['docs_to_be_sighted_processed']) && count($credit_officier_specific_queries['docs_to_be_sighted_processed'])) { + + + foreach ($credit_officier_specific_queries['docs_to_be_sighted_processed'] as $doc_key => $doc_value) { + echo 'Document Required : ' . $doc_value['doc_name'] . '
    '; + echo 'Provided ( Yes / No ) : ' . ($doc_value['ans'] == 'yes' ? 'YES, Document available in zipped file enclosed with report' . '
    ' : 'NO
    '); + if ($doc_value['ans'] != 'yes') { + echo 'Reason : ' . $doc_value['reason']; + } + echo '

    '; + } +} else { + echo 'There are no specific documents to be collect.'; +} + +if (isset($credit_officier_specific_queries['covid_section']) && isset($credit_officier_specific_queries['covid_section']['question_info']) && count($credit_officier_specific_queries['covid_section']['question_info'])) { + echo '
    '; + echo '

    Queries related to Covid-19:

    '; + + foreach ($credit_officier_specific_queries['covid_section']['question_info'] as $covid_key => $covid_value) { + if (isset($covid_value['is_subfield']) && !$covid_value['is_subfield']) { + echo 'Question : ' . $covid_value['question'] . '
    '; + $temp_answer = $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (($covid_value['type'] == 1 || $covid_value['type'] == 9) && ($covid_value['field_type'] == 'str&numtoword' || $covid_value['field_type'] == 'num' || $covid_value['field_type'] == 'numtoword') && is_numeric($temp_answer)) { + $temp_answer = MYUTIL::customIndianNumberFormat($temp_answer) . ' (' . MYUTIL::numtowords($temp_answer) . ')'; + } + echo 'Answer : ' . $temp_answer . '
    '; + $sub_field_key = $covid_value['question_key'] . '_' . $credit_officier_specific_queries['covid_section'][$covid_value['question_key']]; + if (isset($credit_officier_specific_queries['covid_section'][$sub_field_key])) { + echo 'Reason/Description : ' . $credit_officier_specific_queries['covid_section'][$sub_field_key] . '
    '; + } + + echo '
    '; + } + } +} + +//} + +?> + + + + +
    +
    +

    PD OFFICER`S REMARKS ON CUSTOMER BEHAVIOUR & OVERALL PD STATUS

    + +
    + + '; + echo '

    Personal feedback or market intelligence on the case (if any):

    '; + echo '

    ' . $final_remark_data['market_intelligence'] . '

    '; + echo '
    '; + //echo '
    '; + } + ?> +
      +
    • Customer Behaviour:
    • + +

      + + ✔'; + ?> + + + + + + + + +
      +
      Polite
      +
      +
      +
      Rude
      +
      +
      +
      Others*
      +
      +
      +
      +
      '; + } ?> + + + +
      +
    • PD Officer’s overall assessment:
    • +

      + + + + + + + + + + + + + + + + +
      +
      Positive
      +
      +
      +
      Refer to Credit
      +
      +
      +
      Negative
      +
      +
      +
      Others*
      +
      +
      +
      + +
    +
    + + +

    PD officer recommendation is ' . $fo_diplay . '.

    '; ?> +

    The following key points were considered while arriving at the aforementioned status.

    +"; + foreach ($final_remark_data['recommendation_positive'] as $pos) { + echo "
  • " . $pos['reason_for_positive'] . "
  • "; + } + } else if ($negative) { + echo "
      "; + foreach ($final_remark_data['recommendation_negative'] as $neg) { + echo "
    • " . $neg['reason_for_negative'] . "
    • "; + } + } else if ($refer_to_credit) { + echo "
        "; + foreach ($final_remark_data['recommendation_refer_to_credit'] as $rtc) { + echo "
      • " . $rtc['reason_for_refer_to_credit'] . "
      • "; + } + } + echo "
      "; +?> +" . $other_command_remark . "

      "; + } + + echo '

      ' . $pd_officer_final_remark . '

      ' +?> + + + + + + 0) { + for ($business_count = 0; $business_count < $total_no_of_business; $business_count++) { + if (is_array($assessed_income_details) && count($assessed_income_details) && isset($assessed_income_details[($business_count + 1)]) && count($ai_core_details['sales_calculated_by_itemwise']) && $GLOBALS['is_kuccha_records_available']) { + echo '
      '; + echo '

      Annexure A

      '; + if (isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) { + //echo "
      "; + echo '

      Kuchha Sales Book/Bills Details:

      '; + //print_r($ai_core_details_processed['sales_item_wise_to_diaplay']);//die(); + foreach ($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sale_month_wise) { + + //echo '
      '; + if ($sale_month_wise['sales_type'] == 3 || $sale_month_wise['sales_type'] == 2) { + //print_r($sale_month_wise);//die(); + echo 'Item name : ' . $sale_month_wise['sale_item'] . '
      '; + if ($sale_month_wise['sales_type'] == 3) { + echo '' . $sale_month_wise['month_count'] . ' month sales value : ' . $rupee_symbol . '' . MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']) . ' Annual Sales value:' . $rupee_symbol . '' . MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']))) . ' (i.e. ' . (12 / $sale_month_wise['month_count']) . ' * ' . $sale_month_wise['total_months_value'] . ')'; + } else { + echo 'Annual Sales value:' . $rupee_symbol . ' ' . MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'])) . ''; + } + echo '
      '; + echo '
      '; + $row_count = ceil(count($sale_month_wise['months']) / 5); + //print_r(($sale_month_wise['months'])); + // echo $row_count; + //die(); + echo '
      '; + + for ($i = 0; $i <= $row_count; $i++) { + $from = $i == 0 ? $i : ($i + 3); + $to = ($from + 3); + //echo ''; + for ($j = $from; $j <= $to; $j++) { + //$sale_month_wise['months'] as $sale_month_data + //echo ''; + if (isset($sale_month_wise['months'][$j])) { + + //print_r($sale_month_wise['months'][$j]) ;die(); + echo '
      '; + //echo ''; + echo '
      '; + echo ''; + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + } + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + } else if (($sale_month_wise['sales_type'] == 2)) { + echo ''; + } + echo ''; + + echo ''; + + $month_sub_total = 0; + foreach ($sale_month_wise['months'][$j]['month_data'] as $m_key => $month) { + + if ($sale_month_wise['sales_type'] == 3) { + echo ''; + $month_sub_total += $month['value']; + } + //if($m_key == 20)break; + else if ($sale_month_wise['sales_type'] == 2) { + echo ''; + $month_sub_total += $sale_month_wise['annual_sale_value']; + } + } + echo ''; + $month_sub_total = 0; + echo ''; + + echo '
      ' . $sale_month_wise['months'][$j]['month_to_dispaly'] . '
      Date Value
      Frequncy Value
      ' . $month['date'] . ' ' . $month['value'] . '
      ' . $month['frequency_name'] . ' ' . $month['frequency_value'] . '
      Total ' . MYUTIL::customIndianNumberFormat($month_sub_total) . '
      '; + echo '
      '; + echo '   '; + } + } + //echo ''; + } + echo '
      '; + echo '
      '; + } + } + } + } // end of if AI available in current business count + } //end of total no of business for loop +} +?> + + + + + + $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 '
      '; + echo '

      Annexure B : Rental Income Details

      '; + + foreach ($rental_data as $key => $value) { + + echo '
      Property : ' . ($key + 1) . ''; + echo '

      Address of Property : ' . ($value['address_property']) . ''; + echo '

      Type of Property : ' . ($value['type_of_property']) . ''; + echo '

      Name of the Property Owner`s : ' . ($value['property_owners_name']) . ''; + echo '

      Name of the person`s who showing Property : ' . ($value['property_showing_persons_name']) . ''; + echo '

      Property Document Proof Seen : ' . ($value['property_document_proof_visted']) . ''; + if (!strcasecmp($value['property_document_proof_visted'], 'yes')) { + echo '      Type of Property Document Visted : ' . ($value['type_of_document_visited']) . ''; + } + echo '

      Unit Type : ' . ($value['unit_type']) . ''; + echo '

      No of Floors/Units : ' . ($value['no_of_floors']) . ''; + echo '      '; + echo $value['area_coverd'] != "" ? 'Area covered : ' . ($value['area_coverd'] . ' ' . $value['area_uom'] . '') : ''; + + if (isset($value['unit_details']['multistorey']) && count($value['unit_details']['multistorey'])) { + echo '

      Multistorey Details:

      '; + echo ''; + echo ''; + foreach ($value['unit_details']['multistorey'] as $multistorey_key => $multistorey_value) { + echo ''; + } + echo ''; + echo '
      Floor Name No of Units Rent same for
      all Units
      Unit Details Total
      Rent Amount
      ' . $multistorey_value['floor_name'] . ' ' . $multistorey_value['no_units_in_floor'] . '' . $multistorey_value['same_rent'] . '' . $multistorey_value['unit_details'] . '' . $multistorey_value['total_floor_rent'] . '
      Total ' . $rupee_symbol . ' ' . $value['unit_details']['multistorey_over_all_total'] . '
      '; + } + + echo '

      Unit Details:

      '; + foreach ($value['unit_details']['property_core'] as $u_key => $unit_value) { + echo '
      '; + echo $unit_value['unit_name']; + echo ''; + echo $unit_value['header_row']; + echo $unit_value['first_owners_row']; + echo $unit_value['second_lessee_name_row']; + echo $unit_value['third_area_of_unit_row']; + echo $unit_value['fourth_payment_mode_row']; + echo $unit_value['fifth_lease_period_row']; + echo $unit_value['sixth_security_deposit_row']; + echo $unit_value['eigth_current_rent_received_row']; + echo $unit_value['nineth_difference_between_rent_amount_row']; + echo '
      '; + } + + //print_r($value['third_check_details']); + if ($value['third_check_details']['done_third_party_check']) { + echo '
      For property' . ($key + 1) . ' Third Party check was 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'] . '). ' : ' '; + if ($value['third_check_details']['rental_rates_third_party_check_done'] != "") { + echo 'Rental rates in the area as per person whom third party check is done is ' . $value['third_check_details']['rental_rates_third_party_check_done']; + } + } else { + + echo '
      For property ' . ($key + 1) . ' Third Party check not done.'; + echo isset($value['third_check_details']['why_third_party_check_not_done']) && $value['third_check_details']['why_third_party_check_not_done'] != "" ? 'Resaon - ' . $value['third_check_details']['why_third_party_check_not_done'] : ''; + } + echo '
      ' . $value['property_remark']; + } + } +} + + +?> + + + + +"; +$footer_lender_stamp = MYUTIL::dispatchDisclaimer($lender_disclaimer, 3); +if (isset($footer_lender_stamp)) { + //$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer,3); + echo '

      '; +} + +$footer_lender_disclaimer = MYUTIL::dispatchDisclaimer($lender_disclaimer, 2); + +if (isset($footer_lender_disclaimer)) { + echo '

      ' . $footer_lender_disclaimer['disclaimer'] . '

      '; +} +echo "

      "; + +// ########################### End disclaimer end ######################################### +?> + + + + + + +
      '; + echo "

      Detailed Score Card Section

      "; + // *** General Section Questions Score Table + echo ''; + echo ""; + foreach ($pd_score['general'] as $key => $general) { + + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $general['l1_weightage'] . '% * ' . $general['l2_weightage'] . '% * ' . $general['score_band'] . ')'; + $max_span = '(' . $general['l1_weightage'] . '% * ' . $general['l2_weightage'] . '% * ' . $general['max_score_band'] . ')'; + echo '' . ''; + } + + echo ''; + echo '
      General Questions L1(" . $pd_score['general']['otp_done']['l1_weightage'] . "%) L2 Answer Score Attributed Score Max Score
      ' . $question . '' . $general['l2_weightage'] . '%' . $general['answer'] . + '' . $general['score_band'] . '' . $general['attributed_score'] . '
      ' . $span . '
      ' . $general['max_score'] . '
      ' . $max_span . '
      General Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['general']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['general']['max_score'], 2, '.', ',') . '
      '; + + echo '

      '; + + + // *** Asset Caculation Score Table + echo ''; + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + + + echo '
      Asset Value Calculaitons
      Actual Value Of Assets (a)" . number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'], 2, '.', ',') . "
      Loan Amount (b)" . number_format($pd_score['score_summary']['asset_calculation_details']['loan_amount'], 2, '.', ',') . "
      Avg Expected Value Of Assets (c)" . round($pd_score['score_summary']['asset_calculation_details']['avg_expected_value_of_assets'], 2) . "%
      Expected Value Of Assets (d = c*b)" . number_format($pd_score['score_summary']['asset_calculation_details']['expected_value_of_assets'], 2, '.', ',') . "
      Actual Value Of Assets Percentage (e = (a/b) * 100)" . round($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets_percentage'], 2) . "%
      Variance (f = ((e-c)/c) * 100)" . round($pd_score['score_summary']['asset_calculation_details']['variance'], 2) . "%
      Score As per Grid" . round($pd_score['score_summary']['asset_calculation_details']['score'], 2) . "
      '; + + echo '


      '; + // *** Final Remarks Questions Score Table + echo ''; + echo ""; + foreach ($pd_score['final_remarks'] as $key => $final_remark) { + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + + $span = '(' . $final_remark['l1_weightage'] . '% * ' . $final_remark['l2_weightage'] . '% * ' . $final_remark['score_band'] . ')'; + + $max_span = '(' . $final_remark['l1_weightage'] . '% * ' . $final_remark['l2_weightage'] . '% * ' . $final_remark['max_score_band'] . ')'; + + echo '' . ''; + } + + echo ''; + echo '
      Final Remarks Questions L1(" . $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage'] . "%) L2Answer ScoreAttributed Score Max Score
      ' . $question . '' . $final_remark['l2_weightage'] . '%' . $final_remark['answer'] . '' . $final_remark['score_band'] . '' . $final_remark['attributed_score'] . '
      ' . $span . '
      ' . $final_remark['max_score'] . '
      ' . $max_span . '
      Final Remarks Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['final_remarks']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['final_remarks']['max_score'], 2, '.', ',') . '
      '; + echo '


      '; + + //print_r($pd_score['business']); + echo ''; + + // *** Business Section Questions Score Table + echo ""; + $certificates = array(); + foreach ($pd_score['business'] as $key => $business) { + + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $business['l1_weightage'] . '% * ' . $business['l2_weightage'] . '% * ' . $business['score_band'] . ')'; + $max_span = '(' . $business['l1_weightage'] . '% * ' . $business['l2_weightage'] . '% * ' . $business['max_score_band'] . ')'; + + if (($key != 'cerificates') && ($key != 'location_suited_for_busienss')) { + echo '' . ''; + } + + if ($key == 'location_suited_for_busienss') { + echo '' . ''; + } + + if ($key == 'cerificates') { + $certificates = $business; + + echo '' . ''; + } + } + + echo ''; + echo '
      Business Questions L1(" . $pd_score['business']['no_of_years_business_run']['l1_weightage'] . "%) L2Answer Score Attributed ScoreMax Score
      ' . $question . '' . $business['l2_weightage'] . '%' . $business['answer'] . '' . $business['score_band'] . '' . $business['attributed_score'] . '
      ' . $span . '
      ' . $business['max_score'] . '
      ' . $max_span . '
      ' . $question . '' . $business['l2_weightage'] . '%' . $address_type_remarks_caption[$business['answer']] . '' . $business['score_band'] . '' . $business['attributed_score'] . '
      ' . $span . '
      ' . $business['max_score'] . '
      ' . $max_span . '
      Certificates ' . round($business['l2_weightage'], 2) . '%' . 'Refer Cert Table' . '' . $business['score_band'] . '' . $business['attributed_score'] . '' . $business['max_score'] . '
      Business Section Sum of Attributed Score | Sum of Max Score ' . number_format($pd_score['score_summary']['business']['actual_score'], 2, '.', ',') . ' ' . number_format($pd_score['score_summary']['business']['max_score'], 2, '.', ',') . '
      '; + + + // *** Business Certificates Score Table + + + echo '

      '; + + echo ""; + echo ""; + $index = 0; + // print_r($certificates); + foreach ($certificates as $key => $cerificate) { + $index++; + if ($index <= 7) { + $question = MYUTIL::findQuestionByKey($score_questions_display, $key); + $span = '(' . $cerificate['l1_weightage'] . '% * ' . $cerificate['l2_weightage'] . '% * ' . $cerificate['score_band'] . ')'; + + $max_span = '(' . $cerificate['l1_weightage'] . '% * ' . $cerificate['l2_weightage'] . '% * ' . $cerificate['max_score_band'] . ')'; + + echo '' . ''; + } + } + echo "
      Business Certificates Answer Score Attributed Score Max Score
      ' . $question . '' . $cerificate['answer'] . '' . $cerificate['score_band'] . '' . round($cerificate['attributed_score'], 3) . '
      ' . $span . '
      ' . round($cerificate['max_score'], 3) . '
      ' . $max_span . '
      "; +} +// ########################### End Of Score Card Section ######################################### + + + + + + +?> + + + + \ No newline at end of file