From 68780b8e421ffa7444ec619aab0fb8d749b86330 Mon Sep 17 00:00:00 2001
From: Velz2020
Date: Sat, 23 Nov 2019 18:26:19 +0530
Subject: [PATCH] CLIX PROD ISSUES
---
.../helpers/authorization_helper.php | 2 +-
.../report_templates/JSONTOREPORT_CLIX.php | 112 ++++++++++++++++--
2 files changed, 101 insertions(+), 13 deletions(-)
diff --git a/api/application/helpers/authorization_helper.php b/api/application/helpers/authorization_helper.php
index 7738c7b5..54deff2a 100644
--- a/api/application/helpers/authorization_helper.php
+++ b/api/application/helpers/authorization_helper.php
@@ -9,7 +9,7 @@ class AUTHORIZATION
if (!array_key_exists("Token",$headersData))
{
- set_status_header(REST_CONTROLLER::HTTP_UNAUTHORIZED,"OK");
+ set_status_header(REST_CONTROLLER::HTTP_UNAUTHORIZED,"Unauthorized");
$response['status']=false;
$response['error']="Token not found!";
$custom_log_info = 'Token not found! '.'Token for Authendication Not Found. Request INFO - '. self::apiRequestInfo();
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
index be977dc4..72f1a9cf 100644
--- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php
+++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
@@ -1350,7 +1350,13 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult["family_members_involved"]=$getFamilyMembers;
}
- $bindEachResult['total_per_of_export'] = $businessRow['export_sale_of_total_sales'];
+ $bindEachResult['total_per_of_export'] = $businessRow['export_sale_of_total_sales'];
+
+ $bindEachResult['applicant_use_mobile_wallets'] = $businessRow['applicant_use_mobile_wallets'];
+ $bindEachResult['applicant_use_pos_machines'] = $businessRow['applicant_use_pos_machines'];
+ //$bindEachResult['applicant_use_pos_machines'] = $businessRow['applicant_use_pos_machines'];
+ $bindEachResult['pos_machines_details'] = isset($businessRow['pos_machines_details']) ? $businessRow['pos_machines_details']: null;
+ $bindEachResult['no_of_pos_machines'] = isset($businessRow['no_of_pos_machines']) ? $businessRow['no_of_pos_machines'] : null;
// this is for manufacturing activities
@@ -1813,6 +1819,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
+
+ As per Person(s) met, the applicant is using Mobile Wallets/UPI for business transactions.
';
+ }//else
+ //{
+ // echo 'As per person`s met,applicant using Mobile Wallets/UPI for business transactions.
'
+ //}
+ if(!strcasecmp($fetchRow['applicant_use_pos_machines'],'yes'))
+ {
+ echo 'The applicant has the following POS machines:
';
+ echo '';
+ 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['pos_machines_financial_institution_name'] : 'Not Provided').' | '.(is_numeric($pos['tid_no_of_pos_machine']) ? $pos['tid_no_of_pos_machine'] : 'Not Provided').' |
';
+ }
+ echo '
';
+ }
+
+ }
+
+ ?>
+
+
@@ -2024,7 +2058,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
{
$baRow = $pd_processed_forms[14][$business_count];
$businessFinancialRow = json_decode($baRow['processed_json'],true);
- //print_r($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']);die();
+ //$businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'];
$financial_remarks = $businessFinancialRow['financial_remarks'];
$comments_on_financials = isset($businessFinancialRow['financial_reason']) ? $businessFinancialRow['financial_reason'] : '';
//echo $financial_remarks;die();
@@ -2442,7 +2476,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_seventh_row = '';
$client_eigth_row = '';
$to_no_of_clients = 0;
- $done_on_credit = 0;
+ $done_on_credit = array();
$name_of_the_company = '';
$is_client_details_available = null;
if(isset($pd_processed_forms[2][$business_count]))
@@ -2473,7 +2507,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// this is for manufacturing
if(array_key_exists('manufacturing_details',$clientRow)){
- $done_on_credit += $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'];
+ $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] ? $done_on_credit['manufacturing prodcuts'] = $clientRow['manufacturing_details'][0]['main_raw_materials_total_payments_percent_on_credit'] : '';
foreach($clientRow['manufacturing_details'] as $manuRow){
@@ -2521,7 +2555,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
// this is for trading
if(array_key_exists('trade_details',$clientRow)){
- $done_on_credit += $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
+ //$done_on_credit += $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'];
+
+ $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] ? $done_on_credit['trading products'] = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit'] : '';
foreach($clientRow['trade_details'] as $tradeRow){
if(isset($tradeRow['trading_products'])){
@@ -2568,7 +2604,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//this is for service
if(array_key_exists('service_provider_details',$clientRow)){
- $done_on_credit += $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'];
+ //$done_on_credit += $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'];
+
+ $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] ? $done_on_credit['service providing'] = $clientRow['service_provider_details'][0]['service_products_total_payments_percent_on_credit'] : '';
+
foreach($clientRow['service_provider_details'] as $serviceRow){
@@ -2654,23 +2693,66 @@ defined('BASEPATH') OR exit('No direct script access allowed');
-
+
+
+
- Out of total sales done by ".$name_of_the_company .", ".$done_on_credit."% is done on credit."; }
+
+ $value)
+ {
+ if(count($temp))
+ {
+ foreach ($temp as $tk => $tvalue)
+ {
+ $value == $tvalue ? $all_same = true : $all_same = false ;array_push($temp, $value);
+ }
+ }
+ else
+ {
+ array_push($temp, $value);
+ }
+
+ }
+
+ if($all_same)
+ { echo " Out of total sales done by ".$name_of_the_company .", ".$vals[0]."% is done on credit.
"; }
+ else
+ {
+ $activities = '';
+ foreach ($done_on_credit as $dkey => $dvalue)
+ {
+ $activities .= $dkey.' '.$dvalue.'%, ';
+ }
+ $activities = substr_replace($activities,' ', -2);
+ $activities = substr_replace($activities,' and ',strripos($activities,','),2);
+
+ echo " Out of total sales done by ".$name_of_the_company .", ".$activities."are done on credit.
";
+ }
+
+ }
//CLient Photo Section
@@ -2939,15 +3021,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo $supplier_third_row;
echo $supplier_fourth_row;
- if($pd_master_details[0]['product_abbr'] != 'BL' && $pd_master_details[0]['product_abbr'] != 'LAEP')
+ if($pd_master_details[0]['lender_short_name'] == 'MWISE')
{
echo $supplier_fifth_row;
echo $supplier_sixth_row;
echo $supplier_seventh_row;
- echo $supplier_eigth_row;
+
}
?>
+
+
@@ -4008,7 +4096,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
The table below lists the details of Existing Loan Obligations of the Loan Applicants.