PD TAT REPORT OTEHR ISSUES
This commit is contained in:
parent
6cc57869e7
commit
2a2802459e
@ -244,6 +244,7 @@ $route['getDashBoardDetailsOfCity'] = 'Dash_Board_Controller/getDashBoardDetails
|
||||
$route['getDashBoardAlertDetails'] = 'Dash_Board_Controller/getDashBoardDetailsOfAlert';
|
||||
$route['PD_MIS_report'] = 'Dash_Board_Controller/PD_MIS_report';
|
||||
$route['alertPDTAT'] = 'Dash_Board_Controller/alertPDTAT';
|
||||
$route['pdTATReport'] = 'Dash_Board_Controller/pdTATReport';
|
||||
|
||||
$route['testCognito'] = 'Branch_Controller/testCognito';
|
||||
//$route['(getPDReportHTML/:any)'] = 'Welcome/getPDReportHTML';
|
||||
|
||||
@ -154,5 +154,23 @@ class Dash_Board_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function pdTATReport_post()
|
||||
{
|
||||
|
||||
$filter_params = ($this->post());
|
||||
$applicant_id = isset($filter_params['applicant_id']) && $filter_params['applicant_id'] != '' ? $filter_params['applicant_id'] : null;
|
||||
$from_date = isset($filter_params['from_date']) && $filter_params['from_date'] != '' ? $filter_params['from_date'] : null;
|
||||
$to_date = isset($filter_params['to_date']) && $filter_params['to_date'] != '' ? $filter_params['to_date'] : null;
|
||||
$city = isset($filter_params['city']) && $filter_params['city'] != '' ? $filter_params['city'] : null;
|
||||
$branch = isset($filter_params['branch']) && $filter_params['branch'] != '' ? $filter_params['branch'] : null;
|
||||
$lenderid = isset($filter_params['lenderid']) && $filter_params['lenderid'] != '' ? $filter_params['lenderid'] : null;
|
||||
|
||||
$res = $this->Dash_Board_Model->pdTATreport($applicant_id,$from_date,$to_date,$city,$branch,$lenderid);
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $res;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
}
|
||||
@ -8825,7 +8825,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$records = $this->post();
|
||||
$current_operation = null;
|
||||
$applicant_id = null;
|
||||
//print_r($records);
|
||||
//print_r($records);die();
|
||||
|
||||
$applicant_type = $records['is_applicant'] ? 0 : ($records['is_person_met'] ? 3 : '');
|
||||
$applicant_details = array('fk_pd_id' => $records['fk_pd_id'],'applicant_name' => $records['applicant_name'],'applicant_title_name' => $records['applicant_title_name'],'applicant_type' => $applicant_type );
|
||||
@ -8837,7 +8837,10 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($applicant_details['applicant_type']);
|
||||
if($applicant_type == 0)
|
||||
{
|
||||
unset($applicant_details['applicant_type']);
|
||||
}
|
||||
$applicant_id = $this->PD_Model->updateRecords($applicant_details,PDAPPLICANTSDETAILS,array('pd_co_applicant_id' => $records['pd_co_applicant_id']));
|
||||
$current_operation = 2;// 2 means UPDATE
|
||||
}
|
||||
@ -8893,14 +8896,14 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
||||
$lender_id = $this->PD_Model->selectCustomRecords(array('fk_lender_id'),array('pd_id' => $records['fk_pd_id']),PDTRIGGER);
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$lender_id[0]['fk_lender_id'];
|
||||
|
||||
$applicant_name = $this->PD_Model->selectCustomRecords(array('pd_document_name'),array('fk_pd_id' => $records['fk_pd_id'],'pd_document_title' => ($records['applicant_name'])),PDDOCUMENTS);
|
||||
$applicant_name = $this->PD_Model->selectCustomRecords(array('pd_document_name'),array('fk_pd_id' => $records['fk_pd_id'],'pd_document_title' => ($records['applicant_name']),'isactive' => 1),PDDOCUMENTS);
|
||||
if(count($applicant_name))
|
||||
{
|
||||
$profilepics3path = 'pd'.$records['fk_pd_id'].'/'.($applicant_name[0]['pd_document_name']);
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$profilepics3path,'30 minutes');
|
||||
$is_person_met_pic = $singed_uri;
|
||||
}
|
||||
$applicant_name_id = $this->PD_Model->selectCustomRecords(array('pd_document_name'),array('fk_pd_id' => $records['fk_pd_id'],'pd_document_title' => ($records['applicant_name'].'-id_proof')),PDDOCUMENTS);
|
||||
$applicant_name_id = $this->PD_Model->selectCustomRecords(array('pd_document_name'),array('fk_pd_id' => $records['fk_pd_id'],'pd_document_title' => ($records['applicant_name'].'-id_proof'),'isactive' => 1),PDDOCUMENTS);
|
||||
if(count($applicant_name_id))
|
||||
{
|
||||
$profilepics3path = 'pd'.$records['fk_pd_id'].'/'.($applicant_name_id[0]['pd_document_name']);
|
||||
|
||||
@ -233,6 +233,40 @@ class Dash_Board_Model extends SPARQ_Model {
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
public function pdTATreport($applicant_id = null,$from_date = null,$to_date = null,$city = null,$branch = null,$lenderid = null)
|
||||
{
|
||||
$this->db->SELECT('*,TIMEDIFF(triggered,draft) as draft_to_triggered,TIMEDIFF(allocated,triggered) as triggered_to_allocated,TIMEDIFF(accepted,allocated) as allocated_to_accepted,TIMEDIFF(scheduled,accepted) as accepted_to_scheduled,TIMEDIFF(initiated,scheduled) as scheduled_to_initiated,TIMEDIFF(started,initiated) as initiated_to_started,TIMEDIFF(inprogress,started) as started_to_inprogress,TIMEDIFF(completed,inprogress) as inprogress_to_completed,TIMEDIFF(qc_complete,completed) as completed_to_qc_complete');
|
||||
$this->db->FROM(PDMIS);
|
||||
if($applicant_id != null)
|
||||
{
|
||||
$this->db->LIKE('application_id',$applicant_id);
|
||||
}
|
||||
if($from_date != null)
|
||||
{
|
||||
$this->db->WHERE('date(triggered)>=',$from_date);
|
||||
}
|
||||
if($to_date != null)
|
||||
{
|
||||
$this->db->WHERE('date(triggered)<=',$to_date);
|
||||
}
|
||||
if($city != null)
|
||||
{
|
||||
$this->db->LIKE('city',$city);
|
||||
}
|
||||
if($branch != null)
|
||||
{
|
||||
$this->db->LIKE('branch',$branch);
|
||||
}
|
||||
// if($lenderid != null)
|
||||
// {
|
||||
// $this->db->LIKE('branch',$branch);
|
||||
// }
|
||||
|
||||
$query = $this->db->get();
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1224,8 +1224,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$loan_table_dispaly_rows[] = array('particulars' => 'Type of Property Being Mortgaged','details' => substr_count($loan_form['property_type_master'],'Others') ? $loan_form['property_type_others'] : $loan_form['property_type_master']);
|
||||
|
||||
//print_r($loan_form);die();
|
||||
$owners_list = null;foreach($loan_form['owners_list_master'] as $owner){ $owners_list.=$owner.' and '; }
|
||||
///echo $owners_list;
|
||||
$owners_list = substr_replace($owners_list, '', strrpos($owners_list, 'and'),strlen($owners_list));
|
||||
if($owners_list == '')
|
||||
{
|
||||
if(isset($loan_form['owner_name_group'][0]['owner_name']))
|
||||
{
|
||||
$owners_list = $loan_form['owner_name_group'][0]['owner_name']['name'];
|
||||
}
|
||||
}
|
||||
$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']);
|
||||
@ -2988,18 +2997,16 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$bindStockResult["service_stocks"]=array();
|
||||
}
|
||||
//print_r($bindStockResult);die();
|
||||
count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'] || $bindStockResult["service_stocks"])? array_push($stockResult,$bindStockResult) : $stockResult;
|
||||
count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing']) || count($bindStockResult["service_stocks"])? array_push($stockResult,$bindStockResult) : array();
|
||||
//echo "**********************";
|
||||
//print_r($stockResult);die();
|
||||
?>
|
||||
<?php
|
||||
|
||||
if(count($stockResult)){
|
||||
if(count($stockResult) || $stock_form_remarks != ''){
|
||||
$stock_sr_no = 0;
|
||||
?>
|
||||
|
||||
<h3 contenteditable="true">Stock Details</h3>
|
||||
|
||||
<?php foreach($stockResult as $getstRow) { ?>
|
||||
<h3><?php echo $getstRow['company_name']; ?></h3>
|
||||
<table class="scorecard_table">
|
||||
@ -3158,7 +3165,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php
|
||||
//
|
||||
}
|
||||
//echo '<p>'.$stock_form_remarks.'</p>';
|
||||
echo '<p>'.$stock_form_remarks.'</p>';
|
||||
//else {?>
|
||||
<!-- <p> Stock details is not available.</p> -->
|
||||
<?php //}
|
||||
|
||||
@ -1224,6 +1224,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$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));
|
||||
if($owners_list == '')
|
||||
{
|
||||
if(isset($loan_form['owner_name_group'][0]['owner_name']))
|
||||
{
|
||||
$owners_list = $loan_form['owner_name_group'][0]['owner_name']['name'];
|
||||
}
|
||||
}
|
||||
$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']);
|
||||
@ -2940,13 +2947,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$bindStockResult["service_stocks"]=array();
|
||||
}
|
||||
//print_r($bindStockResult);die();
|
||||
count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'] || $bindStockResult["service_stocks"])? array_push($stockResult,$bindStockResult) : $stockResult;
|
||||
count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing']) || count($bindStockResult["service_stocks"])? array_push($stockResult,$bindStockResult) : $stockResult;
|
||||
//echo "**********************";
|
||||
//print_r($stockResult);die();
|
||||
?>
|
||||
<?php
|
||||
|
||||
if(count($stockResult)){
|
||||
if(count($stockResult) || $stock_form_remarks != ''){
|
||||
$stock_sr_no = 0;
|
||||
?>
|
||||
|
||||
@ -3110,7 +3117,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php
|
||||
//
|
||||
}
|
||||
//echo '<p>'.$stock_form_remarks.'</p>';
|
||||
echo '<p>'.$stock_form_remarks.'</p>';
|
||||
//else {?>
|
||||
<!-- <p> Stock details is not available.</p> -->
|
||||
<?php //}
|
||||
|
||||
@ -1032,6 +1032,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$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));
|
||||
if($owners_list == '')
|
||||
{
|
||||
if(isset($loan_form['owner_name_group'][0]['owner_name']))
|
||||
{
|
||||
$owners_list = $loan_form['owner_name_group'][0]['owner_name']['name'];
|
||||
}
|
||||
}
|
||||
$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']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user