Code committed : ps
This commit is contained in:
parent
3b8945983b
commit
c17736423d
@ -767,7 +767,12 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
$records['completed_date'] = date('Y-m-d H:i:s');
|
$records['completed_date'] = date('Y-m-d H:i:s');
|
||||||
//echo 'final';die();
|
//echo 'final';die();
|
||||||
$id = $this->SMC_Credit_PD_Model->updateRecords($records,SMC_CREDIT_PD,array('smc_credit_pd' => $records['smc_credit_pd']));
|
$id = $this->SMC_Credit_PD_Model->updateRecords($records,SMC_CREDIT_PD,array('smc_credit_pd' => $records['smc_credit_pd']));
|
||||||
|
log_message('ERROR','####COMPLETE SMC Credit PD = '.$records['smc_credit_pd']);
|
||||||
|
$random_string = $records['random_string'];
|
||||||
|
$ZIP = smc_creditpd::covertSMCImgs2ZIP($records['smc_credit_pd'],$random_string,array(),0);
|
||||||
|
log_message('ERROR','####COMPLETE SMC IMAGE ZIP = '.$ZIP);
|
||||||
|
$PDF = smc_creditpd::covertSMCImgs2PDF($records['smc_credit_pd'],$random_string,array(),0);
|
||||||
|
log_message('ERROR','####COMPLETE SMC IMAGE PDF = '.$PDF);
|
||||||
//$this->prepareSalesPDReport($records['smc_credit_pd'],false);
|
//$this->prepareSalesPDReport($records['smc_credit_pd'],false);
|
||||||
// sleep(10);
|
// sleep(10);
|
||||||
// log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['smc_credit_pd']);
|
// log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['smc_credit_pd']);
|
||||||
@ -1114,7 +1119,8 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
// updatepdstatus
|
||||||
|
// zip auto generate script
|
||||||
public function testAPISalesPD_post()
|
public function testAPISalesPD_post()
|
||||||
{
|
{
|
||||||
//PDALERTS::sendSalesPDMail($this,32);die();
|
//PDALERTS::sendSalesPDMail($this,32);die();
|
||||||
@ -2023,9 +2029,15 @@ public function filterSalesPDList_post() {
|
|||||||
$this->load->helper('smc_creditpd');
|
$this->load->helper('smc_creditpd');
|
||||||
$res_data = smc_creditpd::covertSMCImgs2ZIP($pdid,$random_string,array(),$regenerate);
|
$res_data = smc_creditpd::covertSMCImgs2ZIP($pdid,$random_string,array(),$regenerate);
|
||||||
|
|
||||||
$response_data['dataStatus'] = true;
|
if(!empty($res_data)){
|
||||||
$response_data['status'] = REST_Controller::HTTP_OK;
|
$response_data['dataStatus'] = true;
|
||||||
$response_data['records'] = $res_data;
|
$response_data['status'] = REST_Controller::HTTP_OK;
|
||||||
|
$response_data['records'] = $res_data;
|
||||||
|
} else {
|
||||||
|
$response_data['dataStatus'] = false;
|
||||||
|
$response_data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||||
|
$response_data['msg'] = 'NO Image Found';
|
||||||
|
}
|
||||||
$this->response($response_data,REST_Controller::HTTP_OK);
|
$this->response($response_data,REST_Controller::HTTP_OK);
|
||||||
|
|
||||||
|
|
||||||
@ -2044,11 +2056,16 @@ public function filterSalesPDList_post() {
|
|||||||
|
|
||||||
$res_data = smc_creditpd::covertSMCImgs2PDF($pdid,$random_string,array(),$regenerate);
|
$res_data = smc_creditpd::covertSMCImgs2PDF($pdid,$random_string,array(),$regenerate);
|
||||||
|
|
||||||
|
if(!empty($res_data)){
|
||||||
$response_data['dataStatus'] = true;
|
$response_data['dataStatus'] = true;
|
||||||
$response_data['status'] = REST_Controller::HTTP_OK;
|
$response_data['status'] = REST_Controller::HTTP_OK;
|
||||||
$response_data['records'] = $res_data;
|
$response_data['records'] = $res_data;
|
||||||
$this->response($response_data,REST_Controller::HTTP_OK);
|
} else {
|
||||||
|
$response_data['dataStatus'] = false;
|
||||||
|
$response_data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||||
|
$response_data['msg'] = 'NO Image Found';
|
||||||
|
}
|
||||||
|
$this->response($response_data,REST_Controller::HTTP_OK);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -616,7 +616,7 @@ class smc_creditpd
|
|||||||
{
|
{
|
||||||
|
|
||||||
$all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 ),SMC_CREDIT_PD_DOCS);
|
$all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 ),SMC_CREDIT_PD_DOCS);
|
||||||
|
if(count($all_pd_images)>0){
|
||||||
// $all_form_names = array('pd_form_id'=>19,'pd_form_name'=>"photograph");
|
// $all_form_names = array('pd_form_id'=>19,'pd_form_name'=>"photograph");
|
||||||
// $form_name[19] = "photograph";
|
// $form_name[19] = "photograph";
|
||||||
|
|
||||||
@ -663,6 +663,7 @@ class smc_creditpd
|
|||||||
unlink($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
unlink($CI->external_path.'/pd_reports/'.$pdid.'/'.$temp_path);
|
||||||
}
|
}
|
||||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+30 minutes');
|
||||||
|
}else return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -694,6 +695,7 @@ class smc_creditpd
|
|||||||
{
|
{
|
||||||
$all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
$all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||||
// $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
// $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||||
|
if(count($all_pd_images)>0){
|
||||||
|
|
||||||
$data_to_view['all_pd_images'] = $all_pd_images;
|
$data_to_view['all_pd_images'] = $all_pd_images;
|
||||||
$img_pdf_data = $CI->load->view('report_templates/PDSMCIMG_PDF',$data_to_view,true);
|
$img_pdf_data = $CI->load->view('report_templates/PDSMCIMG_PDF',$data_to_view,true);
|
||||||
@ -718,7 +720,10 @@ class smc_creditpd
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+7 days');
|
return $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucketname,$key,'+7 days');
|
||||||
|
}
|
||||||
|
else return "";
|
||||||
|
}
|
||||||
|
|
||||||
}}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user