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 = '| S.No | Lessee Name | Area of Unit | Payment Mode | Rent Agreement Executed | Lease Period | Security Deposit | Rent Received( per month) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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'].' | ||||||
Unit Details:
'; + foreach ($value['unit_details']['property_core'] as $u_key => $unit_value) { + echo '| S.No | Lessee Name | Area of Unit | Payment Mode | Rent Agreement Executed | Lease Period | Security Deposit | Rent Received( per month) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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'].' | ||||||
Unit Details:
'; + foreach ($value['unit_details']['property_core'] as $u_key => $unit_value) { + echo '
| PD Initiated Date | ".$pd_master_details[0]['pd_date_of_initiation']." | "; - echo "||
| PD Vist Date | ".$pd_master_details[0]['pd_visit_date']." | ||
| PD Report Date | ".$pd_master_details[0]['pd_report_generated_date']." | "; - echo "||
| 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])." |
| 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']) .') |
| Name | Photo | ID Proof | Relationships |
|---|---|---|---|
| '.$person['name'].' | '.' | '.' | '.$person['relations'].' |
Person(s) Met:
'; - echo ''.$person['name'].'
'; - echo ''.$person['relations'].'
'; - echo '';
- if($person['photo'])
- {
- echo '';
- }
- echo ' ';
- if($person['id_proof'])
- {
- echo '
';
- }
- echo '
Loan Applicants:
-| 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.=' '; - } - } - //echo '*********'.$company_relationship_data.'*********'; - //echo strrpos($company_relationship_data, ''); - // $company_relationship_data = substr_replace($company_relationship_data, '', strrpos($company_relationship_data, ' '),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.=' '; - } - } - } - $company_relationship_data .= $personal_relationship_data; - echo substr_replace($company_relationship_data, '', strrpos($company_relationship_data, ' '),strlen($company_relationship_data)); - - echo " |
| Actual Score | Max Score | Score % | |
|---|---|---|---|
| General Section Score | |||
| Business Section Score | |||
| Final Remarks Score | |||
| Final PD Score |
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 "
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(); - ?> -| S.No | Loan Particulars | Loan Particular Details |
|---|---|---|
| '.($row_key + 1)." | ".$row['particulars']." | ".$row['details'] ." |
-
Company / Firm Name :
-
Business Entity Type :
-
-
Date of Incorporation :
-
-
Business Vintage :
-
| Name | -Share Holding | -No.of Years in Current Business | -Total Work Experience | -Previous Experience | -Started Business | -
|---|---|---|---|---|---|
| - | - | - | - | - | - |
Other Family Members involved in business :
-| Name | -Individual Relationship | -Related to | -Relationship to Company / Firm | -Started Business (Yes / No) | -
|---|---|---|---|---|
| - | - | - | - | - |
Type of Business Activity : Manufacturing
-| Key Products | -Area of Operations | -Area of Sale / Service | -Area where Max Sale / Service done | -
|---|---|---|---|
| - | - | - - - - - | -- |
Brief of the Business / Service Model
-| Product / Service | Process Brief |
|---|---|
Type of Business Activity : Retail Trading
-| Key Products | -Area of Operations | -Area of Sale / Service | -Area where Max Sale / Service done | -
|---|---|---|---|
| - | - | - - - - - | -- |
Brief of the Business / Service Model
-| Product / Service | Process Brief |
|---|---|
Type of Business Activity : Service Provider
-| Services | -Area of Operations | -Area of Sale / Service | -Area where Max Sale / Service done | -
|---|---|---|---|
| - | - | - - - - - | -- |
Brief of the Business / Service Model
-| Product / Service | Process Brief |
|---|---|
Type of Business Activity : Wholesale Trading
-| Key Products | -Area of Operations | -Area of Sale / Service | -Area where Max Sale / Service done | -
|---|---|---|---|
| - | - | - - - - - | -- |
Brief of the Business / Service Model
-| Product / Service | Process Brief |
|---|---|
Other activity details are as under :
-| Other Business Activity | -
|---|
| - |
The below documents were sighted during the visit :
-|
-
-
- |
-
-
| S.No | -Asset Type | -Asset Description | -Ownership | -Monthly 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){ ?> -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){ ?> - -| Particulars | "."FY ".$bfRow['financial_year']."";}?> - -|||
|---|---|---|---|
| Sales / Revenue (Rs) | '.$rupee_symbol.''.MYUTIL::customIndianNumberFormat($bfRow['financial_sales_revenue']).'';}?>|||
| Net Profit / (Net Loss) (Rs) | '.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_profit']).'';}else{ echo '('.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($bfRow['financial_net_loss']).') | '; } }?>||
| Net Profit or (Net Loss) to Sales % | '.$bfRow['financial_margin_of_profit'].' %';}else { echo '('.$bfRow['financial_margin_of_loss'].' %) | '; } }?>||
| % () in Sales over PY | - = 0 ? ''.$bfRow['sale_variation'].' % | ' : '('.$bfRow['sale_variation'].' %) | '; - }else { echo 'NA | ';}?> - -
| % () in Net Profit over PY | - = 0 ? ''.$bfRow['profit_variation'].' % | ' :'('.$bfRow['profit_variation'].') | '; - }else - {echo 'NA | ';} }?>
| % () in Net Profit % over PY | - = 0 ? ''.$bfRow['financial_profit_to_sale_variation'].' % | ' : '('.$bfRow['financial_profit_to_sale_variation'].' %) | '; - }else { echo 'NA | ';}}?>
| 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:
- -| S.No | Facility Type | Facility Details |
|---|---|---|
| '.(++$fk) .' | '.$facility['name'].' | '.$facility['details'].' |
";} ?> - - -
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 Name | -Bank Name | -Account Type | -Account Vintage | - -OD/CC Limit(Rs) | - -Main Business AC | - -
|---|---|---|---|---|---|
| - | - | - | - - | - - | - - |
| Sr.No | -Particulars | - Client $i"; - }?> - -
|---|
| Sr.No | -Particulars | -Details | -
|---|
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(); - ?> - -| Sr.No | -Type of Stock | -Stock Item | -Stock Value (Rs) | -Stock Quantity | -
|---|---|---|---|---|
| - | - | - | - | - - - |
| - | - | - | - | - |
| - | - | - | - | - |
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 'Stock Photograph`s :
'; - echo '| ';
- echo ' ';
- echo ' ';
- echo ''.$stock_photo_count[$stock_photo_iter]['pd_document_title'].' ';
- echo ' | ';
- //unset($stock_photo_count[$stock_photo_iter]);
- }
-
- }
- //echo "
As per person met, the following Purchase details were shared:
As per person met, Purchase details were not shared, income calculated by Net magin percentage.
Itemwise Purchase Details :
'; - - 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']) .' |
Billwise Purchase Details :
'; - foreach($ai_core_details_processed['purchase_to_display'] as $billwise) - { - echo '| '.$month_data['month_to_dispaly'].' | |
|---|---|
| Date | Value |
| '.$month['date'] .' | '.$month['value'] .' |
';
- 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 '
Sales Itemwise :
'; - 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']).' | '; - if(isset($sid['margin_per'])){echo ''.$sid['margin_per'].' | '; } - if(isset($sid['margin_per_uom'])){echo ''.$sid['margin_per_uom'].' | '; } - if(isset($sid['margin_final_value'])){echo ''.$rupee_symbol.MYUTIL::customIndianNumberFormat($sid['margin_final_value']).' | '; } - - 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 '| '.$sale_month_data['month_to_dispaly'].' | |
|---|---|
| Date | Value |
| Frequncy | Value |
| '.$month['date'] .' | '.$month['value'] .' |
| '.$month['frequency_name'] .' | '.$month['frequency_value'] .' |
Business Expenses Details :
'; - 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']).' |
Household Expenses Details :
'; - 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']) .' |
The Summary of Income :
'; - echo '| Particulars | Details |
|---|
| Sr.No | -Asset Type | -Asset Description | -Asset Owned By | -Approx Market Value(Rs) | -Purchase Year | -Loan 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); - - } - } - - - ?> -Below bank account details were shared :
-| Sr.No | -Account Holder's Name | -Bank Name | -Account Type | - -OD / CC Limit | -Vintage | -
|---|---|---|---|---|---|
| - | - | - | - - | - | - |
| Sr.No | -Income Source | -Earned by | -Amount(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(); - ?> -The table below provides details of other family members of
-| Sr.No | -Name | -Relation | -Age | -Earning Status | -Occupation 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(); - - ?> -The table below lists the details of Existing Loan Obligations of the Loan Applicants.
-| Particulars | - Loan $header";}?> -
|---|
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]); - // } - } - ?> -Neighbour Check was not possible due to Could not verify
- - - - - - - -|
- Polite
- |
-
- Rude
- |
-
-
- Others mentioned as below
- |
-
|
- Well Suited
- |
-
- Fairly Suited
- |
-
-
- Not Suited
- |
-
|
- 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 "| 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,'.',',').' | |||
| 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)." |
| Final Remarks Questions L1(". $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage']."%) | L2 | Answer | Score | Attributed 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,'.',',').' | |||
| Business Questions L1(". $pd_score['business']['no_of_years_business_run']['l1_weightage']."%) | L2 | Answer | Score | Attributed Score | Max 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 | 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.' |