From dff6a8073e2089f9e5e4c149d3e0e47c6937c3ae Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sat, 31 Aug 2019 13:24:59 +0530 Subject: [PATCH] RI STANALONE TRACK URL CONSTANT --- api/application/config/constants.php | 3 + api/application/controllers/PD_Controller.php | 141 +- .../helpers/inlinephototransform_helper.php | 6 +- api/application/helpers/rentalform_helper.php | 196 +- api/application/models/PD_Model.php | 10 +- api/application/views/js/phantomchart.js | 2 +- .../views/report_templates/JSONTOREPORT.php | 86 +- .../report_templates/JSONTOREPORT_RI.php | 63 +- .../JSONTOREPORT_karthick.php | 3043 ----------------- 9 files changed, 402 insertions(+), 3148 deletions(-) delete mode 100644 api/application/views/report_templates/JSONTOREPORT_karthick.php diff --git a/api/application/config/constants.php b/api/application/config/constants.php index bd83763b..cd0017dc 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -102,6 +102,7 @@ defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phanto defined('LOGTOBOT') OR define('LOGTOBOT',0); defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); +defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://demo.pdgenie.com/otnew/#/'); } else if(ENVIRONMENT == 'testing') { @@ -112,6 +113,7 @@ else if(ENVIRONMENT == 'testing') defined('LOGTOBOT') OR define('LOGTOBOT',0); defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); + defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://demo.pdgenie.com/otnew/#/'); } else if(ENVIRONMENT == 'production') { @@ -122,6 +124,7 @@ else if(ENVIRONMENT == 'production') defined('LOGTOBOT') OR define('LOGTOBOT',0); defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); + defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://pdgenie.com/track/#/'); } /*********************END of AWS resources Constants*************************************************/ diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 23913709..d82d1c54 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -485,7 +485,7 @@ class PD_Controller extends REST_Controller { $randomString .= $characters[rand(0, $charactersLength - 1)]; } $pd_details['random_string'] = $randomString; - $url = 'https://pdgenie.com/otnew/#/'.$randomString; + $url = OFFICER_TRACKING_URL.$randomString; /* $ch = curl_init(); $timeout = 5; $url = 'https://ssa.sineedge.com/ot/#/officertracking/'.$randomString; @@ -1919,8 +1919,8 @@ public function assignPDTempalate($data) case 18://City Credit Head //Get all PD's which were triggered in this entity id and current city return array('entity' => $user_role_details[0]['fk_entity_id'],'city' => $user_role_details[0]['fk_city']); - case 17://Branch Sales - case 18://Branch Credit + case 19://Branch Sales + case 20://Branch Credit //Get all PD's which were triggered in this entity id and current lender user id return array('entity' => $user_role_details[0]['fk_entity_id'],'lender_credit_person' => $lender_user_id); default: @@ -1945,7 +1945,7 @@ public function assignPDTempalate($data) $pd_lender = $records['pd_lender']; $pd_applicant_name = strtolower($records['pd_name']); $pd_applicant_lender_ref = strtolower($records['pd_applicant_id']); - $pd_officer_name = $records['pd_officer']; + $pd_officer_name = isset($records['pd_officer']) ? $records['pd_officer'] : null ; $result_data = $this->PD_Model->PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name); if(count($result_data)) @@ -5593,7 +5593,7 @@ public function getPDFormDetailsJSON_post() // - //$this->aws_cognito->adminSetUserPassword('aditya.raikar@imgc.com'); + //$this->aws_cognito->adminSetUserPassword('anuj.vaish@imgc.com'); //die(); $is_regenerate = 0; @@ -5604,7 +5604,7 @@ public function getPDFormDetailsJSON_post() //print_r($records); $data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid); $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); - print_r($data['pd_master_details']);die(); + //print_r($data['pd_master_details']);die(); $data['lender_disclaimer'] = $this->PD_Model->selectRecords(ENTITYDISCLAIMER,array('fk_entity_id' => $data['pd_master_details'][0]['fk_lender_id'])); $data['pd_additional_requirements'] = $this->PD_Model->getPDAdditionalRequirements($pdid); @@ -5670,7 +5670,7 @@ public function getPDFormDetailsJSON_post() // $this->getPDImages_post``($fields2,array('fk_pd_id'=>$pdid,'fk_form_id' => $i),PDDOCUMENTS,array(),'','company_id','ASC'); // print_r($this->db->last_query()); } - //print_r($data['pd_processed_forms'][24]);die(); + //print_r(json_decode($data['pd_processed_forms'][18][0]['processed_json']));die(); //print_r($data['pd_images']);die(); //print_r(json_decode($data['pd_processed_forms'][14][0]['processed_json'],true)); //die(); @@ -5684,8 +5684,8 @@ public function getPDFormDetailsJSON_post() $t = $this->load->view('report_templates/JSONTOREPORT',$data,true); } //$t = $this->load->view('temp_html.html',null,true); - //echo $t; - //die(); + echo $t; + die(); $total_replaces = substr_count($t,''); for($i = 0 ;$i < $total_replaces;$i++) @@ -6725,6 +6725,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $is_show_report = isset($doc['is_show_report']) ? $doc['is_show_report'] : null; //$external_path = $this->config->item('external_data_path'); $output_file = $this->external_path."/pd_reports/". $pd_id ."/temp_base64_image.jpeg"; + //Generate Random File Name $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -6755,7 +6756,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext); imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a')); - imagejpeg($imagetobewatermark,$output_file);//save as png file in ouputfile location + imagejpeg($imagetobewatermark,$output_file,100);//save as png file in ouputfile location //################# end img water marking with text @@ -6765,9 +6766,9 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $sx = imagesx($curret_file); $sy = imagesy($curret_file); // imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool - imagecopyresized ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); + imagecopyresampled ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); - imagejpeg($curret_file,$output_file);// save png image in specified location + imagejpeg($curret_file,$output_file,100);// save png image in specified location //###########end of image water marking with logo $tempdoc = $output_file; @@ -6810,7 +6811,121 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() $result['msg'] = "Some Images Not Saved!"; } return $result; - } + } + + + public function saveBase64Images_new($pd_id,$form_id = null,$company_id = null,$rental_count_id = null,$data) + { + + + $count = 0; + $result = array(); + $pks = array(); + $pd_details = $this->PD_Model->getPDMasterDetails($pd_id); + //print_r($data);die(); + EXTERNAL_DIR_CHECK::checkExternalDirectory($pd_id); + foreach($data as $iter => $doc) + { + $temp_base64_string = $doc['image']; + $title = $doc['Name']; + $is_show_report = isset($doc['is_show_report']) ? $doc['is_show_report'] : null; + //$external_path = $this->config->item('external_data_path'); + $output_file = $this->external_path."/pd_reports/". $pd_id ."/temp_base64_image.jpeg"; + + + //Generate Random File Name + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < 5; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + $temp_file_name = $randomString.date('Y-m-d-H:i:s').'.jpeg'; + + + $ifp = fopen( $output_file, 'wb' ); + $temp_data = explode( ',', $temp_base64_string ); + // fwrite( $ifp, base64_decode( $temp_data[ 1 ] ) ); + //fclose( $ifp ); + $image_p = imagecreatetruecolor(500, 375); + + + // ################### start img water marking with text + //echo $temp_base64_string; + + $imagetobewatermark = imagecreatefromstring( base64_decode( $temp_data[ 1 ] )); + + $location_watermarktext="Location: ".$doc['link']; + $font = APPPATH."docs/robold.ttf"; //metion font and it's location + $fontsize="12"; + $x = imagesx($imagetobewatermark); + $y = imagesy($imagetobewatermark); + + $water_mark_text_color = imagecolorallocate($imagetobewatermark, 225, 0, 0); + imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext); + + imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a')); + + //imagejpeg($imagetobewatermark,$output_file,100);//save as png file in ouputfile location + // die(); + //################# end img water marking with text + + + //###########image water marking with logo + $pd_logo = imagecreatefromstring(file_get_contents(APPPATH.'docs/icon.png')); + $curret_file = $imagetobewatermark; + $sx = imagesx($curret_file); + $sy = imagesy($curret_file); + // imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool + //imagecopyresized ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); + + // imagecopyresampled ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool + imagecopyresampled ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); + + imagejpeg($curret_file,$output_file,100);// save png image in specified location + //###########end of image water marking with logo + //die(); + $tempdoc = $output_file; + $tempdocname = $temp_file_name; + $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_details[0]['fk_lender_id']; + $key = 'pd'.$pd_id.'/'.$tempdocname; + // if($form_id != null) + // { + // $key = 'pd'.$pd_id.'/'.'form'.$form_id.'/'.$tempdocname; + // } + $sourcefile = $tempdoc; + + $bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile); + $s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data); + + if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200) + { + $record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname,'fk_form_id'=>$form_id,'is_show_report' =>$is_show_report,'rental_count_id' => $rental_count_id,'location' => $doc['link']); + $record_data['company_id'] = $company_id ? $company_id : null; + $id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS); + if($id != null || $id != "") { $count++; $pks[] = $id;} + } + + } + + if($count == count($data)) + { + //$logger->info('All Images Saved Sucessfully',array($pd_id,$form_id,$company_id)); + $result['status'] = true; + $result['count'] = $count; + $result['pks'] = $pks; + $result['msg'] = "All Images Saved Successfully"; + } + else + { + //$logger->info('Some Images Not Saved',array($pd_id,$form_id,$company_id)); + $result['status'] = true; + $result['count'] = $count; + $result['pks'] = $pks; + $result['msg'] = "Some Images Not Saved!"; + } + return $result; + } public function calculateScore($pdid) { diff --git a/api/application/helpers/inlinephototransform_helper.php b/api/application/helpers/inlinephototransform_helper.php index 12454ec9..30900a1b 100644 --- a/api/application/helpers/inlinephototransform_helper.php +++ b/api/application/helpers/inlinephototransform_helper.php @@ -160,7 +160,7 @@ class INLINEPHOTOTRANSFORM imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext); imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a')); - imagejpeg($imagetobewatermark,$output_file);//save as png file in ouputfile location + imagejpeg($imagetobewatermark,$output_file,100);//save as png file in ouputfile location //################# end img water marking with text //###########image water marking with logo @@ -169,9 +169,9 @@ class INLINEPHOTOTRANSFORM $sx = imagesx($curret_file); $sy = imagesy($curret_file); // imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool - imagecopyresized ( $curret_file , $pd_logo , 5 , ($y - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); + imagecopyresampled ( $curret_file , $pd_logo , 5 , ($y - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); - imagejpeg($curret_file,$output_file);// save png image in specified location + imagejpeg($curret_file,$output_file,100);// save png image in specified location //###########end of image water marking with logo diff --git a/api/application/helpers/rentalform_helper.php b/api/application/helpers/rentalform_helper.php index b892e527..c96782a8 100644 --- a/api/application/helpers/rentalform_helper.php +++ b/api/application/helpers/rentalform_helper.php @@ -6,6 +6,9 @@ class Rentalform public static function getRentalText($rental_data){ //print_r($rental_data);die(); + + $rupee_symbol = ""; + $address_property = $rental_data['address_property']; $address_property = str_replace("\n",' ',$address_property); $address_property .= ' ,'.$rental_data['city_master'].' ,'.$rental_data['state_master'].' - '.$rental_data['pincode_master'].'.'; @@ -50,13 +53,13 @@ class Rentalform $property_showing_persons_name = substr_replace($property_showing_persons_name,' ',strrpos($property_showing_persons_name,','),1); - if(strrpos($property_owners_name,',')) + if(strrpos($property_showing_persons_name,',')) { $property_showing_persons_name = substr_replace($property_showing_persons_name,' and ',strrpos($property_showing_persons_name,','),1); } $property_document_proof_visted = $rental_data['property_ownership_proof_documents'] == 1 ? 'Yes': 'No'; - $type_of_document_visited = (substr_count($rental_data['sighted_documents']['name'], 'Others')) ? $rental_data['other_sighted_documents'] : $rental_data['sighted_documents']['name']; + $type_of_document_visited = ( $rental_data['property_ownership_proof_documents'] == 1 && substr_count($rental_data['sighted_documents']['name'], 'Others') ) ? $rental_data['other_sighted_documents'] : (isset($rental_data['sighted_documents']['name'] ) ? $rental_data['sighted_documents']['name'] : ''); $property_remark = $rental_data['rental_remark']; $third_check_details = array(); @@ -72,25 +75,186 @@ class Rentalform foreach ($rental_data['property_unit_details'] as $u_key => $unit) { $temp = array(); + + $header_row = 'Particulars As Per Agreement As Per Applicant As Per Tenant '; + $first_owners_row = 'Property Owner Name'; + $second_lessee_name_row = 'Lessee Name'; + $third_area_of_unit_row = 'Area of Unit'; + $fourth_payment_mode_row = 'Payment Mode'; + $fifth_lease_period_row = 'Lease Period'; + $sixth_security_deposit_row = 'Security Deposit'; + $eigth_current_rent_received_row = 'Rent Received (Rs/ per month)'; + $nineth_difference_between_rent_amount_row = 'Reason for difference between Rent Amount'; //if($unit['tenant_lessees_options'] == 1) { $temp['lesse_name'] = $unit['name_tenant_lessees'];} else { $temp['lesse_name'] = 'Not Available' ; } - $temp['agreement_tenant_lessees_name'] = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']: ( isset($unit['name_tenant_lessees']) ? $unit['name_tenant_lessees'] : 'Not Provided
('. $unit['name_tenant_lessees_reason'] .')' ); - $temp['agreement_monthly_rent_amount'] = isset($unit['agreement_monthly_rent_amount']) ? $unit['agreement_monthly_rent_amount'] : $unit['monthly_rent_amount']; - $temp['agreement_security_deposit_amount'] = isset($unit['agreement_security_deposit_amount']) ? $unit['agreement_security_deposit_amount']: $unit['securtity_deposit_amount']; - $temp['property_cover_area'] = $unit['property_cover_area'] .' '. $unit['unit_measurement']['name']; - $temp['payment_mode'] = $unit['payment_mode']['name'].'
('; - $temp['payment_mode'] .= isset($unit['amount_received_bank']) ? 'from bank: ' . $unit['amount_received_bank'] : ''; - $temp['payment_mode'] .= isset($unit['amount_received_cash']) ? ' from cash: ' .$unit['amount_received_cash'] : ''; - $temp['payment_mode'] .= ')'; - $temp['rent_agreement_executed'] = $unit['is_rent_agreement_executed'] == 1 ? 'Yes' : 'No' ; + + // As per Agreement + $owners_name_agreement = ''; + if(isset($unit['agreement_property_owners_name']) && count($unit['agreement_property_owners_name'])) + { + foreach($unit['agreement_property_owners_name'] as $key => $value) + { + if($value['id'] != 0) + { + $owners_name_agreement .= $value['name'].' ,'; + } + else + { + //$owners_name_agreement .= $value['other_person_met'].' , '; + } + } + + $owners_name_agreement = substr_replace($owners_name_agreement,' ',strrpos($owners_name_agreement,','),1); + + if(strrpos($owners_name_agreement,',')) + { + $owners_name_agreement = substr_replace($owners_name_agreement,' and ',strrpos($owners_name_agreement,','),1); + } + } - // echo $unit['agreement_date']; - // echo explode('T',$unit['agreement_date'])[0]; - // echo date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y');die(); + if($owners_name_agreement == '') + { + $owners_name_agreement = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']:($unit['is_rent_agreement_executed'] != 1 ? 'Rent Agreement Not Executed' : ($unit['rent_agreement_seen'] != 1 ? 'Rent Agreement Not Seen' : '')); + } + + $agreement_tenant_lessees_name = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']:($unit['is_rent_agreement_executed'] != 1 ? 'Rent Agreement Not Executed' : ($unit['rent_agreement_seen'] != 1 ? 'Rent Agreement Not Seen' : '')); - $temp['leease_period'] = isset($unit['agreement_date']) ? 'lease start from '. date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y') .' to '.date_format(date_create_from_format("d/m/Y",$unit['agreement_expiring_date']),'M-Y') : 'NA'; - array_push($unit_wise_details,$temp); + $lease_period = isset($unit['agreement_date']) ? 'lease start from '. date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y') .' to '.date_format(date_create_from_format("d/m/Y",$unit['agreement_expiring_date']),'M-Y') : ($unit['is_rent_agreement_executed'] != 1 ? 'Rent Agreement Not Executed' : ($unit['rent_agreement_seen'] != 1 ? 'Rent Agreement Not Seen' : '')); + + $agreement_security_deposit_amount = isset($unit['agreement_security_deposit_amount']) ? $rupee_symbol.' '.$unit['agreement_security_deposit_amount']: ($unit['is_rent_agreement_executed'] != 1 ? 'Rent Agreement Not Executed' : ($unit['rent_agreement_seen'] != 1 ? 'Rent Agreement Not Seen' : '')); + + $agreement_monthly_rent_amount = isset($unit['agreement_monthly_rent_amount']) ? $rupee_symbol.' '.$unit['agreement_monthly_rent_amount'] : ($unit['is_rent_agreement_executed'] != 1 ? 'Rent Agreement Not Executed' : ($unit['rent_agreement_seen'] != 1 ? 'Rent Agreement Not Seen' : '')); + + //As per Applicant + $tentant_name_applicant = ( isset($unit['name_tenant_lessees']) ? $unit['name_tenant_lessees'] : 'Not Provided
'.(isset($unit['name_tenant_lessees_reason']) ? '('. ($unit['name_tenant_lessees_reason']) .')' : '')); + + $property_cover_area = $unit['property_cover_area'] .' '. $unit['unit_measurement']['name']; + + $payment_mode = $unit['payment_mode']['name'].'
('; + $payment_mode .= isset($unit['amount_received_bank']) ? 'from bank: ' . $unit['amount_received_bank'] : ''; + $payment_mode .= isset($unit['amount_received_cash']) ? ' from cash: ' .$unit['amount_received_cash'] : ''; + $payment_mode .= ')'; + $payment_mode .= isset($unit['payment_received_reason']) && $unit['payment_received_reason'] != '' ? '
Reason for receiving multiple payment Mode - '. $unit['payment_received_reason'] :''; + $securtity_deposit_amount = $rupee_symbol.' '.$unit['securtity_deposit_amount']; + $monthly_rent_amount = $rupee_symbol.' '.$unit['monthly_rent_amount']; + + + //As per Tentant + $owners_name_tentant = ''; + if(isset($unit['property_owner_per_met']) && count($unit['property_owner_per_met'])) + { + foreach($unit['property_owner_per_met'] as $key => $value) + { + if($value['id'] != 0) + { + $owners_name_tentant .= $value['name'].' ,'; + } + else + { + $owners_name_tentant .= $unit['property_owner_other_per_met'].' , '; + } + } + + $owners_name_tentant = substr_replace($owners_name_tentant,' ',strrpos($owners_name_tentant,','),1); + + if(strrpos($owners_name_tentant,',')) + { + $owners_name_tentant = substr_replace($owners_name_tentant,' and ',strrpos($owners_name_tentant,','),1); + } + + } + + + if($owners_name_tentant == '') + { + + $owners_name_tentant = isset($unit['met_tenant_lessees_options']) && $unit['met_tenant_lessees_options'] != 1 ? ('Tenant Not Met'.(isset($unit['name_tenant_lessees_reason_per_met']) ? ('
('. $unit['name_tenant_lessees_reason_per_met'].')') :'')) :''; + } + $name_tenant_lessees_per_met = isset($unit['name_tenant_lessees_per_met']) ? $unit['name_tenant_lessees_per_met'] : ('Tenant Not Met'); + + $payment_mode_tentant = isset($unit['payment_mode_per_met']['name']) ? $unit['payment_mode_per_met']['name'].'
(' : ''; + $payment_mode_tentant .= isset($unit['amount_received_bank_per_met']) ? 'from bank: ' . $unit['amount_received_bank_per_met'] : ''; + $payment_mode_tentant .= isset($unit['amount_received_cash_per_met']) ? ' from cash: ' .$unit['amount_received_cash_per_met'] : ''; + $payment_mode_tentant .= ')'; + $payment_mode_tentant = isset($unit['met_tenant_lessees_options']) && $unit['met_tenant_lessees_options'] != 1 ? 'Tenant Not Met' : $payment_mode_tentant; + $payment_mode_tentant .= isset($unit['payment_received_reason_per_met']) && $unit['payment_received_reason_per_met'] != '' ? '
Reason for receiving multiple mode - '.$unit['payment_received_reason_per_met'] : ''; + + $lease_period_tentant = isset($unit['period_of_stay_per_met']) ? $unit['period_of_stay_per_met'].' Months' : 'Tenant Not Met'; + + + $rent_tentant = isset($unit['paid_monthly_rent_per_met']) ? $rupee_symbol.' '.$unit['paid_monthly_rent_per_met'] : 'Tenant Not Met'; + $payment_difference_per_met = isset($unit['payment_difference_per_met']) ? $unit['payment_difference_per_met'] : 'Tenant Not Met'; + + // $temp['agreement_tenant_lessees_name'] = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']: ( isset($unit['name_tenant_lessees']) ? $unit['name_tenant_lessees'] : 'Not Provided
('. $unit['name_tenant_lessees_reason'] .')' ); + // $temp['agreement_monthly_rent_amount'] = isset($unit['agreement_monthly_rent_amount']) ? $unit['agreement_monthly_rent_amount'] : $unit['monthly_rent_amount']; + // $temp['agreement_security_deposit_amount'] = isset($unit['agreement_security_deposit_amount']) ? $unit['agreement_security_deposit_amount']: $unit['securtity_deposit_amount']; + // $temp['property_cover_area'] = $unit['property_cover_area'] .' '. $unit['unit_measurement']['name']; + // $temp['payment_mode'] = $unit['payment_mode']['name'].'
('; + // $temp['payment_mode'] .= isset($unit['amount_received_bank']) ? 'from bank: ' . $unit['amount_received_bank'] : ''; + // $temp['payment_mode'] .= isset($unit['amount_received_cash']) ? ' from cash: ' .$unit['amount_received_cash'] : ''; + // $temp['payment_mode'] .= ')'; + // $temp['rent_agreement_executed'] = $unit['is_rent_agreement_executed'] == 1 ? 'Yes' : 'No' ; + // $temp['rent_agreement_seen'] = isset($unit['rent_agreement_seen']) && $unit['rent_agreement_seen'] == 1 ? 'Yes' : 'No' ; + // $temp['rent_agreement_registered'] = isset($unit['rent_agreement_registered']) && $unit['rent_agreement_registered']== 1 ? 'Yes' : 'No' ; + + $first_owners_row .= ''. $owners_name_agreement .''.$property_owners_name.''. $owners_name_tentant .''; + $second_lessee_name_row .= ''. $agreement_tenant_lessees_name .''.$tentant_name_applicant.''. $name_tenant_lessees_per_met .''; + $third_area_of_unit_row .= '-'.$property_cover_area.'-'; + $fourth_payment_mode_row .= '-'. $payment_mode .''. $payment_mode_tentant .''; + $fifth_lease_period_row .= ''. $lease_period .'-'. $lease_period_tentant .''; + $sixth_security_deposit_row .= '' . $agreement_security_deposit_amount . ''.$securtity_deposit_amount.'-'; + $eigth_current_rent_received_row .= '' . $agreement_monthly_rent_amount .''.$monthly_rent_amount.''. $rent_tentant .''; + $nineth_difference_between_rent_amount_row .= '--'. $payment_difference_per_met .''; + + + $temp['unit_name'] = 'Unit - '.($u_key + 1); + $temp['header_row'] = $header_row; + $temp['first_owners_row'] = $first_owners_row.''; + $temp['second_lessee_name_row'] = $second_lessee_name_row.''; + $temp['third_area_of_unit_row'] = $third_area_of_unit_row.''; + $temp['fourth_payment_mode_row'] = $fourth_payment_mode_row.''; + $temp['fifth_lease_period_row'] = $fifth_lease_period_row.''; + $temp['sixth_security_deposit_row'] = $sixth_security_deposit_row.''; + $temp['eigth_current_rent_received_row'] = $eigth_current_rent_received_row.''; + $temp['nineth_difference_between_rent_amount_row'] = $nineth_difference_between_rent_amount_row.''; + + //$temp['leease_period'] = isset($unit['agreement_date']) ? 'lease start from '. date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y') .' to '.date_format(date_create_from_format("d/m/Y",$unit['agreement_expiring_date']),'M-Y') : 'NA'; + //array_push($unit_wise_details['property_core'][],$temp); + $unit_wise_details['property_core'][] = $temp; } + + $multi_storey = array(); + $over_all_multistorey_total = 0; + if(isset($rental_data['multistoried_building_details']) && count($rental_data['multistoried_building_details'])) + { + //echo 'multistoried_building_details availavle'; + foreach($rental_data['multistoried_building_details'] as $ml_key => $ml_value) + { + $multi_storey_temp['floor_name'] = $ml_value['floor_level']; + $multi_storey_temp['no_units_in_floor'] = $ml_value['no_units_in_floor']; + $multi_storey_temp['same_rent'] = $ml_value['unit_rent_difference_options'] == 1 ? 'Yes' :'No'; + $multi_storey_temp['total_floor_rent'] = $rupee_symbol.' '.$ml_value['floor_rent_amount']; + $over_all_multistorey_total += $ml_value['floor_rent_amount']; + if($ml_value['unit_rent_difference_options'] == 1) + { + $multi_storey_temp['unit_details'] = 'per unit '.$rupee_symbol.' '.$ml_value['floor_unit_details'][0]['rent_per_unit'] ; + } + else + { + $units_to_dispaly = ''; + foreach($ml_value['floor_unit_details'] as $u_k => $u_v) + { + $units_to_dispaly .= 'Unit-'.($u_k + 1) .' - '.$rupee_symbol.' '.$u_v['rent_per_unit'].'
'; + } + $multi_storey_temp['unit_details'] = $units_to_dispaly; + } + $multi_storey[] = $multi_storey_temp; + + } + } + //print_r($multi_storey); + $unit_wise_details['multistorey'] = $multi_storey; + $unit_wise_details['multistorey_over_all_total'] =$over_all_multistorey_total; //print_r($unit_wise_details); return array('address_property' => $address_property,'type_of_property' => $type_of_property,'property_owners_name' => $property_owners_name,'property_showing_persons_name' => $property_showing_persons_name,'property_document_proof_visted' => $property_document_proof_visted,'type_of_document_visited' => $type_of_document_visited,'no_of_floors' => $no_of_floors, 'area_coverd' => $area_coverd,'area_uom' => $area_uom,'unit_details' => $unit_wise_details,'property_remark' => $property_remark,'third_check_details' => $third_check_details,'unit_type' => $unit_type); } diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 5e5fa23e..8e7ece8a 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -41,7 +41,8 @@ class PD_Model extends SPARQ_Model { if($pdofficerid != "" || $pdofficerid != null) { - if($pdofficerid != 52) //support pd officer user id + + if($pdofficerid != 52 && $pdofficerid != 229 ) //support pd officer user id { $this->db->WHERE('PDTRIGGER.fk_pd_allocated_to',$pdofficerid); } @@ -77,6 +78,11 @@ class PD_Model extends SPARQ_Model { $this->db->WHERE('PDTRIGGER.fk_city',$lender_details['pd_branch_id']); } + if(isset($lender_details['lender_credit_person'])) + { + $this->db->WHERE('PDTRIGGER.lender_credit_person',$lender_details['lender_credit_person']); + } + } @@ -114,7 +120,7 @@ class PD_Model extends SPARQ_Model { $this->db->ORDER_BY('PDTRIGGER.pd_id',$sort); $this->db->LIMIT($limit,$page); $result_array = $this->db->GET()->result_array(); - // print_r($this->db->last_query());die(); + //print_r($this->db->last_query());die(); if(count($result_array) != 0) { foreach($result_array as $key => $result) diff --git a/api/application/views/js/phantomchart.js b/api/application/views/js/phantomchart.js index 99f9a6b1..ed179a4d 100644 --- a/api/application/views/js/phantomchart.js +++ b/api/application/views/js/phantomchart.js @@ -1 +1 @@ -var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 75.5;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/testing/pd_reports/900/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);}); \ No newline at end of file +var page = require('webpage').create();page.viewportSize = { width: 600, height: 350 };page.clipRect = { top: 0, left: 0, width: 600, height: 350 };var score = 79;var url = 'http://localhost/AWSEC2/sparqapi/api?'+score;var image_url = 'C:/xampp/htdocs/ssa_external_data/production/pd_reports/23/chart.png' ;page.open(url,function() {setTimeout(function() {page.render(image_url);phantom.exit();}, 500);}); \ No newline at end of file diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 41baa56a..668a5035 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -844,7 +844,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } else if($bsk == 'vintage_of_business_account') { - $answer = isset($business_score['answer']) ? $business_score['answer'] : 'No'; + $answer = isset($business_score['answer']) && $business_score['answer'] != '' ? $business_score['answer'] : 'No'; } else { @@ -4287,17 +4287,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if(isset($GLOBALS['is_rental_available']) && $GLOBALS['is_rental_available'] == 1) { $rental_data = array(); - $first_owners_row = 'Lessor Name / Property Owner Name'; - $second_lessee_name_row = 'Lessee Name'; - $third_property_address_row = 'Property Address'; - $fourth_type_of_property_row = 'Type of Property'; - $fifth_lease_period_row = 'Lease Period'; - $sixth_structure_of_property_row = 'Structure of Property / No of Floors vs Units'; - $seventh_security_deposit_row = 'Security Deposit'; - $eigth_current_rent_received_row = 'Current Rent Received (Rs/ per month)'; - $nineth_expense_of_management_row = 'Remarks'; - - foreach($pd_processed_forms[17] as $rental_property_key => $rental_property) { //echo $rental_property_key; @@ -4314,51 +4303,66 @@ defined('BASEPATH') OR exit('No direct script access allowed'); foreach ($rental_data as $key => $value) { - echo '

