report change 1 : ps

This commit is contained in:
sanjeev 2022-02-22 10:52:38 +05:30
parent 01c8595785
commit 2290cf98b3
5 changed files with 13 additions and 9 deletions

View File

@ -157,7 +157,7 @@ class Sales_PD_Controller extends REST_Controller {
function prepareSalesPDReport($sales_pd_id,$api = true)
{
log_message('ERROR','####PREPARE SALESPD REPORT CALLED'.$sales_pd_id);
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','PRODUCT.abbr');
$columns = array('SALES_PD_DATA.*','ENTITY.short_name','PRODUCT.abbr','USERPROFILE.smc_emp_code');
$table = SALES_PD_DATA.' as SALES_PD_DATA';
$joins = array(
array('table' => ENTITY. ' as ENTITY',
@ -165,14 +165,16 @@ class Sales_PD_Controller extends REST_Controller {
'jointype' => 'INNER'),
array('table' => PRODUCTS. ' as PRODUCT',
'condition' =>'SALES_PD_DATA.product_id = PRODUCT.product_id',
'jointype' => 'INNER')
'jointype' => 'INNER'),
array('table' => USERPROFILE. ' as USERPROFILE',
'condition' =>'SALES_PD_DATA.createdby = USERPROFILE.userid',
'jointype' => 'LEFT')
);
$where_condition_array = array('SALES_PD_DATA.sales_pd_id' => $sales_pd_id);
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array);
$pd_type = "";
if($sales_pd_data[0]['sales_pd_type'] == 1){$pd_type = "Physical PD-"; }else if($sales_pd_data[0]['sales_pd_type'] == 2){$pd_type = "Tele PD-";}
// print_r($sales_pd_data);die();
if($sales_pd_data)
{

View File

@ -8,6 +8,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
$title = "";
if($master[0]['sales_pd_type'] == 1){$title = "Physical "; }else if($master[0]['sales_pd_type'] == 2){$title = "Tele ";}
$smc_emp_code = $master[0]['smc_emp_code'];
//print_r($master[0]['abbr']);die();
?><!DOCTYPE html>
<html lang="en">
@ -619,7 +620,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tr>
<tr>
<td colspan="3" >Employee ID </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['designation']?></td>
<td class="tdcenteralign" colspan="7" ><?php echo $smc_emp_code?$smc_emp_code:"-"?></td>
</tr>
<tr>
<?php if($master[0]['sales_pd_type'] == 1){?>

View File

@ -8,6 +8,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
$title = "";
if($master[0]['sales_pd_type'] == 1){$title = "Physical "; }else if($master[0]['sales_pd_type'] == 2){$title = "Tele ";}
$smc_emp_code = $master[0]['smc_emp_code'];
//print_r($master[0]['abbr']);die();
?><!DOCTYPE html>
<html lang="en">
@ -599,7 +600,7 @@ if(isset($section6))
</tr>
<tr>
<td colspan="3" >Employee ID </td>
<td class="tdcenteralign" colspan="7" ><?php echo $section8['smc_emp_code']?></td>
<td class="tdcenteralign" colspan="7" ><?php echo $smc_emp_code?$smc_emp_code:"-"?></td>
</tr>
<tr>
<td colspan="3" >Date of PD Visit </td>

View File

@ -1539,10 +1539,10 @@ if(count($smc_images))
<td colspan="3" >Designation of Sales Team Member </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['updatedby_designation']?></td>
</tr> -->
<tr>
<!-- <tr>
<td colspan="3" >Employee ID </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['smc_emp_code']?></td>
</tr>
</tr> -->
<tr>
<td colspan="3" >Date of PD Visit </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['pd_visit_date']?></td>

View File

@ -583,10 +583,10 @@ if(count($smc_images))
<td colspan="3" >Designation of Sales Team Member </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['updatedby_designation']?></td>
</tr> -->
<tr>
<!-- <tr>
<td colspan="3" >Employee ID </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['smc_emp_code']?></td>
</tr>
</tr> -->
<tr>
<td colspan="3" >Date of PD Visit </td>
<td class="tdcenteralign" colspan="7" ><?php echo $pd_master_details[0]['pd_visit_date']?></td>