agency Keyadded getSMCVendorPDOfficersList : ps
This commit is contained in:
parent
8512261c2d
commit
fdf86c1e8c
@ -10641,6 +10641,16 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
if(isset($records['vendor_status']) && ($records['vendor_status'] == COMPLETED || $records['vendor_status'] == QC_COMPLETED))
|
if(isset($records['vendor_status']) && ($records['vendor_status'] == COMPLETED || $records['vendor_status'] == QC_COMPLETED))
|
||||||
{
|
{
|
||||||
//echo 'sanskl';
|
//echo 'sanskl';
|
||||||
|
$smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //SMC lender id MWISE in live and demo
|
||||||
|
$current_lender_id = $exist_pd_details[0]['fk_lender_id'];
|
||||||
|
$agency_id = $exist_pd_details[0]['pd_agency_id'];
|
||||||
|
// IF Condition - using PDID get the lender and mapped with SMC_lender_id macthed means Vendor status dynamically assigned
|
||||||
|
if($smc_lender_id == $current_lender_id && isset($agency_id) && $agency_id != null){
|
||||||
|
if(isset($records['vendor_status']) && ($records['vendor_status'] == QC_COMPLETED)){
|
||||||
|
$records['pd_status'] = $records['vendor_status']; //Here vendor_status is (QC_COMPLETED) means i have to update the Normal Status also.
|
||||||
|
}
|
||||||
|
// else{ $records['vendor_status'] = $records['pd_status']; }
|
||||||
|
}
|
||||||
if(!isset($records['complete_override_data']))
|
if(!isset($records['complete_override_data']))
|
||||||
{
|
{
|
||||||
$vendor_form = $this->PD_Model->selectCustomRecords(array('json'),array('isactive' => 1,'fk_form_id' => 25,'fk_pd_id' => $records['pd_id'])
|
$vendor_form = $this->PD_Model->selectCustomRecords(array('json'),array('isactive' => 1,'fk_form_id' => 25,'fk_pd_id' => $records['pd_id'])
|
||||||
@ -10679,16 +10689,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //SMC lender id MWISE in live and demo
|
|
||||||
$current_lender_id = $exist_pd_details[0]['fk_lender_id'];
|
|
||||||
$agency_id = $exist_pd_details[0]['pd_agency_id'];
|
|
||||||
// IF Condition - using PDID get the lender and mapped with SMC_lender_id macthed means Vendor status dynamically assigned
|
|
||||||
if($smc_lender_id == $current_lender_id && isset($agency_id) && $agency_id != null){
|
|
||||||
if(isset($records['vendor_status']) && ($records['vendor_status'] == QC_COMPLETED)){
|
|
||||||
$records['pd_status'] = $records['vendor_status']; //Here vendor_status is (QC_COMPLETED) means i have to update the Normal Status also.
|
|
||||||
}
|
|
||||||
// else{ $records['vendor_status'] = $records['pd_status']; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// die();
|
// die();
|
||||||
// print_r($fields_to_update);die();
|
// print_r($fields_to_update);die();
|
||||||
|
|||||||
@ -1627,7 +1627,7 @@ public function filterSalesPDList_post() {
|
|||||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo $html_content;exit();
|
echo $html_content;exit();
|
||||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||||
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||||
//End of PDF Gen using DOM PDF
|
//End of PDF Gen using DOM PDF
|
||||||
@ -1819,7 +1819,8 @@ public function filterSalesPDList_post() {
|
|||||||
// $role_id = $this->get('role_id');
|
// $role_id = $this->get('role_id');
|
||||||
// $entity_id = $this->get('entity_id');
|
// $entity_id = $this->get('entity_id');
|
||||||
// $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id);
|
// $Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($role_id,$entity_id);
|
||||||
$Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList();
|
$agency_id = $this->get('agency_id');
|
||||||
|
$Lenderlist = $this->PD_Model->getSMCVendorPDOfficersList($agency_id);
|
||||||
$data = (!empty($Lenderlist))
|
$data = (!empty($Lenderlist))
|
||||||
? array('dataStatus' => true,'status' => REST_Controller::HTTP_OK,'records' => $Lenderlist)
|
? array('dataStatus' => true,'status' => REST_Controller::HTTP_OK,'records' => $Lenderlist)
|
||||||
: array('dataStatus' => false,'status' => REST_Controller::HTTP_NOT_FOUND,'msg' =>'No Records Found!');
|
: array('dataStatus' => false,'status' => REST_Controller::HTTP_NOT_FOUND,'msg' =>'No Records Found!');
|
||||||
|
|||||||
@ -2300,7 +2300,7 @@ class PD_Model extends SPARQ_Model {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSMCVendorPDOfficersList(){
|
function getSMCVendorPDOfficersList($agency_id){
|
||||||
// if(empty($role)){
|
// if(empty($role)){
|
||||||
// $role = array(28,29);
|
// $role = array(28,29);
|
||||||
$role = array(29);
|
$role = array(29);
|
||||||
@ -2310,6 +2310,7 @@ class PD_Model extends SPARQ_Model {
|
|||||||
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive = 1','LEFT');
|
$this->db->join(USERPROFILEROLES.' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive = 1','LEFT');
|
||||||
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role and ROLES.isactive = 1','LEFT');
|
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role and ROLES.isactive = 1','LEFT');
|
||||||
$this->db->where('USERPROFILE.isactive',1);
|
$this->db->where('USERPROFILE.isactive',1);
|
||||||
|
$this->db->where('USERPROFILE.smc_agency_id',$agency_id);
|
||||||
$this->db->where_in('USERPROFILEROLES.user_role',$role);
|
$this->db->where_in('USERPROFILEROLES.user_role',$role);
|
||||||
// if(!empty($entity)){ $this->db->where('USERPROFILE.fk_entity_id',$entity); }
|
// if(!empty($entity)){ $this->db->where('USERPROFILE.fk_entity_id',$entity); }
|
||||||
$result = $this->db->get()->result_array();
|
$result = $this->db->get()->result_array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user