Property : '.($key + 1).''; + 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 Visted : '.($value['property_document_proof_visted']).''; + 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'].'') : ''; - //print_r($value['unit_details']); - if(count($value['unit_details'])) + + if(isset($value['unit_details']['multistorey']) && count($value['unit_details']['multistorey'])) { - echo '

'; - echo ''; - $unit_wise_total_security_deposit = 0; - $unit_wise_total_rent_received = 0; - foreach ($value['unit_details'] as $u_key => $unit_value) + echo '

Multistorey Details:

'; + echo '
S.No Lessee Name Area of Unit Payment Mode Rent Agreement ExecutedLease Period Security Deposit Rent Received( per month)
'; + echo ''; + foreach($value['unit_details']['multistorey'] as $multistorey_key => $multistorey_value) { - $unit_wise_total_security_deposit += $unit_value['agreement_security_deposit_amount']; - $unit_wise_total_rent_received += $unit_value['agreement_monthly_rent_amount']; - echo ''; + echo ''; } - echo ''; + echo ''; echo '
Floor Name No of Units Rent same for
all Units
Unit Details Total
Rent Amount
'. ( $u_key + 1) .' '. $unit_value['agreement_tenant_lessees_name'] .' '. $unit_value['property_cover_area'] .' '. $unit_value['payment_mode'] .' '. $unit_value['rent_agreement_executed'] .' '. $unit_value['leease_period'] .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_value['agreement_security_deposit_amount']) .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $unit_value['agreement_monthly_rent_amount'] ).'
'. $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.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_security_deposit) .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_rent_received) .'
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 has done with ' . $value['third_check_details']['whom_third_party_check_done']; - echo isset($value['third_check_details']['description_third_party_check_done']) ? ' ('. $value['third_check_details']['description_third_party_check_done'].'). ' : ' '; - 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 - { + 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 becasue ' .$value['third_check_details']['why_third_party_check_not_done']; - } - echo '
' . $value['property_remark']; + 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']; } diff --git a/api/application/views/report_templates/JSONTOREPORT_RI.php b/api/application/views/report_templates/JSONTOREPORT_RI.php index d8c83b50..d76b56c9 100644 --- a/api/application/views/report_templates/JSONTOREPORT_RI.php +++ b/api/application/views/report_templates/JSONTOREPORT_RI.php @@ -1051,17 +1051,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if(isset($pd_processed_forms[17]) && count($pd_processed_forms[17])) { $rental_data = array(); - $first_owners_row = 'Lessor Name / Property Owner Name'; - $second_lessee_name_row = 'Lessee Name'; - $third_property_address_row = 'Property Address'; - $fourth_type_of_property_row = 'Type of Property'; - $fifth_lease_period_row = 'Lease Period'; - $sixth_structure_of_property_row = 'Structure of Property / No of Floors vs Units'; - $seventh_security_deposit_row = 'Security Deposit'; - $eigth_current_rent_received_row = 'Current Rent Received (Rs/ per month)'; - $nineth_expense_of_management_row = 'Remarks'; - - foreach($pd_processed_forms[17] as $rental_property_key => $rental_property) { //echo $rental_property_key; @@ -1078,39 +1067,54 @@ defined('BASEPATH') OR exit('No direct script access allowed'); foreach ($rental_data as $key => $value) { - echo '

Property : '.($key + 1).''; + 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 Visted : '.($value['property_document_proof_visted']).''; + 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'].'') : ''; - //print_r($value['unit_details']); - if(count($value['unit_details'])) + + if(isset($value['unit_details']['multistorey']) && count($value['unit_details']['multistorey'])) { - echo '

'; - echo ''; - $unit_wise_total_security_deposit = 0; - $unit_wise_total_rent_received = 0; - foreach ($value['unit_details'] as $u_key => $unit_value) + echo '

Multistorey Details:

'; + echo '
S.No Lessee Name Area of Unit Payment Mode Rent Agreement ExecutedLease Period Security Deposit Rent Received( per month)
'; + echo ''; + foreach($value['unit_details']['multistorey'] as $multistorey_key => $multistorey_value) { - $unit_wise_total_security_deposit += $unit_value['agreement_security_deposit_amount']; - $unit_wise_total_rent_received += $unit_value['agreement_monthly_rent_amount']; - echo ''; + echo ''; } - echo ''; + echo ''; echo '
Floor Name No of Units Rent same for
all Units
Unit Details Total
Rent Amount
'. ( $u_key + 1) .' '. $unit_value['agreement_tenant_lessees_name'] .' '. $unit_value['property_cover_area'] .' '. $unit_value['payment_mode'] .' '. $unit_value['rent_agreement_executed'] .' '. $unit_value['leease_period'] .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_value['agreement_security_deposit_amount']) .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat( $unit_value['agreement_monthly_rent_amount'] ).'
'. $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.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_security_deposit) .' '. $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($unit_wise_total_rent_received) .'
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 has done with ' . $value['third_check_details']['whom_third_party_check_done']; + 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'] != "") { @@ -1120,7 +1124,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); else { - echo '
For property '.($key + 1).' Third Party check not done becasue ' .$value['third_check_details']['why_third_party_check_not_done']; + 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']; @@ -1301,7 +1306,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> - (Details Available in Annexure B)'; $GLOBALS['is_rental_available'] = 1 ; } ?> + diff --git a/api/application/views/report_templates/JSONTOREPORT_karthick.php b/api/application/views/report_templates/JSONTOREPORT_karthick.php deleted file mode 100644 index 1ed98c5c..00000000 --- a/api/application/views/report_templates/JSONTOREPORT_karthick.php +++ /dev/null @@ -1,3043 +0,0 @@ - - - - - - - - - - - - - - -
-
- Copyright@Sineedge -
-
- -
-
-
- - - - -
"; - ?> -
"; - - echo "
"; - echo "

