From 6adeda862af4e15c8f92aa0edaa87dd1d653d533 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 7 Feb 2020 10:31:33 +0530 Subject: [PATCH] DIRCHECK SALES PD APP ID --- .../helpers/external_dir_check_helper.php | 16 ++++++++-------- api/application/helpers/financialform_helper.php | 4 +++- .../views/sale_pd_templates/MWISE.php | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/api/application/helpers/external_dir_check_helper.php b/api/application/helpers/external_dir_check_helper.php index 9f5e5fd6..3a96eaf1 100644 --- a/api/application/helpers/external_dir_check_helper.php +++ b/api/application/helpers/external_dir_check_helper.php @@ -9,24 +9,24 @@ class EXTERNAL_DIR_CHECK public static function checkExternalDirectory($pd_id = null) //$msg,$data,$log_type { //echo 'EXTERNAL_DIR_CHECK called'; - $path = $_SERVER['DOCUMENT_ROOT'].'/ssa_external_data'; + $path = XLPATH; if(!file_exists($path)) { - mkdir($path,0761); + mkdir($path,0777); } - $path .='/'.ENVIRONMENT; - if(!file_exists($path)) - { - mkdir($path,0761); - } + // $path .='/'.ENVIRONMENT; + // if(!file_exists($path)) + // { + // mkdir($path,0761); + // } $array = array($path.'/ci_logs',$path.'/api_request_logs',$path.'/app_logs',$path.'/pd_reports',$path.'/sales_pd',$path.'/sales_pd_logs'); foreach ($array as $key => $value) { if(!file_exists($value)) { - mkdir($value,0761); + mkdir($value,0777); } } diff --git a/api/application/helpers/financialform_helper.php b/api/application/helpers/financialform_helper.php index 0799a4e4..1113fc5f 100644 --- a/api/application/helpers/financialform_helper.php +++ b/api/application/helpers/financialform_helper.php @@ -84,7 +84,9 @@ public static function getOtherLoanDetails($data,$pdid){ $first_row .= $tag['loan_type']==1 ? ''.$tag['others_loan_type'].'' : ''.$tag['loan_type_master'] .''; - $second_row .= ''.$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['loan_amount']).''; + + $loan_amt = $tag['loan_amount'] ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($tag['loan_amount']) : 'Not Provided'; + $second_row .= ''.$loan_amt.''; //$third_row = ''.MYUTIL::customIndianNumberFormat($tag['loan_amount']).''; diff --git a/api/application/views/sale_pd_templates/MWISE.php b/api/application/views/sale_pd_templates/MWISE.php index e99e3d1b..e43f757d 100644 --- a/api/application/views/sale_pd_templates/MWISE.php +++ b/api/application/views/sale_pd_templates/MWISE.php @@ -115,7 +115,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); Application ID - +