diff --git a/api/application/config/constants.php b/api/application/config/constants.php index afe37b78..97234c21 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -123,7 +123,7 @@ defined('PDTEAM_CTY_PRODUCT_CS_COMBINATIONS') OR define('PDTEAM_CTY_PRODUCT_CS_C /*******************Define Constants for Table Names and Primarykeys**************************/ -defined('INDUSTRYCLASSIFICATION') OR define('INDUSTRYCLASSIFICATION','m_industry_classification'); +defined('INDUSTRYCLASSIFICATION') OR define('INDUSTRYCLASSIFICATION','m_industry_classification');// #### NOT USED defined('INDUSTRYCLASSIFICATIONID') OR define('INDUSTRYCLASSIFICATIONID','industry_classification_id'); defined('PRODUCTS') OR define('PRODUCTS','m_products'); @@ -196,7 +196,7 @@ defined('COMPANYID') OR define('COMPANYID','company_id'); defined('DESIGNATION') OR define('DESIGNATION','m_designation'); defined('DESIGNATIONID') OR define('DESIGNATIONID','designation_id'); -defined('LENDERHIERARCHY') OR define('LENDERHIERARCHY','m_lender_hierarchy'); +defined('LENDERHIERARCHY') OR define('LENDERHIERARCHY','m_lender_hierarchy'); // #### NOT USED defined('LENDERHIERARCHYID') OR define('LENDERHIERARCHYID','lender_hierarchy_id'); defined('USERPROFILE') OR define('USERPROFILE','m_user_profile'); @@ -217,10 +217,10 @@ defined('USERPROFILEROLESID') OR define('USERPROFILEROLESID','user_role_id'); defined('QUESTIONS') OR define('QUESTIONS','m_questions'); defined('QUESTIONSID') OR define('QUESTIONSID','question_id'); -defined('QUESTIONANSWERTYPE') OR define('QUESTIONANSWERTYPE','m_question_answer_type'); +defined('QUESTIONANSWERTYPE') OR define('QUESTIONANSWERTYPE','m_question_answer_type'); //#### NOT USED defined('QUESTIONANSWERTYPEID') OR define('QUESTIONANSWERTYPEID','question_answer_type_id'); -defined('QUESTIONANSWERS') OR define('QUESTIONANSWERS','m_question_answers'); +defined('QUESTIONANSWERS') OR define('QUESTIONANSWERS','m_question_answers'); //#### NOT USED defined('QUESTIONANSWERSID') OR define('QUESTIONANSWERSID','question_answer_id'); defined('QUESTIONCATEGORY') OR define('QUESTIONCATEGORY','m_question_category'); @@ -325,7 +325,7 @@ defined('PDANSWERID') OR define('PDANSWERID','pd_detail_answer_id'); defined('COMMONMASTER') OR define('COMMONMASTER','h_common_masters'); defined('COMMONMASTERID') OR define('COMMONMASTERID','log_id'); -defined('QUESTIONGROUP') OR define('QUESTIONGROUP','m_question_group'); +defined('QUESTIONGROUP') OR define('QUESTIONGROUP','m_question_group'); //#### NOT USED defined('QUESTIONGROUPID') OR define('QUESTIONGROUPID','question_group_id'); defined('TEMPLATEGROUP') OR define('TEMPLATEGROUP','m_template_group'); @@ -363,7 +363,7 @@ defined('PROPERTIES') OR define('PROPERTIES','m_properties'); defined('INVESTMENTTYPE') OR define('INVESTMENTTYPE','m_investment_type'); //defined('INVESTMENTTYPEID') OR define('INVESTMENTTYPEID','investment_type_id'); -defined('INSURANCETYPE') OR define('INSURANCETYPE','m_insurance_type'); +defined('INSURANCETYPE') OR define('INSURANCETYPE','m_insurance_type'); // ##### NOT USED //defined('INSURANCETYPEID') OR define('INSURANCETYPEID','insurance_type_id'); defined('PERSONSMET') OR define('PERSONSMET','m_persons_met'); @@ -398,7 +398,7 @@ defined('PDPURCHASEDETAILS') OR define('PDPURCHASEDETAILS','t_pd_purchase_detail defined('PDPURCHASEDETAILSID') OR define('PDPURCHASEDETAILSID','purchase_id'); defined('BUSINESSEXPENSES') OR define('BUSINESSEXPENSES','m_business_expenses'); -defined('BUSINESSEXPENSESID') OR define('BUSINESSEXPENSESID','expense_id'); +defined('BUSINESSEXPENSESID') OR define('BUSINESSEXPENSESID','expense_item_id'); defined('PDBUSINESSEXPENSES') OR define('PDBUSINESSEXPENSES','t_pd_business_expenses'); defined('PDBUSINESSEXPENSESID') OR define('PDBUSINESSEXPENSESID','pd_expense_id'); @@ -472,5 +472,3 @@ defined('PDOFFICERCURRENTLOCATIONID') OR define('PDOFFICERCURRENTLOCATIONID','pd - - diff --git a/api/application/config/customconfig_one.php b/api/application/config/customconfig_one.php index 6fcbbe95..d555cd63 100644 --- a/api/application/config/customconfig_one.php +++ b/api/application/config/customconfig_one.php @@ -49,7 +49,7 @@ $config['authorization_key'] = 'sparqvenba2018'; /* End of file jwt.php */ /* Location: ./application/config/jwt.php */ -$config['master_tables_field_names'] = array('INDUSTRYCLASSIFICATION' => 'name','UOM' => 'name','OCCUPATIONMEMBERS' => 'name','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'name','RELATIONSHIPS' => 'name','FREQUENCY' => 'name', 'CUSTOMERBEHAVIOUR' => 'description', 'CUSTOMERSEGMENT' => 'name','DESIGNATION' => 'short_name', 'EARNINGMEMBERSSTATUS' => 'earning_member_status','EDUQUALIFICATION' => 'qualification_name','ADDRESSTYPE' => 'address_type','LOCALITY' => 'locality_name','ASSETTYPE' => 'name','PROPERTIES' => 'name','INVESTMENTTYPE' => 'name','INSURANCETYPE' => 'name','PERSONSMET' => 'person_met_name','RESIDENCEOWNERSHIP' => 'name','PAYMENTMODE' => 'name','ACCOUNTTYPE' => 'name','SOURCEOFOTHERINCOME' => 'name','MORTAGEPROPERTYTYPE' => 'name','ENDUSEOFLOAN' => 'enduse_of_loan','SOURCEOFBALANCETRANSFER' => 'name', 'STATUSOFCONSTRUCTION' => 'name','BTLENDERLIST'=>'lender_name','MORTAGEPROPERTIES'=>'property_name','EXISTINGLOANTYPES'=>'loan_type_name','PDAPPLICANTSDETAILS'=>'applicant_name','RELATIONWITHBUSINESS'=>'relation_with_business_name','BUSINESSENTITYTYPE'=>'business_entity_type_name','COMPANYRELATIONSHIPS'=>'name','STATE'=>'name','CITY'=>'name','COUNTRY'=>'country_name'); +$config['master_tables_field_names'] = array('INDUSTRYCLASSIFICATION' => 'name','UOM' => 'name','OCCUPATIONMEMBERS' => 'name','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'name','RELATIONSHIPS' => 'name','FREQUENCY' => 'name', 'CUSTOMERBEHAVIOUR' => 'description', 'CUSTOMERSEGMENT' => 'name','DESIGNATION' => 'short_name', 'EARNINGMEMBERSSTATUS' => 'earning_member_status','EDUQUALIFICATION' => 'qualification_name','ADDRESSTYPE' => 'address_type','LOCALITY' => 'locality_name','ASSETTYPE' => 'name','PROPERTIES' => 'name','INVESTMENTTYPE' => 'name','INSURANCETYPE' => 'name','PERSONSMET' => 'person_met_name','RESIDENCEOWNERSHIP' => 'name','PAYMENTMODE' => 'name','ACCOUNTTYPE' => 'name','SOURCEOFOTHERINCOME' => 'name','MORTAGEPROPERTYTYPE' => 'name','ENDUSEOFLOAN' => 'enduse_of_loan','SOURCEOFBALANCETRANSFER' => 'name', 'STATUSOFCONSTRUCTION' => 'name','BTLENDERLIST'=>'lender_name','MORTAGEPROPERTIES'=>'property_name','EXISTINGLOANTYPES'=>'loan_type_name','PDAPPLICANTSDETAILS'=>'applicant_name','RELATIONWITHBUSINESS'=>'relation_with_business_name','BUSINESSENTITYTYPE'=>'business_entity_type_name','COMPANYRELATIONSHIPS'=>'name','STATE'=>'name','CITY'=>'name','COUNTRY'=>'country_name','BOUNCEMASTER'=>'bounce_reason_name','BUSINESSEXPENSES'=>'expense_item','BUSINESSINCOME'=>'business_income_item','COMMENTSONLOCALITY'=>'rating','COMPANY'=>'company_id','LOCALITY'=>'locality_name','NONINDIVIDUALENTITIES'=>'non_individual_entity_name','PDFORMS'=>'pd_form_name','PDLOCATIONAPPROACH'=>'description','PDTYPE'=>'type_name','PDNOTIFICATION'=>'pd_status','QUESTIONCATEGORY'=>'category_name','ROLES'=>'role_name','SUBPRODUCTS'=>'name','TITLES'=>'name'); -$config['master_tables_pkid'] = array('INDUSTRYCLASSIFICATION' => 'industry_classification_id','UOM' => 'uom_id','OCCUPATIONMEMBERS' => 'occupation_non_earning_member_id','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'type_of_activity_id','RELATIONSHIPS' => 'relationship_id','FREQUENCY' => 'frequency_id', 'CUSTOMERBEHAVIOUR' => 'customer_behaviour_id', 'CUSTOMERSEGMENT' => 'customer_segment_id','DESIGNATION' => 'designation_id', 'EARNINGMEMBERSSTATUS' => 'earning_member_status_id','EDUQUALIFICATION' => 'qualification_id','ADDRESSTYPE' => 'address_type_id','LOCALITY' => 'locality_id','ASSETTYPE' => 'id','PROPERTIES' => 'id','INVESTMENTTYPE' => 'id','INSURANCETYPE' => 'id','PERSONSMET' => 'person_met_id','RESIDENCEOWNERSHIP' => 'id','PAYMENTMODE' => 'id','ACCOUNTTYPE' => 'id','SOURCEOFOTHERINCOME' => 'id','MORTAGEPROPERTYTYPE' => 'id','ENDUSEOFLOAN' => 'enduse_of_loan_id','SOURCEOFBALANCETRANSFER' => 'id', 'STATUSOFCONSTRUCTION' => 'id','MORTAGEPROPERTIES' => 'mortage_property_id','BTLENDERLIST'=>'bt_lender_list_id','EXISTINGLOANTYPES'=>'existing_loan_type_id','PDAPPLICANTSDETAILS'=>'pd_co_applicant_id','RELATIONWITHBUSINESS'=>'relation_with_business_id','BUSINESSENTITYTYPE'=>'business_entity_type_id','COMPANYRELATIONSHIPS'=>'company_relationship_id','STATE'=>'state_id','CITY'=>'city_id','COUNTRY'=>'country_id'); +$config['master_tables_pkid'] = array('INDUSTRYCLASSIFICATION' => 'industry_classification_id','UOM' => 'uom_id','OCCUPATIONMEMBERS' => 'occupation_non_earning_member_id','EDUQUALIFICATION' => 'qualification_name', 'TYPEOFACTIVITY' => 'type_of_activity_id','RELATIONSHIPS' => 'relationship_id','FREQUENCY' => 'frequency_id', 'CUSTOMERBEHAVIOUR' => 'customer_behaviour_id', 'CUSTOMERSEGMENT' => 'customer_segment_id','DESIGNATION' => 'designation_id', 'EARNINGMEMBERSSTATUS' => 'earning_member_status_id','EDUQUALIFICATION' => 'qualification_id','ADDRESSTYPE' => 'address_type_id','LOCALITY' => 'locality_id','ASSETTYPE' => 'id','PROPERTIES' => 'id','INVESTMENTTYPE' => 'id','INSURANCETYPE' => 'id','PERSONSMET' => 'person_met_id','RESIDENCEOWNERSHIP' => 'id','PAYMENTMODE' => 'id','ACCOUNTTYPE' => 'id','SOURCEOFOTHERINCOME' => 'id','MORTAGEPROPERTYTYPE' => 'id','ENDUSEOFLOAN' => 'enduse_of_loan_id','SOURCEOFBALANCETRANSFER' => 'id', 'STATUSOFCONSTRUCTION' => 'id','MORTAGEPROPERTIES' => 'mortage_property_id','BTLENDERLIST'=>'bt_lender_list_id','EXISTINGLOANTYPES'=>'existing_loan_type_id','PDAPPLICANTSDETAILS'=>'pd_co_applicant_id','RELATIONWITHBUSINESS'=>'relation_with_business_id','BUSINESSENTITYTYPE'=>'business_entity_type_id','COMPANYRELATIONSHIPS'=>'company_relationship_id','STATE'=>'state_id','CITY'=>'city_id','COUNTRY'=>'country_id','BOUNCEMASTER'=>'bounce_id','BUSINESSEXPENSES'=>'expense_item_id','BUSINESSINCOME'=>'business_income_id','COMMENTSONLOCALITY'=>'comments_on_locality_id','COMPANY'=>'name','LOCALITY'=>'locality_id','NONINDIVIDUALENTITIES'=>'non_individual_entity_id','PDFORMS'=>'form_id','PDLOCATIONAPPROACH'=>'pd_location_approach_id','PDTYPE'=>'pd_type_id','PDNOTIFICATION'=>'pdnotification_id','QUESTIONCATEGORY'=>'question_category_id','ROLES'=>'role_id','SUBPRODUCTS'=>'subproduct_id','TITLES'=>'title_id'); ?> \ No newline at end of file diff --git a/api/application/controllers/Common_Masters_Controller.php b/api/application/controllers/Common_Masters_Controller.php index 2d11218b..e8363f85 100644 --- a/api/application/controllers/Common_Masters_Controller.php +++ b/api/application/controllers/Common_Masters_Controller.php @@ -31,7 +31,8 @@ class Common_Masters_Controller extends REST_Controller { $table_name = $this->post('master_name'); //echo $table_name; - $result = $this->Common_Masters_Model->selectRecords(constant($table_name)); + //$result = $this->Common_Masters_Model->selectRecords(constant($table_name)); + $result = $this->Common_Masters_Model->selectCustomMasterRecords($table_name); //print_r($result); //die(); if(count($result) > 0) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 277e48fc..8c282e25 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -2159,7 +2159,7 @@ class PD_Controller extends REST_Controller { } - public function getPDFormDetailsJSON_post() + public function getPDFormDetailsJSON_post() { $pd_id = $this->post('pd_id'); $pd_form_id = $this->post('pd_form_id'); @@ -4026,7 +4026,7 @@ class PD_Controller extends REST_Controller { foreach($temp_data['companies'] as $company) { - $company_list[] = array('company_order_id' => $company['company_order_id'],'company_name' => $company['company_name'],'is_active' => $company['is_active'],'is_company_applicant'=>$company['is_company_applicant']); + $company_list[] = array('company_order_id' => $company['company_order_id'],'company_name' => $company['company_name'],'is_active' => $company['is_active'],'is_company_applicant'=>$company['is_company_applicant'],'business_entity_type'=>$company['business_entity_type'],'business_years'=>$company['business_years'],'business_month'=>$company['business_month'],'business_month'=>$company['business_month'],'business_date_object'=>$company['business_date_object']); } foreach($company_list as $list_key => $company) diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf index f59b9058..be9b86a7 100644 Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ diff --git a/api/application/helpers/getprocessedjson_helper.php b/api/application/helpers/getprocessedjson_helper.php index 6895629e..d312b74e 100644 --- a/api/application/helpers/getprocessedjson_helper.php +++ b/api/application/helpers/getprocessedjson_helper.php @@ -118,12 +118,22 @@ class GETPROCESSEDJSON //print_r($master_keys); if(!empty($raw_json) && !empty($master_keys)) { + + foreach($raw_json['loan_details'] as $loan_key => $loan) { + // if( $loan['loan_taken_by']['group_id'] == 1 ) + // { + // echo "company"; + // }else + // { + // echo "app"; + // } + foreach($loan as $key => $value) { - if($value != "" || $value != null) + if(($value != "" || $value != null) && $key != 'loan_taken_by') { //compare with master_keys array foreach($master_keys as $master_key => $master_value) @@ -157,7 +167,7 @@ class GETPROCESSEDJSON } } - return $raw_json; + print_r($raw_json); } /*****************########## END EXISTING LOAN DETAILS FORM ##########**************/ diff --git a/api/application/models/Common_Masters_Model.php b/api/application/models/Common_Masters_Model.php index 09cf2ead..96024a58 100644 --- a/api/application/models/Common_Masters_Model.php +++ b/api/application/models/Common_Masters_Model.php @@ -15,7 +15,19 @@ class Common_Masters_Model extends SPARQ_Model { { return $this->selectRecords('m_list_of_masters'); } - + + public function selectCustomMasterRecords($table_constant) + { + $master_tables_field_names = $this->config->item('master_tables_field_names'); + $master_tables_pkid = $this->config->item('master_tables_pkid'); + + $order = $master_tables_field_names[$table_constant]; + $master_data = $this->db->SELECT('*')->FROM(constant($table_constant))->ORDER_BY('is_others')->ORDER_BY($order)->GET()->result_array(); + // print_r($this->db->last_query()); + // die(); + return $master_data; + + } /** * This Function is used to Get The PD Team Related Datas for Listing */ diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php index 61888256..d96f5a68 100644 --- a/api/application/models/PD_Model.php +++ b/api/application/models/PD_Model.php @@ -618,53 +618,56 @@ class PD_Model extends SPARQ_Model { // $this->db->LIMIT($limit,$page); $result_array = $this->db->GET()->result_array(); + $mandatory_fields = array(); if(count($result_array)) { - $result_array['mandatory_fields'] = array(); - if($result_array[0]['fk_lender_id'] == "" || $result_array[0]['fk_lender_id'] == null){ $result_array['mandatory_fields'][] = 'fk_lender_id'; } - if($result_array[0]['pd_branch_id'] == "" || $result_array[0]['pd_branch_id'] == null){ $result_array['mandatory_fields'][] = 'pd_branch_id'; } + if($result_array[0]['fk_lender_id'] == "" || $result_array[0]['fk_lender_id'] == null){ $mandatory_fields[] = 'fk_lender_id'; } - if($result_array[0]['lender_applicant_id'] == "" || $result_array[0]['lender_applicant_id'] == null){ $result_array['mandatory_fields'][] = 'lender_applicant_id'; } + if($result_array[0]['pd_branch_id'] == "" || $result_array[0]['pd_branch_id'] == null){ $mandatory_fields[] = 'pd_branch_id'; } - if($result_array[0]['fk_product_id'] == "" || $result_array[0]['fk_product_id'] == null){ $result_array['mandatory_fields'][] = 'fk_product_id'; } + if($result_array[0]['lender_applicant_id'] == "" || $result_array[0]['lender_applicant_id'] == null){ $mandatory_fields[] = 'lender_applicant_id'; } - if($result_array[0]['fk_subproduct_id'] == "" || $result_array[0]['fk_subproduct_id'] == null){ $result_array['mandatory_fields'][] = 'fk_subproduct_id'; } + if($result_array[0]['fk_product_id'] == "" || $result_array[0]['fk_product_id'] == null){ $mandatory_fields[] = 'fk_product_id'; } - if($result_array[0]['fk_pd_type'] == "" || $result_array[0]['fk_pd_type'] == null){ $result_array['mandatory_fields'][] = 'fk_pd_type'; } + if($result_array[0]['fk_subproduct_id'] == "" || $result_array[0]['fk_subproduct_id'] == null){ $mandatory_fields[] = 'fk_subproduct_id'; } - if($result_array[0]['fk_customer_segment'] == "" || $result_array[0]['fk_customer_segment'] == null){ $result_array['mandatory_fields'][] = 'fk_customer_segment'; } + if($result_array[0]['fk_pd_type'] == "" || $result_array[0]['fk_pd_type'] == null){ $mandatory_fields[] = 'fk_pd_type'; } - if($result_array[0]['loan_amount'] == "" || $result_array[0]['loan_amount'] == null){ $result_array['mandatory_fields'][] = 'loan_amount'; } + if($result_array[0]['fk_customer_segment'] == "" || $result_array[0]['fk_customer_segment'] == null){ $mandatory_fields[] = 'fk_customer_segment'; } - if($result_array[0]['addressline1'] == "" || $result_array[0]['addressline1'] == null){ $result_array['mandatory_fields'][] = 'addressline1'; } + if($result_array[0]['loan_amount'] == "" || $result_array[0]['loan_amount'] == null){ $mandatory_fields[] = 'loan_amount'; } + + if($result_array[0]['addressline1'] == "" || $result_array[0]['addressline1'] == null){ $mandatory_fields[] = 'addressline1'; } // - if($result_array[0]['fk_city'] == "" || $result_array[0]['fk_city'] == null){ $result_array['mandatory_fields'][] = 'fk_city'; } + if($result_array[0]['fk_city'] == "" || $result_array[0]['fk_city'] == null){ $mandatory_fields[] = 'fk_city'; } - if($result_array[0]['fk_state'] == "" || $result_array[0]['fk_state'] == null){ $result_array['mandatory_fields'][] = 'fk_state'; } + if($result_array[0]['main_applicant'] == "" || $result_array[0]['main_applicant'] == null){ $mandatory_fields[] = 'main_applicant'; } - if($result_array[0]['pincode'] == "" || $result_array[0]['pincode'] == null){ $result_array['mandatory_fields'][] = 'pincode'; } + if($result_array[0]['fk_state'] == "" || $result_array[0]['fk_state'] == null){ $mandatory_fields[] = 'fk_state'; } - if($result_array[0]['pd_contact_person'] == "" || $result_array[0]['pd_contact_person'] == null){ $result_array['mandatory_fields'][] = 'pd_contact_person'; } + if($result_array[0]['pincode'] == "" || $result_array[0]['pincode'] == null){ $mandatory_fields[] = 'pincode'; } + + if($result_array[0]['pd_contact_person'] == "" || $result_array[0]['pd_contact_person'] == null){ $mandatory_fields[] = 'pd_contact_person'; } // if($result_array[0]['pd_contact_mobileno'] == "" || $result_array[0]['pd_contact_mobileno'] == null) // { - // $result_array['mandatory_fields'][] = 'pd_contact_mobileno'; + // $mandatory_fields[] = 'pd_contact_mobileno'; // } if($result_array[0]['pd_contact_landline'] == "" || $result_array[0]['pd_contact_landline'] == null) { if($result_array[0]['pd_contact_mobileno'] == "" || $result_array[0]['pd_contact_mobileno'] == null) { - $result_array['mandatory_fields'][] = 'pd_contact_landline'; + $mandatory_fields[] = 'pd_contact_landline'; } } } - + $result_array[]['mandatory_fields'] = $mandatory_fields; return $result_array; } diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 20a151e5..ea6b8772 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -9,106 +9,76 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + + -
- - +
+
+ + + +







"; + echo "
"; echo "

PERSONAL DISCUSSION REPORT

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

".$pd_master_details[0]['title_name'].$pd_master_details[0]['main_applicant']."

"; + echo "
"; + echo "



"; echo "

PD Report Date : ".$pd_master_details[0]['updatedon']."

"; echo "

PD Vist Date : ".$pd_master_details[0]['scheduled_on']."

"; echo "

PD Initiated by ".$pd_master_details[0]['branch_name']." Branch

"; echo "

Loan Applicant ID : ".$pd_master_details[0]['lender_applicant_id']."

"; echo "

Loan Amount Applied For :

"; echo "

- +
- +
As Per PD Initiation As Per Loan Applicants during PD
." . number_format($pd_master_details[0]['loan_amount']). ". ####
Rs " . number_format($pd_master_details[0]['loan_amount']). ". ####

"; @@ -116,278 +86,19 @@ td, th { echo "

Product : ".$pd_master_details[0]['product_name']."

"; echo "

Customer Segment : ".$pd_master_details[0]['customer_segment_name']."

"; + echo "
"; + echo "

Business Related Information

"; + if(count($pd_processed_forms[13])) + { + $business_details = json_decode($pd_processed_forms[13][0]['processed_json'],true); + //print_r($business_details); + $name_of_the_business_entity = "####"; + if($business_details['profession_name'] != "") {$name_of_the_business_entity = $business_details['profession_name'];}else { $name_of_the_business_entity = $business_details['profession_name']; } + + echo "Name of the Business Entity : "; + + } + ?> -
    - - -
  • Name of the Business Entity :
  • -
  • Business Entity Type :
  • -
  • Business Vintage :
  • - $value) - { - $type_of_business_activity .= $value['name'].','; - - } - ?> -
  • Type of Business Activity :
  • -
  • Key Products :
  • -
  • Brief of key persons connected with the business / profession :
  • -
-

- - - - $partner) - { - echo " - - - - - - - - - "; - } - - foreach($business_details['persons_with_relationships'] as $persons_with_relationships_key => $persons_with_relationship) - { - echo " - - - - - - - - - "; - } - ?> - -
S.NO Name Relation To Relationship Business Started By Loan Applicant (As per person met) Actively Involved in Business Share of Profit / Shareholding (%) No of years in (Name of Business Entity) Total Business Experience -(Years)
".($partners_key + 1)."".$partner['partner_name']."".$name_of_the_business_entity."". "XXX".""."XXX"."".'XXX'."".'XXX'."".$partner['shareholding']."%".$partner['current_business_experiance_year'].'.'.$partner['current_business_experiance_month']."".$partner['total_business_experiance']."
".(count($business_details['partners']) + 1)."".$persons_with_relationship['family_member_name']."".$persons_with_relationship['relation_to_id_master']."".$persons_with_relationship['other_family_relationship_id_master']."".$persons_with_relationship['started_business']."".'XXX'."".'XXX'."".'NA'."".'NA'."".'XXX'."
-