PERSONAL DISCUSSION REPORT

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

".$main_applicant_name."

"; - echo "
"; - echo "



"; - ?> - - - "; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - ?> - -
PD Initiated Date ".$pd_master_details[0]['pd_date_of_initiation']."
PD Vist 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
Loan 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])."
- - Loan Amount Applied For :

"; - echo ' - -
As Per PD Initiation ' . MYUTIL::customIndianNumberFormat($pd_master_details[0]['loan_amount']). '
('. MYUTIL::numtowords($pd_master_details[0]['loan_amount']) .')
As Per Loan Applicants during PD ' . MYUTIL::customIndianNumberFormat($loan_form['loan_amount']). '
('. MYUTIL::numtowords($loan_form['loan_amount']) .')
'; - //echo "
"; - echo "

"; - ?> - - - - - - $individual) - { - - if($individual['is_person_met'] == true) - { - //array_push($person_met_images); - $temp_person_met = array(); - $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'] = isset($individual['is_person_met_pic']) ? $individual['is_person_met_pic'] : null; - $temp_person_met['id_proof'] = isset($individual['is_person_met_id_proof']) ? $individual['is_person_met_id_proof'] : null; - $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']);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'] && isset($persons_with_relationship['relationship'])) - { - $RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find"; - 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); - - //echo $company_relationship_data; - //echo substr_replace($company_relationship_data, '

