PD REPORT EDITABLE

This commit is contained in:
velz 2019-05-30 20:17:16 +05:30
parent 7d10b0ecf0
commit 8f7f5f545b
3 changed files with 53 additions and 24 deletions

View File

@ -45,7 +45,7 @@ class PD_Controller extends REST_Controller {
for ($i = 0; $i < 5; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
$temp_file_name = $randomString.date('Y-m-d-h:i:s');
$temp_file_name = $randomString.date('Y-m-d-H:i:s');
$ifp = fopen( $output_file, 'wb' );
@ -731,7 +731,7 @@ class PD_Controller extends REST_Controller {
{
$pd_details['start_location'] = $pd_details['link'];
$pd_details['pd_visit_date'] = date('Y-m-d h:i:s');
$pd_details['pd_visit_date'] = date('Y-m-d H:i:s');
unset($pd_details['link']);
$string2 = str_shuffle('1234567890');
$OTP = substr($string2,0,6);
@ -1484,7 +1484,7 @@ class PD_Controller extends REST_Controller {
$list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no'];
$list_of_pd_officers[$key]['count'] = 0;
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1');
@ -1536,7 +1536,7 @@ class PD_Controller extends REST_Controller {
{
//Get PD Details assigned to Central Officers
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1');
@ -1624,7 +1624,7 @@ class PD_Controller extends REST_Controller {
$list_of_pd_officers[$key]['mobile_no'] = $names[0]['mobile_no'];
$list_of_pd_officers[$key]['count'] = 0;
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode,PDTRIGGER.lender_applicant_id,ENTITY.short_name');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1');
@ -1680,7 +1680,7 @@ class PD_Controller extends REST_Controller {
//Get PD Details assigned to Central Officers
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %H:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode');
$this->db->SELECT('pd_id,pd_status,fk_pd_type,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i:%s %p") as scheduled_on,PDAPPLICANTSDETAILS.applicant_name,PDTYPE.type_name as pd_type_name,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PDTRIGGER.pincode');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS','PDTRIGGER.pd_id = PDAPPLICANTSDETAILS.fk_pd_id AND PDAPPLICANTSDETAILS.applicant_type = 1');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1');
@ -4082,7 +4082,7 @@ class PD_Controller extends REST_Controller {
if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) {
$dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE);
}
$pd_report_time = date('Y-m-d-h-i-s');
$pd_report_time = date('Y-m-d-H-i-s');
$pd_report_store = APPPATH.'views/pd_reports/'.$pdid.'/'.$pd_report_time.'.html';
$is_write_done = file_put_contents($pd_report_store,$temp);
@ -4092,7 +4092,7 @@ class PD_Controller extends REST_Controller {
//$update = $this->PD_Model->updateRecords(array('pd_report_html_filename' => $pd_report_time),PDTRIGGER,array('pd_id' => $pdid));
$where_condition_array = array("pd_id" => $pdid);
$temp_array = array('is_original_report_created'=>1,'pd_report_html_filename' => $pd_report_time,'pd_report_generated_date' => date('Y-m-d h:i:s'),'is_qc_edited' => 2);
$temp_array = array('is_original_report_created'=>1,'pd_report_html_filename' => $pd_report_time,'pd_report_generated_date' => date('Y-m-d H:i:s'),'is_qc_edited' => 2);
$id = $this->PD_Model->updateRecords($temp_array,PDTRIGGER,$where_condition_array);
@ -4932,8 +4932,8 @@ class PD_Controller extends REST_Controller {
public function codeigniterViewTest_post()
{
$records = $this->post('records');
$pdid = $records['pd_id'];
//PDALERTS::pdnotification($pdid);die();
@ -5015,7 +5015,7 @@ class PD_Controller extends REST_Controller {
//echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//echo $t; die();
echo $t; die();
// if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) {
// $dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE);

Binary file not shown.

View File

@ -45,7 +45,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
text-align: left;
/*line-height: 35px;*/
}
.non-editable{ background-color:#99ff99; }
.table2 {
border: 1px solid black;
@ -302,6 +303,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
/* #########Doc sighted gallary css######### */
/* ######### TOOLTIP CSS START ######### */
.tooltip {
position: relative;
display: inline;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
/* ######### TOOLTIP CSS END ######### */
</style>
<script type="text/javascript">
@ -353,7 +382,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<tbody>
<?php
echo "<tr><td>PD Initiated Date </td> <td> </td> <td> ".$pd_master_details[0]['createdon']."</td></tr>";
echo "<tr><td>PD Vist Date </td> <td> </td> <td> ".$pd_master_details[0]['pd_visit_date']."</td></tr>";
echo "<tr><td>PD Visit Date </td> <td> </td> <td> ".$pd_master_details[0]['pd_visit_date']."</td></tr>";
echo "<tr><td>PD Report Date </td> <td> </td> <td>".$pd_master_details[0]['pd_report_generated_date']."</td>";
echo "<tr><td>PD Initiated by </td> <td> </td> <td>".$pd_master_details[0]['branch_name']." Branch</td></tr>";
echo "<tr><td>Loan Application ID </td> <td> </td> <td> ".$pd_master_details[0]['lender_applicant_id']."</td></tr>";
@ -719,28 +748,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
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 '<p style="text-align:justify;">';
echo '<span contenteditable="true">The PD visit was done at </span><span contenteditable="false">'. $address_type. '</span><span contenteditable="true"> of the loan applicants.</span>';
echo '<span contenteditable="true">The </span><span contenteditable="false">'.$address_type.'</span><span contenteditable="true"> is </span><span contenteditable="false">'.$property_owner_type.'</span><span contenteditable="true"> and the business has been in operation from here for the last</span> <span contenteditable="false">'.$yrs_being_run.'.</span>';
echo '<br><br><span contenteditable="true">The</span> '.$address_type.' <span contenteditable="true">is located in </span>'.$locality.' <span contenteditable="true">and the estimated area of the</span> '.$address_type.' <span contenteditable="true">is</span> '.$estimated_area.' <span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The PD location was </span>'. $pd_address['pd_location_master'].'. ' . '<span contenteditable="true">As Per PD Offcier, the</span> '.$address_type .' <span contenteditable="true">is situated in</span> '.$comment_locality_master .' <span contenteditable="true">Locality.</span>';
echo '<span contenteditable="true">The PD visit was done at </span><div class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></div><span contenteditable="true"> of the loan applicants.</span>';
echo '<span contenteditable="true">The </span><div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div><span contenteditable="true"> is </span><div class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></div><span contenteditable="true"> and the business has been in operation from here for the last</span> <div class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></div><span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The</span> <div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is located in </span><div class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></div> <span contenteditable="true">and the estimated area of the</span> <div class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is</span> <div class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></div> <span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The PD location was </span>'. $pd_address['pd_location_master'].'<span class="tooltiptext">Address Form - Approach to PD location </span></div>. ' . '<span contenteditable="true">As Per PD Offcier, the</span> <div class="tooltip">'.$address_type .'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is situated in</span><div class="tooltip"> '.$comment_locality_master .'<span class="tooltiptext">Address Form - Comment on locality </span></div> <span contenteditable="true">Locality.</span>';
echo '<br><br><span contenteditable="true">The PD officer also made the following observations:</span>' ;
echo '<br><ul>';
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>';
echo '<li><span contenteditable="true"> The location of the</span><div class="tooltip"> '.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></div> <span contenteditable="true">is</span> <div class="tooltip">'.$address_type_remarks_caption [ $final_remark_data['is_service_provided'] ].'<span class="tooltiptext">Final Remarks Form - The location of the busienss suitability for Business </span></div> <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><div class="tooltip">Business Activity was seen during visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></div></li>';
}
else{
echo '<li>No business activity was seen during the PD visit</li>';
echo '<li><div class="tooltip">No business activity was seen during the PD visit.<span class="tooltiptext">Business Assest Form - Busienss activity seen during PD visit </span></div></li>';
}
if(isset($business_assets_details['business_assets_form_remark']) && $business_assets_details['business_assets_form_remark'] != ""){
echo "<li>".$business_assets_details['business_assets_form_remark'] ."</li>";}
echo '<li><div class="tooltip">'.$business_assets_details['business_assets_form_remark'] .'<span class="tooltiptext">Business Assest Form - Busienss Assest Form Remarks </span></div></li>';}
echo "</ul>";
if($address_form['address_form_remark'])
{
echo $address_form['address_form_remark'];}
echo '<div class="tooltip">'.$address_form['address_form_remark'].'<span class="tooltiptext">Address Form - Address Form Remarks </span></div>';}
echo "</p>";
echo "<div id='page_break'></div>";
//die();
@ -2758,9 +2787,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php foreach($familyResult as $fmKey => $fmValue) { ?>
<!-- <p><strong><?php //echo ($fmKey+1).'. '.$fmValue['selected_person']; ?></strong></p> -->
<?php
$intro_text = $fmValue['selected_person_title'].$fmValue['selected_person'].', <span contenteditable="true">who is an applicant in the case, resides at </span>'.$fmValue['residency_address'].'<span contenteditable="true">.</span>';
$intro_text = '<div class="tooltip">'.$fmValue['selected_person_title'].$fmValue['selected_person'].'<span class="tooltiptext">Family Information - Select person for capturing family details</span></div>, <span contenteditable="true">who is an applicant in the case, resides at </span><div class="tooltip">'.$fmValue['residency_address'].'<span class="tooltiptext">Family Information - Residence Address of Select person </span></div><span contenteditable="true">.</span>';
$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 ='<span contenteditable="true">This is a </span><div class="tooltip">'. $fmValue['residence_ownership'].' <span class="tooltiptext">Family Information - Ownership of Residence </span></div><span contenteditable="true"> residence, where the applicant has been staying for </span><div class="tooltip">'. $fmValue['residence_No_of_years'].'<span class="tooltiptext">Family Information - No of Yrs in current residence </span></div><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><br>";echo $residence_text;