diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 6704b9ee..7171b825 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -5765,6 +5765,7 @@ public function getPDFormDetailsJSON_post()
{
//echo $this->assignPDTempalate(1325);die();
+ //$this->getSatelliteImage(1332);die();
$records = $this->post('records');
$pdid = $records['pd_id'];
//$external_path = $this->config->item('external_data_path');
diff --git a/api/application/helpers/assetsform_helper.php b/api/application/helpers/assetsform_helper.php
index 6cdb9784..68c2a92b 100644
--- a/api/application/helpers/assetsform_helper.php
+++ b/api/application/helpers/assetsform_helper.php
@@ -138,111 +138,131 @@ public static function getOthersAssetsDetails($values){
// business asset details
public static function getBusinessAssetsDetails($business_assets){
- //print_r($business_assets);
- $header_row = '
| Loan (Y/N) | ';
+ $rupee_symbol = "₹";
+ $rental_flag = 0;
+ $owned_flag = 0;
+ $show_table = 1;
+ $overall_empty_flag = 0;
+ $is_rented = false;
+ $is_owned = false;
+
+ foreach($business_assets as $bsk => $fetchVal){
+
+
+
+ $owners_list = null;
+ if($fetchVal['business_assets_mode'] == "" || $fetchVal['business_assets_mode'] == null)
+ {
+ if(count($business_assets) == 1){ $show_table = 0;}
+ }
+
+ if(isset($fetchVal['business_name_of_the_owner']) && (is_array($fetchVal['business_name_of_the_owner'])) && count($fetchVal['business_name_of_the_owner']))
+ {
+ foreach($fetchVal['business_name_of_the_owner'] as $owner)
+ {
+ $owners_list.= ($owner['id'] != 0 ? $owner['name'].', ' : $fetchVal['business_name_of_the_other_owner'].', ');
+ }
+ }
+ //print_r($owners_list);
+ $owners_list = substr_replace($owners_list, '', strrpos($owners_list, ','),1);
+
+ $owners_list = $owners_list != "" || $owners_list != null ? $owners_list : 'NA';
+ $ownership_type = $fetchVal['business_ownership_type'];
+
+ if(!strcasecmp($fetchVal['business_ownership_type'],'owned'))
+ {
+ $is_owned = true;
+ //$owned_flag++;
+ }else if(!strcasecmp($fetchVal['business_ownership_type'],'rented'))
+ {
+ $is_rented = true;
+ ///$rental_flag++;
+ }
+
+ if($fetchVal['business_assets_mode']==4){
+
+ $header_row .= 'Asset '.($bsk+1).' | ';
+ $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
+ $sec_row .= ''.($fetchVal['business_details'][0]['equipment_manufacturing_description']).'';
+ $sec_row .= $fetchVal['business_purchase_year'] != '' || $fetchVal['business_purchase_year'] != null ? ' purchased in '.$fetchVal['business_purchase_year'] .' | ' : '';
+ $third_row .= ''. ucfirst($ownership_type) .' | ';
+ $fourth_row .= ''.$owners_list.' | ';
+ $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
+ $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
+ $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
+
+ }
+ // this is for vehicle
+ else if($fetchVal['business_assets_mode']==3){
+ $header_row .= 'Asset '.($bsk+1).' | ';
+ $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
+ $sec_row .= ''.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).'';
+
+ $sec_row .= $fetchVal['business_purchase_year'] != '' || $fetchVal['business_purchase_year'] != null ? ' purchased in '.$fetchVal['business_purchase_year'].' | ' : '';
+ $third_row .= ''. ucfirst($ownership_type) .' | ';
+ $fourth_row .= ''.$owners_list.' | ';
+ $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
+ $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
+ $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
+ }
+
+ // this property
+ else if($fetchVal['business_assets_mode']==2){
+ // switch(strtoupper($fetchVal['business_ownership_type'])) {
+
+ $header_row .= 'Asset '.($bsk+1).' | ';
+ $first_row .= ''.$fetchVal['business_assets_mode_master'].' at '. $fetchVal['business_details'][0]['address_of_the_property'].' | ';
+ $sec_row .= ''.($fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master']).' | ';
+ $third_row .= ''. ucfirst($ownership_type) .' | ';
+ $fourth_row .= ''.$owners_list.' | ';
+ $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
+ $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
+ $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
+ }
+ //this is for other
+ else if($fetchVal['business_assets_mode']==1){
+ $header_row .= 'Asset '.($bsk+1).' | ';
+ $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
+ $sec_row .= ''.$fetchVal['business_details'][0]['any_other_assets'].' | ';
+ $third_row .= ''. ucfirst($ownership_type) .' | ';
+ $fourth_row .= ''.$owners_list.' | ';
+ $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
+ $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
+ $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
+ $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
+ }
+
+ unset($business_assets[$bsk]);
+
+ if($bsk == 6)
+ {
+ break;
+ }
+
+ }
+
- foreach($business_assets as $bsk => $fetchVal){
-
- $owners_list = null;
- if($fetchVal['business_assets_mode'] == "" || $fetchVal['business_assets_mode'] == null)
- {
- if(count($business_assets) == 1){ $show_table = 0;}
- }
-
- if(isset($fetchVal['business_name_of_the_owner']) && (is_array($fetchVal['business_name_of_the_owner'])) && count($fetchVal['business_name_of_the_owner']))
- {
- foreach($fetchVal['business_name_of_the_owner'] as $owner)
- {
- $owners_list.= ($owner['id'] != 0 ? $owner['name'].', ' : $fetchVal['business_name_of_the_other_owner'].', ');
- }
- }
- //print_r($owners_list);
- $owners_list = substr_replace($owners_list, '', strrpos($owners_list, ','),1);
-
- $owners_list = $owners_list != "" || $owners_list != null ? $owners_list : 'NA';
- $ownership_type = $fetchVal['business_ownership_type'];
-
- if(!strcasecmp($fetchVal['business_ownership_type'],'owned'))
- {
- $is_owned = true;
- //$owned_flag++;
- }else if(!strcasecmp($fetchVal['business_ownership_type'],'rented'))
- {
- $is_rented = true;
- ///$rental_flag++;
- }
-
- if($fetchVal['business_assets_mode']==4){
-
- $header_row .= 'Asset '.($bsk+1).' | ';
- $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
- $sec_row .= ''.($fetchVal['business_details'][0]['equipment_manufacturing_description']).'';
- $sec_row .= $fetchVal['business_purchase_year'] != '' || $fetchVal['business_purchase_year'] != null ? ' purchased in '.$fetchVal['business_purchase_year'] .' | ' : '';
- $third_row .= ''. ucfirst($ownership_type) .' | ';
- $fourth_row .= ''.$owners_list.' | ';
- $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
- $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
- $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
-
- }
- // this is for vehicle
- else if($fetchVal['business_assets_mode']==3){
- $header_row .= 'Asset '.($bsk+1).' | ';
- $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
- $sec_row .= ''.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).'';
-
- $sec_row .= $fetchVal['business_purchase_year'] != '' || $fetchVal['business_purchase_year'] != null ? ' purchased in '.$fetchVal['business_purchase_year'].' | ' : '';
- $third_row .= ''. ucfirst($ownership_type) .' | ';
- $fourth_row .= ''.$owners_list.' | ';
- $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
- $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
- $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
- }
-
- // this property
- else if($fetchVal['business_assets_mode']==2){
- // switch(strtoupper($fetchVal['business_ownership_type'])) {
-
- $header_row .= 'Asset '.($bsk+1).' | ';
- $first_row .= ''.$fetchVal['business_assets_mode_master'].' at '. $fetchVal['business_details'][0]['address_of_the_property'].' | ';
- $sec_row .= ''.($fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master']).' | ';
- $third_row .= ''. ucfirst($ownership_type) .' | ';
- $fourth_row .= ''.$owners_list.' | ';
- $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
- $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
- $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
- }
- //this is for other
- else if($fetchVal['business_assets_mode']==1){
- $header_row .= 'Asset '.($bsk+1).' | ';
- $first_row .= ''.$fetchVal['business_assets_mode_master'].' | ';
- $sec_row .= ''.$fetchVal['business_details'][0]['any_other_assets'].' | ';
- $third_row .= ''. ucfirst($ownership_type) .' | ';
- $fourth_row .= ''.$owners_list.' | ';
- $fifth_row .= ''.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_approximate_market_value']) : 'NA').' | ';
- $sixth_row .= ''.(($fetchVal['business_monthly_rented_amt'] != "") ? $rupee_symbol.' '.MYUTIL::customIndianNumberFormat($fetchVal['business_monthly_rented_amt']) : 'NA').' | ';
- $seventh_row .= ''.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').' | ';
- $eighth_row .= ''.($fetchVal['business_emi'] != "" ? ucfirst($fetchVal['business_emi']) : 'NA').' | ';
- }
- }
$header_row .= '
';
$first_row .= '';
@@ -259,7 +279,11 @@ public static function getOthersAssetsDetails($values){
$eighth_row .= '';
$eighth_row = $is_owned ? $eighth_row : '';
- return array('header_row' => $header_row, 'first_row' => $first_row,'sec_row'=> $sec_row,'third_row' =>$third_row,'fourth_row'=>$fourth_row,'fifth_row'=>$fifth_row,'sixth_row'=>$sixth_row,'seventh_row'=>$seventh_row,'eighth_row'=>$eighth_row,'show_table'=> $show_table);
+ $overall_data[] = array('header_row' => $header_row, 'first_row' => $first_row,'sec_row'=> $sec_row,'third_row' =>$third_row,'fourth_row'=>$fourth_row,'fifth_row'=>$fifth_row,'sixth_row'=>$sixth_row,'seventh_row'=>$seventh_row,'eighth_row'=>$eighth_row,'show_table'=> $show_table);
+ }
+
+ return ($overall_data);
+
}
}
?>
\ No newline at end of file
diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php
index c22837db..afeb9a1b 100644
--- a/api/application/helpers/pdalerts_helper.php
+++ b/api/application/helpers/pdalerts_helper.php
@@ -170,12 +170,12 @@ class PDALERTS
// self::sendMail($CI,$lender_email,$msg,$core_details); // currently Mail disabled
}
- if(ENVIRONMENT == 'production')
- {
+ // if(ENVIRONMENT == 'production')
+ // {
if($lender_sales_person_email != null){ self::sendMail($CI,$lender_sales_person_email,$msg,$core_details); }
if($lender_credit_person_email != null){ self::sendMail($CI,$lender_credit_person_email,$msg,$core_details); }
if($financial_institude_email != null){ self::sendMail($CI,$financial_institude_email,$msg,$core_details); }
- }
+ //}
self::sendMail($CI,'komalmittal@sinemanagement.com',$msg,$core_details);
self::sendMail($CI,'sinepd@sinemanagement.com',$msg,$core_details);
diff --git a/api/application/models/PD_Model.php b/api/application/models/PD_Model.php
index 13951ca7..4db0a7c7 100644
--- a/api/application/models/PD_Model.php
+++ b/api/application/models/PD_Model.php
@@ -506,6 +506,7 @@ class PD_Model extends SPARQ_Model {
//$sql = 'SELECT * FROM '.COMMONMASTER.' WHERE table_name = "'.PDTRIGGER.'" AND primary_key = '.$pdid;
//$logs = $this->db->query($sql)->result_array();
$actual_logs = array();
+ $revert_remark_iteration = 0;
if(count($logs))
{
foreach($logs as $log_key => $log)
@@ -726,6 +727,7 @@ class PD_Model extends SPARQ_Model {
break;
case 'pd_status':
+ $data_from_remarks = $this->selectCustomRecords(array('remark'),array('fk_pd_id' => $pdid,'is_revert_remark' => 1),PDREMARKS);
$log_string = $arrayForText[$log['field_name']].' Changed From "'.$log['old_value'].'" to "'.$log['new_value'].'"';
$user = $log['createdby'];
$time = $log['createdon'];
@@ -763,6 +765,11 @@ class PD_Model extends SPARQ_Model {
$actual_logs[$log_key]['meta_data'][] = array('display_name'=>'Rejected Reason Others','display_value'=> $pd_master_detials[0]['bounce_reason_others']);
}
}
+ else if($log['new_value'] == COMPLETED && $log['old_value'] == QC_COMPLETED)
+ {
+ $actual_logs[$log_key]['meta_data'][] = array('display_name'=>'Remark of status change','display_value'=> $data_from_remarks[ $revert_remark_iteration ]['remark']);
+ $revert_remark_iteration++;
+ }
break;
diff --git a/api/application/views/report_templates/JSONTOREPORT_CLIX.php b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
index 7871fc64..a834b146 100644
--- a/api/application/views/report_templates/JSONTOREPORT_CLIX.php
+++ b/api/application/views/report_templates/JSONTOREPORT_CLIX.php
@@ -427,6 +427,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
word-wrap:break-word
width:50%;
}
+
+.intelligence{
+ /*background-color: lightgrey;*/
+ width: auto;
+ border: 5px solid #0191ed;
+ padding: 5px;
+ /*margin: 10px;*/
+}
/* ######### TOOLTIP CSS END ######### */
@@ -1949,22 +1957,25 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if(isset($iterateAsset['details']) && count($iterateAsset['details']))
{
echo $iterateAsset['company_name']; ?>
-