Allocate Issues fixes : ps

This commit is contained in:
sanjeev 2021-12-01 14:54:40 +05:30
parent 0f84179bd1
commit 4fd2154f3e
2 changed files with 61 additions and 13 deletions

View File

@ -1625,7 +1625,7 @@ public function assignPDTempalate($data)
public function allocatePD_post()
{
$records = $this->post('records');
//print_r($records);die();
// print_r($records);die();
//if($records['fk_pd_allocated_to'] != "" || $records['fk_pd_allocated_to'] != null)
//{
// $records['pd_agency_id'] =isset($records['pd_agency_id']) ? $records['pd_agency_id'] : null;
@ -1635,20 +1635,35 @@ public function assignPDTempalate($data)
$lender_id = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDTRIGGER);
$smc_lender_id = ENVIRONMENT == 'production' ? 7 : 35; //SMC lender id MWISE in live and demo
// IF Condition - PD AGENCY ID means SMC VENDOR FLOW
if(isset($records['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 == $lender_id[0]['fk_lender_id'] && isset($records['pd_agency_id']) && $records['pd_agency_id'] != null){
$records['vendor_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ; //Here vendor_status is dynamic (ALLOCATED,SCHEDULED,COMPLETED like that)
}
}
else{
//Normal FLOW
$records['pd_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED;
if(isset($records['pd_status']) && ($records['pd_status'] == ALLOCATED_TO_FIA ))
{
$records['vendor_status'] = TRIGGERED;
}
}
// if($smc_lender_id != $lender_id[0]['fk_lender_id']){
// $records['pd_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ;
// }
// IF Condition - using PDID get the lender and mapped with SMC_lender_id macthed means Vendor status dynamically assigned
if($smc_lender_id == $lender_id[0]['fk_lender_id'] && isset($records['pd_agency_id']) && $records['pd_agency_id'] != null){
$records['vendor_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ; //Here vendor_status is dynamic (ALLOCATED,SCHEDULED,COMPLETED like that)
}
else if(isset($records['pd_status']) && ($records['pd_status'] == ALLOCATED_TO_FIA ))
{
$records['pd_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ;
// if($smc_lender_id == $lender_id[0]['fk_lender_id'] && isset($records['pd_agency_id']) && $records['pd_agency_id'] != null){
// $records['vendor_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ; //Here vendor_status is dynamic (ALLOCATED,SCHEDULED,COMPLETED like that)
// }
// else if(isset($records['pd_status']) && ($records['pd_status'] == ALLOCATED_TO_FIA ))
// {
// $records['pd_status'] = isset($records['pd_status']) ? $records['pd_status'] : ALLOCATED ;
$records['vendor_status'] = TRIGGERED;
}
// $records['vendor_status'] = TRIGGERED;
// }
//}
// $where_condition_array = array('pd_id' => $records['pd_id']);
$pd_id_modified = $this->PD_Model->updateRecords($records,PDTRIGGER,$where_condition_array);
@ -11299,8 +11314,41 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$url = $this->get('url');
$this->load->helper('video_grabber_helper');
// $url="https://venbainfotech.com/VenbaIT/";
$result_data = "127.0.0.1:5000/sh_url?url=".$url;
$result_data = json_decode($result_data,true);
// $result_data = "127.0.0.1:5000/sh_url?url=".$url;
// $result_data = exec($result_data);
// $result_data = json_decode($result_data,true);
$client = new \GuzzleHttp\Client();
// $response = $client->request('GET',$result_data);
// print_r($response);die();
// $ch = curl_init();
// $timeout = 5;
// curl_setopt($ch,CURLOPT_URL,$result_data);
// curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
// curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
// $tinyurl = curl_exec($ch);
// print_r($tinyurl);die();
$client = new \GuzzleHttp\Client();
$res = $client->get( 'http://github.com', [
'headers' => ['Content-Type' => 'application/json'],
]);
print_r($res);
print_r(json_decode($res->getBody()));
// print_r($res);
// try{
// $response = $client->request('GET', 'http://github.com');
// print_r($response);die();
// }
// catch (ConnectException $e) {
// // Connection exceptions are not caught by RequestException
// echo "Internet, DNS, or other connection error\n";
// die;
// }
// catch (RequestException $e) {
// echo "Request Exception\n";
// die;
// }
die();
if(!empty($result_data) && $result_data['datastatus'] == 200)
{
$data['dataStatus'] = true;

View File

@ -1627,7 +1627,7 @@ public function filterSalesPDList_post() {
$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_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
//End of PDF Gen using DOM PDF