', strrpos($company_relationship_data, '
and

'),strlen($company_relationship_data)); - - //echo '
'; - - } - } - - //print_r($person_met_data); - // echo ''; - // echo ''; - // echo ''; - // foreach($person_met_data as $person) - // { - - // echo ''; - - // } - // echo ''; - // echo '
Name Photo ID Proof Relationships
'.$person['name'].''.'NA'.''.'NA'.''.$person['relations'].'
'; - - // echo '


'; - echo '

Person(s) Met:

'; - echo '
'; - foreach($person_met_data as $pk => $person) - { - - echo '

'.$person['name'].'

'; - echo '

'.$person['relations'].'

'; - echo '

'; - if($person['photo']) - { - echo ''; - } - echo '          '; - if($person['id_proof']) - { - echo ''; - } - echo '

'; - echo count($person_met_data) != ($pk+1)? '
':''; - - } - echo '
'; - echo '
'; - ?> - - Person(s) Met: '; - // foreach($person_met_data as $person) - // {?> - - - - -
-
-

Loan Applicants:

- - - - - - $individual) - { - - if($individual['is_applicant'] == 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.'**************************'; - echo '"; - } - } - ?> - -
Name Age
(Yrs)
Qualification Relationships
'.$individual['applicant_title_name_master'].' '.$applicant_name.''.$individual['age'].''.$education_qualification.''; - - $company_relationship_data = null; - //print_r($general_form['company_with_relationships']); - foreach($general_form['company_with_relationships'] as $company_with_relationship) - { - - //print_r($company_with_relationship); - if($individual['pd_co_applicant_id'] == $company_with_relationship['applicant_name']) - { - //FInd Company Name from JSON - - //echo "ONCE"; - $company_relationship_data = ($company_with_relationship['company_relationship_master'] .' '.$company_with_relationship['company_name']); - - $company_relationship_data.='
and

'; - } - } - //echo '*********'.$company_relationship_data.'*********'; - //echo strrpos($company_relationship_data, ''); - // $company_relationship_data = substr_replace($company_relationship_data, '', strrpos($company_relationship_data, '
and

'),strlen($company_relationship_data)); - // echo $company_relationship_data; - $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'])) - { - - $RSNA = isset($persons_with_relationship['relation_to_master']) ? $persons_with_relationship['relation_to_master'] : " Could Not Find"; - 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 "
-
- - - - - - - - - "; - echo "

PD Score Summary

"; - - ?> - - - - - - - - - -
Actual Score Max Score Score %
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 ########################### - } - ?> - - - -

PD LOCATION

- -

PD Location Address : '.$pd_address['address'].' ,'.$pd_address['city_master'].' ,'.$pd_address['state_master'].' - '.$pincode; - echo '

GPS Coordinates of location where PD Visit was done : '.$pd_master_details[0]['start_location']; - echo '

'; - ?> - - alt="Satellite Image of location of Where PD was Done" style="width:500px;height:200px;" />


- - -

Location Summary

- 'well suited','fairly_suited' => 'fairly suited','not_suited' => 'not suited'); - $address_type = $pd_address['address_type_master']; - $estimated_area = $pd_address['estimated_area'].' '; - $estimated_area .= $pd_address['uom_others'] != "" || $pd_address['uom_others'] != null ? $pd_address['uom_others'] : $pd_address['uom_master']; - $locality = $pd_address['locality_master']; - $locality = preg_match("/^[aeiouAEIOU]/U", $locality) ? 'an '.$locality : 'a '.$locality; - $property_owner_type = $business_assets_details['business_assets_for_address'][0]['business_ownership_type']; - if($property_owner_type == 'rented') { $property_owner_type ='Rented (Rent Rs'.$business_assets_details['business_assets_for_address'][0]['business_monthly_rented_amt'].' Per Month)'; }else{$property_owner_type = 'Owned'; } - $yrs_being_run = $business_assets_details['business_assets_for_address'][0]['business_years'].' Years'; - if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';} - - echo '

