diff --git a/api/application/config/routes.php b/api/application/config/routes.php
index e03ebc2f..985b5e29 100644
--- a/api/application/config/routes.php
+++ b/api/application/config/routes.php
@@ -237,6 +237,7 @@ $route['getTypeOfActivetyFromBusinessForm'] = 'PD_Controller/getTypeOfActivetyFr
$route['getCompaniesListsForBusiness'] = 'PD_Controller/getCompaniesListsFromGeneralFormRawJSON';
$route['getPDImages'] = 'PD_Controller/getPDImages';
$route['deactiveFormData'] = 'PD_Controller/deactiveFormData';
+$route['getNextRentalCount'] = 'PD_Controller/getNextRentalCount';
//$route['getTypeOfActivetyFromBusinessJSON'] = 'PD_Controller/getTypeOfActivetyFromBusinessJSON';
//Dashboard and Reports Related routes
diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php
index 892929a2..a4d61792 100644
--- a/api/application/controllers/PD_Controller.php
+++ b/api/application/controllers/PD_Controller.php
@@ -9133,6 +9133,27 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
// }
}
+
+
+ public function getNextRentalCount_get()
+ {
+ $pdid = $this->get('pdid');
+ $nxt_rental_count_id = $this->PD_Model->selectCustomRecords(array('max(rental_count_id) as nxt_rental_count'),array('fk_pd_id' => $pdid,'fk_form_id' => 17),PDFORMDETAILSJSON);
+ if(is_array($nxt_rental_count_id) && count($nxt_rental_count_id))
+ {
+ $data['dataStatus'] = true;
+ $data['status'] = REST_Controller::HTTP_OK;
+ $data['records'] = ( $nxt_rental_count_id[0]['nxt_rental_count'] + 1);
+ $this->response($data,REST_Controller::HTTP_OK);
+ }
+ else
+ {
+ $data['dataStatus'] = true;
+ $data['status'] = REST_Controller::HTTP_OK;
+ $data['records'] = 1;
+ $this->response($data,REST_Controller::HTTP_OK);
+ }
+ }
}
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
index c74a08ea..5cf7e2bc 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI.php
@@ -1261,12 +1261,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep)
{
$loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>is_numeric($loan_form['own_contribution']) && $loan_form['own_contribution'] != 0 ? ("₹"." ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')') : 'Not Provided' );
- $source_of_own_contribution = null;
+ $source_of_own_contribution = '';
foreach($loan_form['source_of_own_contribution_master'] as $own_source)
{
- if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution_mastertribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and '; }
+
+ if(!strcasecmp($own_source, 'others')) { $source_of_own_contribution.=$loan_form['other_source'].' and ';}else{ $source_of_own_contribution.= $own_source.' and '; }
}
+
$source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution));
$loan_table_dispaly_rows[] = array('particulars' => 'Source of Own Contribution','details' => $source_of_own_contribution );
diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php
index 2f767f83..f9b9e37d 100644
--- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php
+++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_ADDON.php
@@ -1521,11 +1521,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep)
{
$loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹"." ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' );
- $source_of_own_contribution = null;
+ $source_of_own_contribution = '';
foreach($loan_form['source_of_own_contribution_master'] as $own_source)
{
- if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and '; }
+
+ if(!strcasecmp($own_source, 'others')) { $source_of_own_contribution.=$loan_form['other_source'].' and ';}else{ $source_of_own_contribution.= $own_source.' and '; }
}
$source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution));
diff --git a/api/application/views/report_templates/JSONTOREPORT_RI.php b/api/application/views/report_templates/JSONTOREPORT_RI.php
index 2751af08..adf4227f 100644
--- a/api/application/views/report_templates/JSONTOREPORT_RI.php
+++ b/api/application/views/report_templates/JSONTOREPORT_RI.php
@@ -1021,11 +1021,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
if((!$is_current_product_bl) && !$is_current_product_lab && !$is_current_product_laep)
{
$loan_table_dispaly_rows[] = array('particulars' => 'Amount of Own Contribution','details' =>"₹"." ".MYUTIL::customIndianNumberFormat($loan_form['own_contribution']).' ('.MYUTIL::numtowords($loan_form['own_contribution']).')' );
- $source_of_own_contribution = null;
+ $source_of_own_contribution = '';
foreach($loan_form['source_of_own_contribution_master'] as $own_source)
{
- if(strpos(strval($own_source), 'Others') === false) { $source_of_own_contribution.= $own_source.' and ';}else{ $source_of_own_contribution.=$loan_form['other_source'].' and '; }
+
+ if(!strcasecmp($own_source, 'others')) { $source_of_own_contribution.=$loan_form['other_source'].' and ';}else{ $source_of_own_contribution.= $own_source.' and '; }
}
$source_of_own_contribution = substr_replace($source_of_own_contribution, '', strrpos($source_of_own_contribution, ' and '),strlen($source_of_own_contribution));