diff --git a/api/application/controllers/SMC_Credit_PD_Controller.php b/api/application/controllers/SMC_Credit_PD_Controller.php
index b67b486e..c07da2ec 100644
--- a/api/application/controllers/SMC_Credit_PD_Controller.php
+++ b/api/application/controllers/SMC_Credit_PD_Controller.php
@@ -510,13 +510,18 @@ class SMC_Credit_PD_Controller extends REST_Controller {
// print_r($filter_form_id);die();
+ if(isset($mater_details[0]['pd_agency_id']) && !empty($mater_details[0]['pd_agency_id'])){
+ ## Vendor Officer id
+ $officer_id = isset($mater_details[0]['fk_pd_allocated_to']) ? $mater_details[0]['fk_pd_allocated_to'] : '';
+ }
+ else{
+ ## Normal Officer id
$officer_id = isset($mater_details[0]['fk_updatedby']) ? $mater_details[0]['fk_updatedby'] : '';
+ }
+
$visit_date = isset($mater_details[0]['pd_visit_date']) ? $mater_details[0]['pd_visit_date'] : '';
$agency_id = isset($mater_details[0]['pd_agency_id']) ? $mater_details[0]['pd_agency_id'] : '';
$agency_name = isset($mater_details[0]['SMC_vendor_agency_name']) ? $mater_details[0]['SMC_vendor_agency_name'] : '';
- $agency_short_name = isset($mater_details[0]['SMC_vendor_agency_short_name']) ? $mater_details[0]['SMC_vendor_agency_short_name'] : '';
- $pd_allocated_to = isset($mater_details[0]['fk_pd_allocated_to']) ? $mater_details[0]['fk_pd_allocated_to'] : '';
- $pd_allocated_to_name = isset($mater_details[0]['pd_allocated_to']) ? $mater_details[0]['pd_allocated_to'] : '';
# Additional Fields For officer
if (!empty($officer_id)) {
@@ -525,12 +530,8 @@ class SMC_Credit_PD_Controller extends REST_Controller {
foreach ($officer_details as $key => $value) {
$CETAPP_creditPD_data['Officer Details'] = $value;
$CETAPP_creditPD_data['Officer Details']['pd_visit_date'] = $visit_date;
- $CETAPP_creditPD_data['Officer Details']['pd_vendor_officer'] = $pd_allocated_to;
- $CETAPP_creditPD_data['Officer Details']['pd_vendor_officer_name'] = $pd_allocated_to_name;
- $CETAPP_creditPD_data['Officer Details']['pd_agency_id'] = $agency_id;
- $CETAPP_creditPD_data['Officer Details']['pd_agency_name'] = $agency_name;
- $CETAPP_creditPD_data['Officer Details']['pd_agency_short_name'] = $agency_short_name;
-
+ $CETAPP_creditPD_data['Officer Details']['agency_id'] = $agency_id;
+ $CETAPP_creditPD_data['Officer Details']['agency_name'] = $agency_name;
}
}
}
diff --git a/api/application/views/smc_creditpd_reports/MWISE.php b/api/application/views/smc_creditpd_reports/MWISE.php
index 2f747d27..036e2dc6 100644
--- a/api/application/views/smc_creditpd_reports/MWISE.php
+++ b/api/application/views/smc_creditpd_reports/MWISE.php
@@ -1535,22 +1535,22 @@ if(count($smc_images))
| Name of PD officer | -+ | ||||||||
| Name of PD Officer | +|||||||||
| Name of PD Agency | |||||||||