'; - echo "The PD visit was done at ". $address_type. " of the loan applicants. "; - echo "The ".$address_type." is ".$property_owner_type." and the business has - been operation from here for the last $yrs_being_run."; - echo "

The ".$address_type." is located in ".$locality." and the estimated area of the office is ".$estimated_area." ."; - echo "

The PD location was ". $pd_address['pd_location_master'].", and the locality in which the ".$address_type ." is situated is ".$pd_address['comment_locality_master'] .", as per the general observations made during the visit by PD officer."; - echo "

The PD officer also made the following observations:" ; - echo "

"; - - if($address_form['address_form_remark']) - { - echo $address_form['address_form_remark'];} - echo "

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

LOAN DETAILS:

- 'Total Loan Amount applied for','details' => "".$loan_amount.' ('.MYUTIL::numtowords($loan_form['loan_amount']).')'); - - $loan_table_dispaly_rows[] = array('particulars' => 'Loan Tenure expected','details' => $loan_form['loan_tenure'].' Months'); - - $end_use = 'For '; - foreach($loan_form['end_use_master'] as $enduse) - { - if(strpos(strval($enduse), 'Others') === false) { $end_use.= $enduse.' and ';}else{ $end_use.=$loan_form['end_use_other'].' and'; } - } - $end_use = substr_replace($end_use, '', strrpos($end_use, 'and'),strlen($end_use)); - - $loan_table_dispaly_rows[] = array('particulars' => 'Loan 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']).' ('.MYUTIL::numtowords($loan_form['topup_amount']).')'); - - $loan_table_dispaly_rows[] = array('particulars' => 'End Use Topup','details' => ($loan_form['end_use_topup_master'])); - - - $loan_table_dispaly_rows[] = array('particulars' => 'Balance Transfer from','details' => $loan_form['lender_master']); - - } - else{ - - $loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' ); - $source_of_own_contribution = null; - - foreach($loan_form['source_of_own_contribution_master'] as $own_source) - { - if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_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); - } - - $loan_table_dispaly_rows[] = array('particulars' => 'EMI Comfortable Paying','details' => $rupee_symbol.MYUTIL::customIndianNumberFormat($loan_form['emi_level']).'('.$rupee_symbol.MYUTIL::numtowords($loan_form['emi_level']).')' ); - - $loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => $loan_form['property_type_master']); - - $owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; } - $owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list)); - $loan_table_dispaly_rows[] = array('particulars' => 'Name of the current / proposed owner(s) of the Property being Mortgaged','details' => $owners_list); - - $loan_table_dispaly_rows[] = array('particulars' => 'Status of Construction','details' => $loan_form['construction_status_master']); - - $loan_table_dispaly_rows[] = array('particulars' => 'Estimated Market Value of the property being mortgaged','details' => $rupee_symbol.MYUTIL::customIndianNumberFormat($loan_form['emv_per_customer']).'('.MYUTIL::numtowords($loan_form['emv_per_customer']).')'); - - //print_r($loan_table_dispaly_rows);die(); - ?> -

- - - - $row) - { - echo '"; - } - ?> - -
S.No Loan Particulars Loan 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++) - { - - // $temp_show = null; - // if($temp_show == null) - // { - ?> -
- 0) - { - $bindEachResult['company_employees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.'; - }else{ - $bindEachResult['company_employees'].= ' and no temporary employess with company'; - } - 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']='At the time of PD visit, PD officer could not able to see any of employees 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'] : '')); - } - 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'] : '' )); - } - 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'] : '')); - } - 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'] : ''); - } - 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'] : ''); - } - 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'] : ''); - } - if(strtoupper($businessRow['other_documents'])=='YES' && array_key_exists('documents',$businessRow)){ - foreach($businessRow['documents'] as $docValue){ - array_push($getDocuments,array('name' => $docValue['document'].'.', 'img' => '')); - } - } - $bindEachResult['visit_documents']=$getDocuments; - array_push($businessResult,$bindEachResult); - - - //print_r($businessResult); - ?> -

