flyhi : ps
This commit is contained in:
parent
5f33b2653e
commit
d2ba78ecb5
@ -156,16 +156,18 @@ class Flyhi_Controller extends REST_Controller {
|
||||
}
|
||||
$count = $this->Flyhi_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $lender_id,'isactive' => 1),SALES_PD_DATA);
|
||||
$lender_short_name = $this->Flyhi_Model->selectCustomRecords(array('short_name'),array('entity_id' => $lender_id),ENTITY);
|
||||
$salepd_serial_no = 'FHFSL-'.(++$count[0]['count']);
|
||||
|
||||
$flyhipd_serial_no = $lender_short_name.'-'.(++$count[0]['count']);
|
||||
$FLYHI_PD['applicant_name'] = $applicant_name;
|
||||
$FLYHI_PD['applicant_id'] = $applicant_id;
|
||||
$FLYHI_PD['city_id']=$city;
|
||||
$FLYHI_PD['sales_pd_sno'] = $salepd_serial_no;
|
||||
$FLYHI_PD['sales_pd_sno'] = $flyhipd_serial_no;
|
||||
$FLYHI_PD['loan_amount'] = $loan_amount;
|
||||
$FLYHI_PD['lender_sales_person'] = $lender_sales_person ;
|
||||
$FLYHI_PD['lender_credit_person'] = $lender_credit_person ;
|
||||
$FLYHI_PD['pd_branch_id'] = $pd_branch_id;
|
||||
$FLYHI_PD['lender_id'] = $lender_id;
|
||||
$FLYHI_PD['createdby'] = $fk_createdby;
|
||||
$FLYHI_PD['rand_string'] = $randomString;
|
||||
$flyhi_pd_id = $this->Flyhi_Model->saveRecords($FLYHI_PD,SALES_PD_DATA);
|
||||
$section_data = json_encode($records);
|
||||
$this->Sales_PD_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('sales_pd_id' =>$flyhi_pd_id,'section_id' => 1 ));
|
||||
@ -237,7 +239,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
$FLYHI_PD['lender_credit_person'] = $lender_credit_person ;
|
||||
$FLYHI_PD['pd_branch_id'] = $pd_branch_id;
|
||||
$FLYHI_PD['lender_id'] = $lender_id;
|
||||
$flyhi_pd_id = $this->Flyhi_Model->updateRecords($FLYHI_PD,SALES_PD_DATA,array('sales_pd_id' => $records['sales_pd_id']));
|
||||
$flyhi_pd_id = $this->Flyhi_Model->updateRecords($FLYHI_PD,SALES_PD_DATA,array('sales_pd_id' => $flyhi_pd_id));
|
||||
$status = $records['is_complete'];
|
||||
$fields = array('sales_pd_id' => $flyhi_pd_id, 'section_id' => 1, 'status' =>$status ,'section_data' => $section_data,'createdby' => $fk_createdby);
|
||||
$is_entry_done = $this->Sales_PD_Model->saveRecords($fields,SALESPD_SECTION_DATA);
|
||||
@ -262,7 +264,7 @@ class Flyhi_Controller extends REST_Controller {
|
||||
|
||||
public function getFlyhiPD_get()
|
||||
{
|
||||
$Flyhi_pdid = $this->get('sales_pd_id');
|
||||
$Flyhi_pdid = $this->get('pd_id');
|
||||
$section_data = array();
|
||||
if(isset($Flyhi_pdid) || $Flyhi_pdid != "" || $Flyhi_pdid != null)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user