SAVE HTML REPORT

This commit is contained in:
Velz2020 2019-10-14 19:34:48 +05:30
parent 9ce050f1bb
commit 3e2cd30859

View File

@ -5765,7 +5765,7 @@ public function getPDFormDetailsJSON_post()
{
//echo $this->assignPDTempalate(1325);die();
//$this->getSatelliteImage(1332);die();velmurugan.s@venbainfotech.com
//$this->getSatelliteImage(283);die();//velmurugan.s@venbainfotech.com
//PDALERTS::sendMail($this,'vitvelz@gmail.com','PDGENIE TEST',array());die();
$records = $this->post('records');
$pdid = $records['pd_id'];
@ -7846,6 +7846,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$report_data = substr_replace($report_data,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
$report_data = substr_replace($report_data,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
$report_data = substr_replace($report_data,'</body></html>',-1,0);
$content = $report_data;
}
@ -7858,7 +7859,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
//Update Latest File name and qc edited status into trigger table
$update = $this->PD_Model->updateRecords(array('pd_report_html_filename' => $pd_report_time,'fk_createdby' => $fk_createdby,'is_qc_edited' => 1),PDTRIGGER,array('pd_id' => $pdid,'random_string' => $random_string));
//Update previous latest as 0
//Update previous versions as 0
$update_reports_version_blob = $this->PD_Model->updateRecords(array('is_latest' => 0),PDREPORTSVERSIONBLOB,array('fk_pd_id' => $pdid,'is_latest' => 1));
//insert current PD report html file name as latest
@ -7872,7 +7873,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$logger->info('QC Edit Called',array('Edited by' => $fk_createdby,'DB Result' => $update .'-'. $update_reports_version_blob .'-'. $pd_reports_version_blob_new));
$dat['dataStatus'] = true;
$dat['status'] = REST_Controller::HTTP_OK;
$dat['msg'] = 'Report Generated Sucessfully..!';
$dat['msg'] = 'Report Generated Successfully..!';
$this->response($dat,REST_Controller::HTTP_OK);
}
}