BUSINESS INFORMATION:

- $fetchRow){ - ?> - -

-
Company / Firm Name :
-
Business Entity Type :
- -
Date of Incorporation :
- -
Business Vintage : -

- - -

- - - - - - - - - - - - - - - - - - - - - - - - -
NameShare HoldingNo.of Years in Current BusinessTotal Work ExperiencePrevious ExperienceStarted Business
- - - 0){ ?> -
-

Other Family Members involved in business :

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

Type of Business Activity : Manufacturing

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

Brief of the Business / Service Model

- - - - - - - - - - -
Product / Service Process Brief
- - - - - - - - 0){ ?> -
-

Type of Business Activity : Retail Trading

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

Brief of the Business / Service Model

- - - - - - - - - - -
Product / Service Process Brief
- - - - - - - 0){ ?> -
-

Type of Business Activity : Service Provider

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

Brief of the Business / Service Model

- - - - - - - - - - -
Product / Service Process Brief
- - - - - - - 0){ ?> -
-

Type of Business Activity : Wholesale Trading

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

Brief of the Business / Service Model

- - - - - - - - - - -
Product / Service Process Brief
- - - - - - 0){ ?> -
-

Other activity details are as under :

-
- - - - - - - - - - - - - - -
Other Business Activity
- - - - - - - - - - - - -

- - - - -

-

- - - - -

The below documents were sighted during the visit :

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

Assets used in Buisness

- -

- - - - - - - - - - - - $baRow){ - if(isset($baRow['business_assets_mode_master'])) - { - $rent_amount = isset($baRow['rent_amount']) ? $rupee_symbol.MYUTIL::customIndianNumberFormat((double)$baRow['rent_amount']): '0.00'; - ?> - - - - - - - - - -
S.NoAsset TypeAsset DescriptionOwnershipMonthly Rent
- - - -

Business asset is not available.

- - - - - -
- ↑ /'; - $baRow = $pd_processed_forms[14][$business_count]; - $businessFinancialRow = json_decode($baRow['processed_json'],true); - //print_r($businessFinancialRow);die(); - // statementdate_per_financial - 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['statements']=FINANCIALFORM::getBusinessFinancialDetails($businessFinancialRow['date_per_financial']); - } - else { - $bindBusinessFinancial["company_name"] =MYUTIL::findCompanyName($all_company_details,$businessFinancialRow['company_id'],1); - //$bindBusinessFinancial["company_name"] .=' not provided the financial statements :'; - $bindBusinessFinancial['statements']=array(); - } - // customer - if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && (!isset($businessFinancialRow['estimated_value']))){ - $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are as below :"; - $bindBusinessFinancial['customer_statements']=array(); - $bindBusinessFinancial['customer_statements_header']=array(); - } - else if(strtoupper($businessFinancialRow['is_financial_customer'])!='YES' && count($businessFinancialRow['estimated_value'])>0){ - $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']); - } - else { - $bindBusinessFinancial["financial_customer"] ="As per Loan Applicant(s) met, the financials are same as financial statement."; - $bindBusinessFinancial['customer_statements']=array(); - $bindBusinessFinancial['customer_statements_header']=array(); - } - $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'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; - $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; - 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; - } - } - - - $bindBusinessFinancial['working_capital_facilites'] = $businessFinancialRow['select_working_capital_facilities_availed']; - - - //print_r($bindBusinessFinancial['select_working_capital_facilities_availed']);die(); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']); - - array_push($businessFinancialResult,$bindBusinessFinancial); - - ?> - - 0){ ?> -

Financial Information

- -

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:"; ?>

- 0){ ?> - - - - - "."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
- - - - -

- 0){ - //print_r($iterateFinance['customer_statements']);die(); - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Particulars Range provided Final Considered
From To
Sales / Revenue (Rs)
Net Profit or (Net Loss) to Sales % >
Net Profit / (Net Loss) (Rs) >>>> >
Sales / Revenue (Rs)
Net Profit or (Net Loss) to Sales (Rs) >
Net Profit / (Net Loss)% >>>> >
- - - - - -

Working Capital Cycle:

- - - - - - - -
S.No Particulars Days
1 Debtor Days
2 Creditor Days
3 Stock Days
- -

Working Capital Facilities:

- - - - - $facility){ - - echo ' - -
S.No Facility Type Facility Details
'.(++$fk) .''.$facility['name'].' '.$facility['details'].'
- The Loan Applicants have not availed any Working Capital Facilities from any financial institution

";} ?> - - -

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']); - $bankingResult = array_merge($bankingResult,$getEachValues); - - } - - ?> - - 0){ ?> -
-

Business Banking:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account NameBank NameAccount TypeAccount VintageOD/CC Limit(Rs)Main Business AC
- - - - - - - - - - - 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)){ - - $done_on_credit += $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) - { - //print_r($main_raw_material); - $client_first_row .= ''.$main_raw_material['manufacturing_product_name'].''; - - $client_second_row .= $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_master'] : '' ; - - $client_second_row .= ' '.$main_raw_material['manufacturing_client_name'].''; - - $client_third_row .= ''. $main_raw_material['manufacturing_contact_person_mobile_number'] .''; - - $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 .= $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)){ - $done_on_credit += $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) - { - - $client_first_row .= ''.$trading_product['trade_product_name'].''; - - $client_second_row .= $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_master'] : '' ; - - $client_second_row .= ' '.$trading_product['trade_client_name'].''; - - $client_third_row .= ''. $trading_product['trade_product_contact_person_mobile_number'] .''; - - $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? ''. $trading_product['person_stdcode'].' '.$trading_product['person_landline'].'' : ''.'Not Provided'.''; - - $client_fifth_row .= $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)){ - - $done_on_credit += $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) - { - - $client_first_row .= ''.$service_product['service_provider_product_name'].''; - - $client_second_row .= $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_master'] : '' ; - - $client_second_row .= ' '.$service_product['service_provider_client_name'].''; - - $client_third_row .= ''. $service_product['service_provider_product_contact_person_mobile_number'] .''; - - $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 .= ''; - - ?> - - 0 ) - { - echo "

Client Details

"; - - ?> - - - - - - - - Client $i"; - }?> - - - - - - - - - - - - - - - - -
Sr.NoParticulars
- Out of total sales done by ".$name_of_the_company .", ".$done_on_credit."% is done on credit.

