PD REPORT CHNAGES AND MSG ENCODE

This commit is contained in:
velz 2019-05-29 19:54:39 +05:30
parent bf22528350
commit aa5de59c8a
6 changed files with 81 additions and 43 deletions

View File

@ -4937,7 +4937,7 @@ class PD_Controller extends REST_Controller {
$records = $this->post('records');
$pdid = $records['pd_id'];
//PDALERTS::pdnotification($pdid);die();
$is_regenerate = 0;
if(isset($records['regenerate']))
{

Binary file not shown.

View File

@ -6,14 +6,14 @@ class SMS_GUPSHUP
public static function sendSMS($msg,$no)
{
$CI =&get_instance();
$msg=str_replace(array(" ","'",":",",","/","#",),array('%20','%27', '%3A', '%2C', '%2F', '%23'),$msg);
$sms_api_url = $CI->config->item('sms_gupshup_url');
$sms_api_url = str_replace('{{sms_api_user_id}}',$CI->config->item('sms_api_user_id'),$sms_api_url);
$sms_api_url = str_replace('{{sms_api_pwd}}',$CI->config->item('sms_api_pwd'),$sms_api_url);
$sms_api_url = str_replace('{{send_to_mobile_no}}',$no,$sms_api_url);
$sms_api_url = str_replace('{{send_msg}}',$msg,$sms_api_url);
// echo $no;
// echo $msg;
// echo $sms_api_url;die();
$client = new \GuzzleHttp\Client();
$response = $client->post($sms_api_url);
$contents = (string) $response->getBody();

View File

@ -47,7 +47,7 @@ public static function getStockRetailDetails($goods){
if(count($goods)>0){
$goods = array_map(function($tag) {
$getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : '');
$getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']);
$getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : (isset($tag['is_sufficiant_traded_goods']) && (strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']);
return array(
'type' => 'Trading Goods',
'name' => $tag['traded_goods_name'],

View File

@ -127,7 +127,7 @@ class PD_Model extends SPARQ_Model {
public function PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id','LEFT');
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');
@ -744,7 +744,7 @@ class PD_Model extends SPARQ_Model {
*/
public function getPDMasterDetails($pdid)
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y") as pd_report_generated_date,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name,PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation,PDTRIGGER.pd_date_of_initiation as pd_date_of_initiation_sqlformat, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i %p") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i %p") as updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,PDTRIGGER.scheduled_on as scheduled_on_for_validation,DATE_FORMAT(PDTRIGGER.scheduled_on,"%dth %b %Y ") as scheduled_date_for_log,DATE_FORMAT(PDTRIGGER.scheduled_on,"%h:%i %p") as scheduled_time_for_log,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.bounce_reason,PDTRIGGER.bounce_reason_others,BOUNCEMASTER.bounce_reason_name,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDAPPLICANTSDETAILS.applicant_name as main_applicant,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDAPPLICANTSDETAILS.applicant_title_name,TITLES.name as title_name,PDTRIGGER.pd_contact_landline,PDTRIGGER.other_pincode,PDTRIGGER.is_otp_done,PDTRIGGER.encrypted_url,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.start_location,PDTRIGGER.satellite_image_base64_blob,DATE_FORMAT(PDTRIGGER.pd_report_generated_date,"%d/%m/%Y %h:%i:%s %p") as pd_report_generated_date,DATE_FORMAT(PDTRIGGER.pd_visit_date,"%d/%m/%Y %h:%i:%s %p") as pd_visit_date,PDTRIGGER.random_string,PDTRIGGER.pd_report_html_filename,PDTRIGGER.is_qc_edited');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ','LEFT');
$this->db->JOIN(ENTITYBILLING.' as ENTITYBILLING','PDTRIGGER.fk_entity_billing_id = ENTITYBILLING.entity_billing_id','LEFT');

View File

@ -45,7 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
text-align: left;
/*line-height: 35px;*/
}
.table2 {
border: 1px solid black;
@ -80,17 +80,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
/*font-family: Merriweather;*/
border-collapse: collapse;
width: 100%;
page-break-inside: avoid;
page-break-inside: avoid;
}
.scorecard_table td, .scorecard_table th {
border: 1px solid #000;
padding: 8px;
page-break-inside: avoid;
page-break-inside: avoid;
}
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid;}
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid; }
.scorecard_table tr:hover {background-color: #ddd;}
@ -99,9 +100,43 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding-bottom: 8px;
text-align: center;
background-color: #0191ed;
color: white;
page-break-inside: avoid;
color: white;page-break-inside: avoid;
}
/* #########End of Score Card Table Styles######### */
/* #########Score Card2 Table Styles######### */
.scorecard_table2 {
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;*/
/*font-family: Merriweather;*/
border-collapse: collapse;
width: 100%;
}
.scorecard_table2 td, .scorecard_table2 th {
border: 1px solid #000;
padding: 8px;
}
.scorecard_table2 tr:nth-child(even){background-color: #f2f2f2;}
.scorecard_table2 tr:hover {background-color: #ddd;}
.scorecard_table2 th {
padding-top: 8px;
padding-bottom: 8px;
text-align: center;
background-color: #0191ed;
color: white;
}
/* #########End of Score Card2 Table Styles######### */
.customth { width: 10%; }
@ -433,7 +468,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// echo '</tbody>';
// echo '</table>';
// echo '<br><br><br>';
echo '<div id="page_break"></div>';
echo '<p><strong>Person(s) Met:</strong> </p>';
echo '<div id="billwise">';
foreach($person_met_data as $pk => $person)
@ -444,12 +479,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><p>';
if($person['photo'])
{
echo '<img src='.$person['photo'].' width="100px" height="100px" alt=""/>';
echo '<img src='.$person['photo'].' width="200px" height="200px" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src='.$person['id_proof'].' width="100px" height="100px" alt=""/>';
echo '<img src='.$person['id_proof'].' width="200px" height="200px" alt=""/>';
}
echo '</p>';
echo count($person_met_data) != ($pk+1)? '<hr>':'';
@ -513,7 +548,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$applicant_name = array_key_exists('pd_co_applicant_id_master',$individual) ? $individual['pd_co_applicant_id_master'] : " Could Not Find" ;
//echo $applicant_name.'**************************';
echo '<tr><td>'.$individual['applicant_title_name_master'].' '.$applicant_name.'</td><td class="customtd">'.$individual['age'].'</td><td>'.$education_qualification.'</td><td>';
echo '<tr><td class="customtd">'.$individual['applicant_title_name_master'].' '.$applicant_name.'</td><td class="customtd">'.$individual['age'].'</td><td class="customtd">'.$education_qualification.'</td><td class="customtd">';
$company_relationship_data = null;
//print_r($general_form['company_with_relationships']);
@ -694,7 +729,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<li><span contenteditable="true"> The location of the</span> '.$address_type.' <span contenteditable="true">is</span> '.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].' <span contenteditable="true">to the nature of business. </span></li>';
if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes')
{
echo '<li>Business Activity was seen during visit.</li>';
echo '<li>Business Activity was seen during visit.</li>';
}
else{
echo '<li>No business activity was seen during the PD visit</li>';
@ -881,7 +916,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult['business_peak_details']=Businessform::getBusinessPeakDetails($businessRow['peak_period_of_business']);
}
else{
$bindEachResult['business_peak_details']='The Business has no major changes in sales across seasons<span contenteditable="true">.</span>';
$bindEachResult['business_peak_details']='The Business has no major change in sales across seasons<span contenteditable="true">.</span>';
}
$bindEachResult['company_employees'] = '';
@ -1059,7 +1094,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php } ?>
</td>
<td><?php echo $manuRow['max_sales_done']?></td>
<td class="customtd"><?php echo $manuRow['max_sales_done']?></td>
</tr>
<?php } ?>
</tbody>
@ -1221,8 +1256,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</table>
<div class='page_break'></div>
<p><strong>Brief of the Business / Service Model </strong></p>
</br></br></br></br>
<p>Brief of the Business / Service Model </p>
<table class="scorecard_table">
<thead>
<tr> <th>Product / Service</th> <th>Process Brief</th> </tr>
@ -1302,7 +1337,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$to = ($from + 1);
echo '<tr>';
for ($doc = $from; $doc <= $to ; $doc++){
if(isset($visit_documents[$doc])){
?>
<td>
<div class="gallery">
@ -1311,6 +1346,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</div>
</td>
<?php
}
}
echo '</tr>';
} ?>
@ -1357,7 +1393,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(count($businessAssetResult)>0){ ?>
<div class="page_break"> <div>
<br>
<h3 contenteditable="true">Assets used in Buisness</h3>
<h3 contenteditable="true">Assets used in Business</h3>
<?php foreach($businessAssetResult as $iterateAsset){ ?>
<p><?php echo $iterateAsset['company_name']; ?></p>
<table class="scorecard_table">
@ -1651,8 +1687,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php
//print_r($bankingResult);die();
if(count($bankingResult)>0){ ?>
<div class="page_break"></div>
<p contenteditable="true"><strong>Business Banking:</strong></p>
<div id="page_break"></div>
<h3 contenteditable="true">Business Banking:</h3>
<table class="scorecard_table">
<thead>
<tr>
@ -1744,7 +1780,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//print_r($main_raw_material);
$client_first_row .= '<td class="customtd">'.$main_raw_material['manufacturing_product_name'].'</td>';
$client_second_row .= isset($main_raw_material['person_title_name_master']) ? '<td class="customtd">' . $main_raw_material['person_title_name_master']: '<td class="customtd">';
$client_second_row .= isset($main_raw_material['person_title_name_master']) ? '<td class="customtd">' . $main_raw_material['person_title_name_master'].' ': '<td class="customtd">';
$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'] : ' ';//
@ -1784,7 +1820,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_first_row .= '<td class="customtd">'.$trading_product['trade_product_name'].'</td>';
$client_second_row .= isset($trading_product['person_title_name_master']) ? '<td class="customtd">' . $trading_product['person_title_name_master']: '<td class="customtd">';
$client_second_row .= isset($trading_product['person_title_name_master']) ? '<td class="customtd">' . $trading_product['person_title_name_master'].' ': '<td class="customtd">';
$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'] : ' ';//
@ -1825,7 +1861,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_first_row .= '<td class="customtd">'.$service_product['service_provider_product_name'].'</td>';
$client_second_row .= isset($service_product['person_title_name_master']) ? '<td class="customtd">' . $service_product['person_title_name_master']: '<td class="customtd">';
$client_second_row .= isset($service_product['person_title_name_master']) ? '<td class="customtd">' . $service_product['person_title_name_master'].' ': '<td class="customtd">';
$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'] : ' ';//
@ -2020,12 +2056,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(count($supplierResult))
{
?>
<div id="page_break"></div>
<h3 contenteditable="true">Supplier Details</h3>
<?php
foreach($supplierResult as $k => $fetchRow){
echo '<br>Supplier '.($k+1).':';
echo '</br>Supplier '.($k+1).':</br>';
?>
<div id="page_break"> </div>
<table class="scorecard_table">
<thead>
@ -2567,7 +2604,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<th>Asset Description</th>
<th>Asset Owned By</th>
<th>Approx Market Value(Rs)</th>
<th>Age of the Assest</th>
<th>Age of the Assest(Yrs)</th>
<th>Loan Again Assest</th>
</tr>
</thead>
@ -2721,7 +2758,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$residence_text ='<span contenteditable="true">This is a </span>'. $fmValue['residence_ownership'].' <span contenteditable="true">residence, where the applicant has been staying for </span>'. $fmValue['residence_No_of_years'].'<span contenteditable="true">.</span>';
$residence_text .= (!strcasecmp($fmValue['residence_ownership'],'rented')) ? '<span contenteditable="true">The rent paid Rs.</span>'.$fmValue['rent'].'<span contenteditable="true">per month.</span>' : '';
echo $intro_text;echo "<br>";echo $residence_text;
echo $intro_text;echo "<br><br>";echo $residence_text;
?>
@ -2877,7 +2914,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<!-- #################Final Remarks Section#################-->
<div class="page_break"></div>
<h3 contenteditable="true">PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
<h3 contenteditable="true">PD OFFICERS REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
<?php
//print_r($final_remark_data);die();
$polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null;
@ -2915,7 +2952,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<ul>
<li>Customer Behaviour: </li>
<br>
<br><br>
<!-- <table cellspacing="25">
<tr>
<td><div id="boxstyle2">polite&nbsp;&nbsp;&nbsp;<div class="ver_line"><?php if($polite){?><span style='font-family: DejaVu Sans; sans-serif;font-size:12px'>&#10004;</span><?php } ?></div></div></td>
@ -2946,11 +2983,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php if($other_behaviour){
echo "*".$other_behaviour_remarks;
echo '<br><br>';
}?>
<br><br>
<li>Suitability of Business Location: </li>
<br>
<br><br>
<table>
<!-- <tr>
@ -2977,7 +3015,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</table>
<br>
<li>PD Officers overall assessment: </li>
<br>
<br><br>
<table >
<!-- <tr>
@ -3055,7 +3093,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
echo "<h3>Details Score Card Section</h3>" ;
// *** General Section Questions Score Table
echo '<table class="scorecard_table">';
echo '<table class="scorecard_table2">';
echo "<tr> <th>General Questions L1(". $pd_score['general']['otp_done']['l1_weightage']."%) </th> <th>L2</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>";
foreach($pd_score['general'] as $key => $general)
{
@ -3074,7 +3112,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// *** Asset Caculation Score Table
echo '<table class="scorecard_table">';
echo '<table class="scorecard_table2">';
echo "<tr> <th colspan='2'>Asset Value Calculaitons</th></tr>";
echo "<tr> <td>Actual Value Of Assets (a)</td><td>". number_format($pd_score['score_summary']['asset_calculation_details']['actual_value_of_assets'],2,'.',',')."</td></tr>";
@ -3097,7 +3135,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br><br>';
// *** Final Remarks Questions Score Table
echo '<table class="scorecard_table">';
echo '<table class="scorecard_table2">';
echo "<tr> <th>Final Remarks Questions L1(". $pd_score['final_remarks']['pd_officer_recommandations']['l1_weightage']."%)</th> <th>L2</th><th>Answer</th> <th>Score</th><th>Attributed Score</th> <th>Max Score</th></tr>";
foreach($pd_score['final_remarks'] as $key => $final_remark)
{
@ -3115,7 +3153,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br><br>';
//print_r($pd_score['business']);
echo '<table class="scorecard_table">';
echo '<table class="scorecard_table2">';
// *** Business Section Questions Score Table
echo "<tr> <th>Business Questions L1(". $pd_score['business']['no_of_years_business_run']['l1_weightage']."%)</th> <th>L2</th><th>Answer</th> <th>Score</th> <th>Attributed Score</th><th>Max Score</th></tr>";
@ -3155,7 +3193,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<br><br>';
echo "<table class='scorecard_table'>";
echo "<table class='scorecard_table2'>";
echo "<tr> <th>Business Certificates</th> <th>Answer</th> <th>Score</th> <th>Attributed Score</th> <th>Max Score</th></tr>";
$index = 0;
// print_r($certificates);