-
    -
  • Brief of Business Entity, Ownership and Areas of Operations:
  • -

    - " . $name_of_the_business_entity. ", is a ” ".$business_details['business_entity_type_master']." “ concern, formed in ”".$business_details['business_date_object'].".
    " ; - switch($business_details['business_entity_type']) - { - case 1:// Private Limited Company - foreach($business_details['partners'] as $partners_key => $partner) - { - echo "" . $partner['partner_name']. " is (relation to company) of ".$name_of_the_business_entity." having ". $partner['shareholding']."% shareholding.
    "; - } - break; - case 2:// Public Ltd Company - break; - case 3:// Sole proprietorship - break; - case 4:// HUF (Hindu Undivided Family) - break; - case 5:// Partnership - foreach($business_details['partners'] as $partners_key => $partner) - { - echo "" . $partner['partner_name']. " is partner of ".$name_of_the_business_entity." having ". $partner['shareholding']."% shareholding.
    "; - } - break; - case 6:// Cooperative - break; - case 7:// Limited Liability Partnership(LLP) - foreach($business_details['partners'] as $partners_key => $partner) - { - echo $partner['partner_name']. " is (relation to company) of ".$name_of_the_business_entity." having ". $partner['shareholding']."% share in properties.
    "; - } - break; - case 8:// OPC (One Person Company) - break; - case 9:// Society - break; - case 10:// Trust - break; - case 11:// Others (Please Specify) - break; - default: echo "Nothing Defined"; - - } - - $brief_product_details = ""; - foreach($business_details['select_business_activity_type'] as $business_activity) - { - $key_items_word = ""; - $item_sold_word = ""; - $area_of_sold = ""; - - if($business_activity['type_of_activity_id'] == 1)//Manufacturing and trading - { - $key_items_word = "Key Prodcuts"; - $item_sold_word = "sold"; - $with_in_india = 0; - $export = 0; - $both = 0; - - - //$single_prodcut = ""; - foreach($business_details['manufacturing_activity_details'] as $manufacturing) - { - $states = ""; - $cities = ""; - if(!strcasecmp('Within India',$manufacturing['area_of_sale'])) - { - $with_in_india++; - } - if(!strcasecmp('Export',$manufacturing['area_of_sale'])) - { - $export++; - } - if(!strcasecmp('Both',$manufacturing['area_of_sale'])) - { - $both++; - } - - if(array_key_exists('india_where_sale_done',$manufacturing)) - { - foreach($manufacturing['india_where_sale_done'] as $india_sales) - { - $states .= $india_sales['state_name'].','; - $cities .= implode(",",$india_sales['city_name']).','; - } - } - - if(array_key_exists('max_sale_state_name',$manufacturing)) - { - foreach($manufacturing['max_sale_state_name'] as $india_sales) - { - // $states .= implode(",",$india_sales['state_name']).','; - // $cities .= implode(",",$india_sales['city_name']).','; - print_r($india_sales['state_name']); - print_r($india_sales['city_name']); - } - } - - $single_prodcut = "
    ".$manufacturing['main_products'] ." ". $item_sold_word . " in throughtout ". substr($states,0,strlen($states)-1) ." in ".substr($cities,0,strlen($cities)-1).".
    "; - $brief_product_details .= $single_prodcut; - //echo $single_prodcut; - - } - - - //echo $single_prodcut; - - if(($with_in_india != 0 && $export != 0) || $both = 0) { $area_of_sold = " “within India” / “outside India” ";} - else if($with_in_india != 0) { $area_of_sold = " “within India” "; } - else if($export != 0) { $area_of_sold = " “outside India” "; } - } - else if($business_activity['type_of_activity_id'] == 2) - { - $key_items_word = "Key Prodcuts"; - $item_sold_word = "sold"; - } - else if($business_activity['type_of_activity_id'] == 3) - { - $key_items_word = "Key Services"; - $item_sold_word = "provided"; - } - echo "
    ".$name_of_the_business_entity. ", is into “".$business_activity['name']."” of ".$key_items_word.". These ".$key_items_word." , are ".$item_sold_word ."". $area_of_sold .""; - echo "

    "; - - - echo "$brief_product_details
    "; - - - - - - } - - - ?> - -
  • - (Name of Person met) the total number of employees in $name_of_the_business_entity is ".$business_details['employees_total']." During the visit at the ”(Address Type)“, the PD officer sighted ”".$business_details['officer_total']."“ employees. “As per,” (Name of person met), ".$business_details['employees_permanent']." “employees are permanent employees and” ".$business_details['employees_temporary']."“employees are temporary employees."; - } - else - { - echo "As Per (Name of Person met) the total number of employees in $name_of_the_business_entity is ". $business_details['employees_total'].". During the visit at the ”(Address Type)“, as per ”(Name of person met)“, all employees of” $name_of_the_business_entity “are permanent employees.” "; - } - ?> -
  • - -
  • - "; - if(!strcasecmp(strtolower($business_details['shop_eat_act_cert']),'yes')) - { - echo "Shop Eat Act Certificate

    "; - echo '
    image not available
    '; - } - if(!strcasecmp(strtolower($business_details['gst_Regn_cert']),'yes')) - { - echo "GST Certificate

    "; - echo '
    image not available
    '; - } - if(!strcasecmp(strtolower($business_details['export_import_cert']),'yes')) - { - echo "Export/Import Certificate

    "; - echo '
    image not available
    '; - } - if(!strcasecmp(strtolower($business_details['factory_cert']),'yes')) - { - echo "Factory Certificate

    "; - echo '
    image not available
    '; - } - if(!strcasecmp(strtolower($business_details['practice_cert']),'yes')) - { - echo "Practice Certificate

    "; - echo '
    image not available
    '; - } - if(!strcasecmp(strtolower($business_details['pf_regn']),'yes')) - { - echo "PF Certificate

    "; - echo '
    image not available
    '; - } - // if(!strcasecmp(strtolower($esic_regn),'yes')) - // { - // echo "ESI Certificate

    "; - // echo '
    image not available
    '; - // } - // if(!strcasecmp(strtolower($other_documents),'yes')) - // { - // echo "Others Certificate

    "; - // echo '
    image not available
    '; - // } - - - - } - ?> -
  • -
-

- - - - -
- - \ No newline at end of file