"; }?> - - - - - - - - 1Item Purchased '.''.$raw['manufacturing_raw_material_name'].''; - - $supplier_second_row = '2Contact Person '; - - $supplier_second_row .= $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_master'] : '' ; - - $supplier_second_row .= ' '.$raw['manufacturing_supplier_name'].''; - $temp['supplier_second_row'] = $supplier_second_row.''; - - $temp['supplier_third_row'] = '3Mobile Number '.''. $raw['manufacturing_contact_person_mobile_number'] .''; - - $temp['supplier_fourth_row'] = '4Landline No'; - - $temp['supplier_fourth_row'] .= $raw['person_stdcode'] && $raw['person_landline'] ? ''. $raw['person_stdcode'].' '.$raw['person_landline'].'' : ''.'Not Provided'.''; - - $temp['supplier_fifth_row'] = '5Payment Terms'; - - $temp['supplier_fifth_row'] .= $raw['manufacturing_payment_type_master'] ? ''. $raw['manufacturing_payment_type_master'] .'' : 'NA'; - - $temp['supplier_sixth_row'] = '6Payment Mode'; - - $temp['supplier_sixth_row'] .= $raw['manufacturing_payment_mode'] ? ''. $raw['manufacturing_payment_mode'] .'' : 'NA'; - - $temp['supplier_seventh_row'] = '7No of Days Credit'; - - $temp['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 - foreach(isset($clientRow['trade_details']) && $clientRow['trade_details'] as $tradeRow){ - - - $total_payments_percent_on_credit_for_supplier = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; - - if(isset($tradeRow['trading_products'])){ - - - foreach($tradeRow['trading_products'] as $trade){ - - $temp['supplier_first_row'] = '1Item Purchased '.''.$trade['trade_product_name'].''; - - $supplier_second_row = '2Contact Person '; - - $supplier_second_row .= $trade['person_title_name_master'] ? '' . $trade['person_title_name_master']: '' . ''; - $supplier_second_row .= $trade['trade_product_contact_person_name'] ; - - $supplier_second_row .= isset($trade['person_designation']) && $trade['person_designation']== 1 ? ' '.$trade['other_person_designation'] : ' ';// - - $supplier_second_row .= isset($trade['person_designation_master']) ? $trade['person_designation_master'] : '' ; - - $supplier_second_row .= ' '.$trade['trade_supplier_name'].''; - $temp['supplier_second_row'] = $supplier_second_row.''; - - $temp['supplier_third_row'] = '3Mobile Number '.''. $trade['trade_product_contact_person_mobile_number'] .''; - - $temp['supplier_fourth_row'] = '4Landline No'; - - $temp['supplier_fourth_row'] .= $trade['person_stdcode'] && $trade['person_landline'] ? ''. $trade['person_stdcode'].' '.$trade['person_landline'].'' : ''.'Not Provided'.''; - - $temp['supplier_fifth_row'] = '5Payment Terms'; - - $temp['supplier_fifth_row'] .= $trade['trade_product_payment_type_master'] ? ''. $trade['trade_product_payment_type_master'] .'' : 'NA'; - - $temp['supplier_sixth_row'] = '6Payment Mode'; - - $temp['supplier_sixth_row'] .= $trade['trade_product_payment_mode'] ? ''. $trade['trade_product_payment_mode'] .'' : 'NA'; - - $temp['supplier_seventh_row'] = '7No of Days Credit'; - - $temp['supplier_seventh_row'] .= $trade['trade_product_credit_days_from'] && $trade['trade_product_credit_days_to'] ? ''. $trade['trade_product_credit_days_from'].' to '. $trade['trade_product_credit_days_to'].' days' : 'NA'; - array_push($supplierResult,$temp); - - } - } - - } - - if(count($supplierResult)) - { - ?> -

Supplier Details

