From 3591435d7bb200a1e184bb616f126f6d9515189b Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sat, 16 Nov 2019 19:29:54 +0530 Subject: [PATCH] SALES PD IMG ROW --- .../controllers/Sales_PD_Controller.php | 6 ++-- .../report_templates/JSONTOREPORT_DI_AI.php | 30 +++++++++---------- .../views/sale_pd_templates/SMC.php | 19 ++++++++---- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index dc7ecc84..c7d9486e 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -87,8 +87,8 @@ class Sales_PD_Controller extends REST_Controller { } } - $records['applicant_id'] = $applicant_name; - $records['applicant_name'] = $applicant_id; + $records['applicant_id'] = $applicant_id; + $records['applicant_name'] = $applicant_name; $records['officer_name'] = $officer; $id = null; if(!$records['sales_pd_id']) @@ -162,7 +162,7 @@ class Sales_PD_Controller extends REST_Controller { } $view_data['section9'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id),SALEPD_DOCS); - //print_r($view_data);die(); + //print_r($this->db->last_query());die(); //$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr']; $view_name = $sales_pd_data[0]['short_name']; $html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true); diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php index 7fa6f79e..a9e348c7 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php @@ -1867,7 +1867,7 @@ if($total_no_of_business > 0) { echo ' Name of the Financial Insitution TID Number of POS machine '; foreach($fetchRow['pos_machines_details'] as $pos) { - echo ' '.$pos['pos_machines_financial_institution_name'].' '.$pos['tid_no_of_pos_machine'].' '; + echo ' '.($pos['pos_machines_financial_institution_name'] ? $pos['pos_machines_financial_institution_name'] : 'Not Provided').' '.$pos['tid_no_of_pos_machine'].' '; } echo ''; } @@ -3995,7 +3995,7 @@ if($total_no_of_business > 0) { - The table below lists the details of Existing Loan Obligations of the Loan Applicants. + - - + 'Selfie with person met','approach_to_pd_location' => 'Approach to pd location','name_board_seen' => 'Name board seen', 'stock_image' => 'Stock image','workplace_interior_image' => 'Workplace interior image'); //if(count($photos)) + $tot_rows = ceil(count($section9) / 3); if(count($section9)) { echo '
Photograph`s

'; - foreach ($section9 as $p_key => $p_value) + for($row = 0;$row < $tot_rows; $row++) { - - if(!($iter % 3)) { echo ''; } - echo ''; + echo ''; + $from = $row == 0 ? $row : ($row+2); + $to = ($from + 2); + for($i = $from ; $i <= $to; $i++) + { - if(!($iter % 3) && $iter != 0) { echo ''; } - $iter++; + + echo ''; + + //unset($p_key); + } + echo ''; } echo '

'.$photo_names [ $p_value['img_name'] ].'

'.$photo_names [ $section9[$i]['img_name'] ].'
'; }