RENTALNXT COUNT API

This commit is contained in:
Velz2020 2019-12-02 12:14:58 +05:30
parent 727fdd98b1
commit 5e19305e70
5 changed files with 32 additions and 6 deletions

View File

@ -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

View File

@ -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);
}
}
}

View File

@ -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 ? ("<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".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 );

View File

@ -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' =>"<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".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));

View File

@ -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' =>"<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".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));