SALES PD MIS REPORT
This commit is contained in:
parent
6969740c0b
commit
f177d066c3
@ -267,4 +267,5 @@ $route['saveSalesPDImage'] = 'Sales_PD_Controller/saveSalesPDImage';
|
||||
$route['saveSalesPDsection'] = 'Sales_PD_Controller/saveSalesPDsection';
|
||||
$route['getSalesPDSectionData'] = 'Sales_PD_Controller/getSalesPDSectionData';
|
||||
$route['testAPISalesPD'] = 'Sales_PD_Controller/testAPISalesPD';
|
||||
$route['salesPDMisReport'] = 'Sales_PD_Controller/salesPDMisReport';
|
||||
|
||||
|
||||
@ -2916,6 +2916,40 @@ public function getPDFormDetailsJSON_post()
|
||||
$custom_log_info = '###Get Business IMG AWS urls & attach into JSON Function End - ('. $pd_id.' - '. $pd_form_id.') - ' . date('Y-m-d H:i:s A');
|
||||
log_message('ERROR',$custom_log_info);
|
||||
}
|
||||
|
||||
if($pd_form_id == 12 ) //Employeement
|
||||
{
|
||||
|
||||
$custom_log_info = '###Get EMployee IMG AWS urls & attach into JSON Function Called - ('. $pd_id.' - '. $pd_form_id.') - ' . date('Y-m-d H:i:s A');
|
||||
log_message('ERROR',$custom_log_info);
|
||||
|
||||
$result_data = $this->PD_Model->getSignedPDDocsURL($pd_id,12,null,null,null,null,'report');
|
||||
|
||||
foreach($result_data as $b_key => $b_value)
|
||||
{
|
||||
if($b_value['pd_document_title'] == 'attendance_seen_pic')
|
||||
{
|
||||
$temp_rec['attendance_seen_pic'] = $b_value['doc_url'];
|
||||
}
|
||||
if($b_value['pd_document_title'] == 'sal_reg_seen_pic')
|
||||
{
|
||||
$temp_rec['sal_reg_seen_pic'] = $b_value['doc_url'];
|
||||
}
|
||||
if($b_value['pd_document_title'] == 'name_board_img')
|
||||
{
|
||||
$temp_rec['name_board_img'] = $b_value['doc_url'];
|
||||
}
|
||||
if($b_value['pd_document_title'] == 'id_card_image')
|
||||
{
|
||||
$temp_rec['id_card_image'] = $b_value['doc_url'];
|
||||
}
|
||||
|
||||
}
|
||||
//die();
|
||||
$rec[0]['json'] = json_encode($temp_rec);
|
||||
$custom_log_info = '###Get Employeement IMG AWS urls & attach into JSON Function End - ('. $pd_id.' - '. $pd_form_id.') - ' . date('Y-m-d H:i:s A');
|
||||
log_message('ERROR',$custom_log_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5791,7 +5825,7 @@ public function getPDFormDetailsJSON_post()
|
||||
public function codeigniterViewTest_post()
|
||||
{
|
||||
//print_r($this->aws_s3->createNewBucket('len3'));die();
|
||||
//satellite_image::getSatelliteImage(2,2);die();
|
||||
//satellite_image::getSatelliteImage(997);die();
|
||||
//echo $this->assignPDTempalate(1325);die();
|
||||
//$this->getSatelliteImage(342);die();//velmurugan.s@venbainfotech.com
|
||||
// PDALERTS::sendSalesPDMail($this,2);die();
|
||||
|
||||
@ -256,7 +256,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
{
|
||||
$lender_id = $this->uri->segment(2);
|
||||
$user_id = $this->uri->segment(3);
|
||||
$columns = array('SALES_PD_DATA.sales_pd_id','SALES_PD_DATA.sales_pd_sno','SALES_PD_DATA.applicant_name','concat(USERPROFILE.first_name," ",USERPROFILE.first_name) as officer_name','SALES_PD_DATA.applicant_id','SALES_PD_DATA.lender_id','SALES_PD_DATA.product_id','SALES_PD_DATA.is_pdf','SALES_PD_DATA.is_edited','ENTITY.short_name','PRODUCT.abbr','SALES_PD_DATA.createdon','SALES_PD_DATA.status');
|
||||
$columns = array('SALES_PD_DATA.sales_pd_id','SALES_PD_DATA.sales_pd_sno','SALES_PD_DATA.applicant_name','concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name','SALES_PD_DATA.applicant_id','SALES_PD_DATA.lender_id','SALES_PD_DATA.product_id','SALES_PD_DATA.is_pdf','SALES_PD_DATA.is_edited','ENTITY.short_name','PRODUCT.abbr','SALES_PD_DATA.createdon','SALES_PD_DATA.status');
|
||||
$table = SALES_PD_DATA.' as SALES_PD_DATA';
|
||||
$joins = array(
|
||||
array('table' => ENTITY. ' as ENTITY',
|
||||
@ -797,7 +797,67 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
|
||||
public function testAPISalesPD_post()
|
||||
{
|
||||
//PDALERTS::sendSalesPDMail($this,2);die();
|
||||
PDALERTS::sendSalesPDMail($this,14);die();
|
||||
}
|
||||
|
||||
public function salesPDMisReport_post()
|
||||
{
|
||||
//$lender_id = $this->uri->segment(2);
|
||||
$officer_name = $this->post('officer_name');
|
||||
$from_date = $this->post('from_date');
|
||||
$to_date = $this->post('to_date');
|
||||
|
||||
|
||||
$columns = array('SALES_PD_DATA.sales_pd_id','SALES_PD_DATA.sales_pd_sno','SALES_PD_DATA.applicant_name','concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as officer_name','SALES_PD_DATA.applicant_id','SALES_PD_DATA.lender_id','SALES_PD_DATA.product_id','SALES_PD_DATA.is_pdf','SALES_PD_DATA.is_edited','ENTITY.short_name','PRODUCT.abbr','SALES_PD_DATA.createdon','SALES_PD_DATA.status','SALES_PD_DATA.mail_status');
|
||||
$table = SALES_PD_DATA.' as SALES_PD_DATA';
|
||||
$joins = array(
|
||||
array('table' => ENTITY. ' as ENTITY',
|
||||
'condition' =>'SALES_PD_DATA.lender_id = ENTITY.entity_id',
|
||||
'jointype' => 'INNER'),
|
||||
array('table' => PRODUCTS. ' as PRODUCT',
|
||||
'condition' =>'SALES_PD_DATA.product_id = PRODUCT.product_id',
|
||||
'jointype' => 'INNER'),
|
||||
array('table' => USERPROFILE. ' as USERPROFILE',
|
||||
'condition' =>'SALES_PD_DATA.createdby = USERPROFILE.userid',
|
||||
'jointype' => 'LEFT')
|
||||
);
|
||||
|
||||
$where_condition_array = array();
|
||||
if($officer_name)
|
||||
{
|
||||
//$where_condition_array[] = array('SALES_PD_DATA.officer_name like' => '%'.$officer_name.'%');
|
||||
$where_condition_array['SALES_PD_DATA.officer_name like'] = '%'.$officer_name.'%';
|
||||
}
|
||||
if($from_date)
|
||||
{
|
||||
|
||||
$where_condition_array['date(SALES_PD_DATA.createdon) >='] = $from_date;
|
||||
}
|
||||
if($to_date)
|
||||
{
|
||||
|
||||
$where_condition_array['date(SALES_PD_DATA.createdon) <='] = $to_date;
|
||||
}
|
||||
|
||||
$order_by = 'SALES_PD_DATA.sales_pd_id';
|
||||
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array,$order_by,'DESC');
|
||||
//print_r($this->db->last_query());
|
||||
if(count($sales_pd_data))
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $sales_pd_data;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = 'No Data Found';
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -860,16 +860,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
<?php
|
||||
$satellite_url = '';
|
||||
|
||||
if(isset($pd_images['common_images']) && count($pd_images['common_images']))
|
||||
{
|
||||
foreach($pd_images['common_images'] as $com_key => $com_value)
|
||||
{
|
||||
if($com_value['pd_document_title'] == 'satellite')
|
||||
{
|
||||
$satellite_url = $com_value['doc_url'];break;
|
||||
$satellite_url = $com_value['doc_url'];
|
||||
unset($pd_images['common_images'][$com_key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@ -1949,7 +1953,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$tot_rows = ceil(count($pd_images['common_images'])/3);
|
||||
echo '<div id="page_break"></div>';
|
||||
echo '<table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Photograph`s</th></tr></table><br><table ><tbody>';
|
||||
|
||||
$employment_img_names = array('attendance_seen_pic' => 'Attendance Register Image','sal_reg_seen_pic' => 'Salary Register Image','id_card_image' => 'Employee ID card','name_board_img' => 'Name Board Image');
|
||||
$add_factor = 0;
|
||||
for($row = 0;$row < $tot_rows; $row++)
|
||||
{
|
||||
@ -1963,7 +1967,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if(isset($pd_images['common_images'][$i]) && ($pd_images['common_images'][$i]['pd_document_title'] != 'satellite'))
|
||||
{
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="'.$pd_images['common_images'][$i]['doc_url'].'" height = "200" width="200" alt="'.$pd_images['common_images'][$i]['pd_document_title'].'"/><br>'. $pd_images['common_images'][$i]['pd_document_title'] .'</td>';
|
||||
$doc_title = isset($employment_img_names [ $pd_images['common_images'][$i]['pd_document_title'] ]) ? $employment_img_names [ $pd_images['common_images'][$i]['pd_document_title'] ] : $pd_images['common_images'][$i]['pd_document_title'];
|
||||
echo '<td style="text-align:center;border:1px solid;"> <img src="'.$pd_images['common_images'][$i]['doc_url'].'" height = "200" width="200" alt="'.$pd_images['common_images'][$i]['pd_document_title'].'"/><br>'. $doc_title .'</td>';
|
||||
}
|
||||
|
||||
//unset($p_key);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user