From 671497563fe333336fcf6fa36b7945e262fa7a10 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Tue, 26 Nov 2019 15:13:28 +0530 Subject: [PATCH] SALES PD FEDBACK 2 --- .../controllers/Sales_PD_Controller.php | 15 ++++--- .../views/sale_pd_templates/MWISE.php | 44 ++++++++++--------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 670567d6..8cf19be4 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -65,20 +65,23 @@ class Sales_PD_Controller extends REST_Controller { { if($g_value['question_key'] == 'application_id') { - $applicant_id = $g_value['answer_value']; + $applicant_id = $g_value['answer_value'] ? $g_value['answer_value'] : 'Not Provided'; } - if($g_value['question_key'] == 'person_met_during_visit') - { - $applicant_name = $g_value['answer_value']; - - } if($records['product_id'] == 4) { if($g_value['question_key'] == 'company_name') { $applicant_name = $g_value['answer_value']; } + } + else + { + if($g_value['question_key'] == 'person_met_during_visit') + { + $applicant_name = $g_value['answer_value']; + + } } } diff --git a/api/application/views/sale_pd_templates/MWISE.php b/api/application/views/sale_pd_templates/MWISE.php index eb8ee5d6..6fd74bb9 100644 --- a/api/application/views/sale_pd_templates/MWISE.php +++ b/api/application/views/sale_pd_templates/MWISE.php @@ -427,7 +427,7 @@ if(isset($section6)) Any Other remarks - + @@ -486,29 +486,31 @@ if(isset($section6)) '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

'; + // if(count($photos)) + $tot_rows = ceil(count($section9) / 3); + if(count($section9)) + { + echo '
Photograph`s

'; - // for($row = 0;$row < $tot_rows; $row++) - // { - // echo ''; - // $from = $row == 0 ? $row : ($row+2); - // $to = ($from + 2); - // for($i = $from ; $i <= $to; $i++) - // { + for($row = 0;$row < $tot_rows; $row++) + { + echo ''; + $from = $row == 0 ? $row : ($row+2); + $to = ($from + 2); + for($i = $from ; $i <= $to; $i++) + { + if(isset($section9[$i])) + { + echo ''; + } - // echo ''; - - // //unset($p_key); - // } - // echo ''; - // } - // echo '

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

'.$photo_names [ $section9[$i]['img_name'] ].'
'; - // } + //unset($p_key); + } + echo ''; + } + echo ''; + } ?>