- $fetchRow){ - echo '
Supplier '.($k+1).':'; - ?> - - - - - - - - - - - - - -
Sr.NoParticularsDetails
- - - 0) - { - echo "

Have to make payment of about ". $total_payments_percent_on_credit_for_supplier ." % in advance rest on delivery.

"; - } - - }?> - - - - - - 0 || count($stockRow['manufacturing_details'][0]['manufacturing_finished_goods']) > 0))){ - - $is_raw_materials_sufficient_enough = $stockRow['manufacturing_details'][0]['is_sufficiant_raw']; - $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(); - } - - count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult; - - //print_r($stockResult);die(); - ?> - -

Stock Details

- - -

- - 0) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - 0) { ?> - - - - - - - - - - - - 0) { ?> - - - - - - - - - - - -
Sr.NoType of StockStock ItemStock Value (Rs)Stock Quantity
- Considering the size of operations, the stock of 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 goods maintained is not sufficient as per the PD Officer’s observations.

'; - } - 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.

'; - } - $stock_photo_count = $pd_images[11]; - //echo count($stock_photo_count); - - $stock_img_row_count = ceil(count($stock_photo_count) / 5); - //echo $stock_img_row_count; - if(count($stock_photo_count)){ - echo '
'; - echo '

Stock Photograph`s :

'; - echo '
'; - echo ''; - //echo ''; - - // echo '
'; - // foreach($stock_photo_count as $stock) - // { - // echo $stock['pd_document_title']; - // echo ''; - // echo '   '; - - // } - //echo ''; - for($img_row = 1; $img_row <= $stock_img_row_count; $img_row++) - { - - echo '
'; - $from = $img_row == 1 ? $img_row : ($img_row+4); - $to = ($from + 4); - 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 '
'; - } - //die(); - ?> - - - - - - - - - - Assessed Income - ".MYUTIL::findCompanyName($all_company_details,($business_count+1),1).""; - - 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 magin percentage.


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

Itemwise Purchase Details :

'; - - echo ''; - echo ''; - echo ''; - echo ''; - - echo ''; - foreach($ai_core_details_processed['purchase_to_display'] as $dat) - { - 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'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['rate']) .' '.$dat['frequency'] .' '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($dat['annual_value']) .'
'; - - } - else if($ai_core_details['gross_profit_calculation_type'][0]['mode'] == 1 &&$ai_core_details['gross_profit_calculation_type'][0]['purchase_type'] == 2) - { - echo '

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 '
'; - - } - } - - } - echo '

'; - if(isset($ai_core_details) && count($ai_core_details['sales_declared_by_customer'])) - { - $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 .= '
Also '.$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 '


'; - } - //die(); - if(isset($ai_core_details) && count($ai_core_details['sales_calculated_by_itemwise'])) - { - echo '

Sales Itemwise :

'; - echo ''; - echo ''; - echo $ai_core_details_processed['sales_calculated_by_itemwise_header']; - echo ''; - echo ''; - foreach($ai_core_details_processed['sales_item_wise_to_diaplay'] as $sid) - { - 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['sale_item'].''.$sid['sales_qty'].''.$sid['uom'].''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['rate_per_unit']).''.$sid['frequency'].''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['annual_sale_value']).''.$sid['margin_per'].''.$sid['margin_per_uom'].''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['margin_final_value']).'
'; - } - - - if(isset($ai_core_details) && count($ai_core_details['sales_items_by_monthwise'])) - { - echo "
"; - echo "

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 purchase value : '.$rupee_symbol.MYUTIL::customIndianNumberFormat($sale_month_wise['total_months_value']).' Annual Purchase value:'.$rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] * (12 / $sale_month_wise['month_count']) )).''; - } - else - { - echo 'Annual Purchase value:'. $rupee_symbol.MYUTIL::customIndianNumberFormat(($sale_month_wise['total_months_value'] )).''; - } - echo '
'; - foreach($sale_month_wise['months'] as $sale_month_data) - { - //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['sales_type'] == 2) - { - echo ''; - } - echo ''; - - echo ''; - foreach($sale_month_data['month_data'] as $month) - { - if($sale_month_wise['sales_type'] == 1) - { - echo ''; - } - else if($sale_month_wise['sales_type'] == 2) - { - echo ''; - } - } - echo ''; - - echo '
'.$sale_month_data['month_to_dispaly'].'
Date Value
Frequncy Value
'.$month['date'] .' '.$month['value'] .'
'.$month['frequency_name'] .' '.$month['frequency_value'] .'
'; - //echo '
'; - } - echo '
'; - - //} - } - } - - - if(isset($ai_core_details) && count($ai_core_details['business_expenses'])) - { - echo '

Business Expenses Details :

'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - foreach($ai_core_details_processed['business_expenses_to_diaplay'] as $b_exp) - { - 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']).'
'; - } - - if(isset($ai_core_details) && count($ai_core_details['house_hold_expenses'])) - { - echo '

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']) .'
'; - } - - - 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 "
"; - //die(); - ?> - - - - - - - - - - $oaRow) { - $otherAssetRow = json_decode($oaRow['processed_json'],true); - //print_r($otherAssetRow);die(); - //echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@"; - if(count($otherAssetRow['assets_details'])>0){ - $otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details']); - - //print_r($otherAssetResult);die(); - } - } - ?> -

Personal Assets

- 0){ ?> - - - - - - - - - - - - - - $paRow){ - ?> - - - - - - - - - - - -
Sr.NoAsset TypeAsset DescriptionAsset Owned ByApprox Market Value(Rs)Purchase YearLoan Again Assest
'. $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']) : $rupee_symbol.''.MYUTIL::customIndianNumberFormat($paRow['approximate_market_value']); ?>
- -

Personal asset is not available.

- - - - $ibRow) { - $individualBankRow = json_decode($ibRow['processed_json'],true); - //print_r($individualBankRow); - if(count($individualBankRow['banking_details'])>0){ - $getIndividualEachValues=BANKINGFORM::getIndividualBankingDetails($individualBankRow['banking_details']); - $bankingResult = array_merge($bankingResult,$getIndividualEachValues); - - } - } - - - ?> -

Personal Banking:

- 0){ - //print_r($bankingResult); - ?> -

Below bank account details were shared :

- - - - - - - - - - - - - - $bdRow){ - ?> - - - - - - - - - - - -
Sr.NoAccount Holder's NameBank NameAccount TypeOD / CC LimitVintage
- - - - - - - - - $iRow) { - $otherIcomeRow = json_decode($iRow['processed_json'],true); - // print_r($otherIcomeRow); - // echo "@@@@@@@@@@@@@@@@@@@@@"; - if(strtoupper($otherIcomeRow['other_income'])=='YES' && count($otherIcomeRow['income_details'])>0){ - $otherIncomeResult=OTHERINCOMEFORM::getIncomeDetails($otherIcomeRow['income_details']); - } - } - ?> - - 0){ - //print_r($otherIncomeResult); - ?> -

Other Sources of Income of Individual Loan Applicants:

- - - - - - - - - - - - $oiRow){ - ?> - - - - - - - - - -
Sr.NoIncome SourceEarned byAmount(Rs)
- -

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

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

Family Information:

- $fmValue) { ?> - - ";echo $residence_text; - - ?> - - -

The table below provides details of other family members of

- - - - - - - - - - - - - $fmRow){ - ?> - - - - - - - - - - -
Sr.NoNameRelationAgeEarning StatusOccupation Details
- - -

Other Family Members is not available.

- - - - - - - $elRow) { - $otherLoanRow = json_decode($elRow['processed_json'],true); - //print_r($otherLoanRow);die(); - $total_no_of_data = 0; - if(strtoupper($otherLoanRow['existing_loan'])=='YES' && count($otherLoanRow['loan_details'])>0){ - $total_no_of_data = count($otherLoanRow['loan_details']); - $existLoanResult=FINANCIALFORM::getOtherLoanDetails($otherLoanRow['loan_details']); - } - } - ?> - 0){ - //print_r($existLoanResult);die(); - - ?> -

Existing Loan Obligation

- -

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

- - - - - Loan $header";}?> - - - - - - -
Particulars
- -

As per loan applicant he doesn’t have any existing obligations

- - - - - - - - - - - $nrcRow) { - $neighbourRefRow = json_decode($nrcRow['processed_json'],true); - //print_r($neighbourRefRow); - //die(); - if(strcasecmp($neighbourRefRow['neighbourhood_status'],'could not verify')){ - $pd_offiecer_status_about_neighbor = $neighbourRefRow['neighbourhood_status']; - if(count($neighbourRefRow['neighbourhood_list'])>0){ - $company_name = MYUTIL::findCompanyName($all_company_details,1,1); - - $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getNeighbourhoodDetails($company_name,$neighbourRefRow['neighbourhood_list'],$pd_master_details[0]); - } - } - // if(&& count($neighbourRefRow['referencecheck_list'])>0){ - // $existNeighRefCheck=NEIGHBOURREFERENCECHECKFORM::getReferenceDetails($neighbourRefRow['referencecheck_list'],$pd_master_details[0]); - // } - } - ?> -

Neighbourhood / Reference Check

- 0){ - //print_r($existNeighRefCheck);die(); - ?> - - $nfValue) { - - echo '
Neighbour '.(++$nkey); - ?> - -
    -
  • -
  • -
  • -
  • - -
  • Neighbourhood Check Status is
  • - -
- - - - -

Neighbour Check was not possible due to Could not verify

- - - - - - -
-

PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS

- -
-
    -
  • Customer Behaviour:
  • - -
    - - ✔'; - ?> - - - - - - - -
    -
    Polite
    -
    -
    Rude
    -
    -
    Others mentioned as below
    -
    - - - -
    -
  • Suitability of Business Location:
  • - - - - - - - - - - - -
    -
    Well Suited
    -
    -
    Fairly Suited
    -
    -
    Not Suited
    -
    -
  • 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_positive'] as $rtc){ echo "
      • ".$rtc['reason_for_refer_to_credit']."
      • ";} - } - echo "
      "; - ?> - ".$other_command_remark."

      ";} ?> - -
      - - - - - - - - Details 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') - { - 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.'
      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 ""; - 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