minor fixes VDO : ps

This commit is contained in:
VE10-Sanjeev 2022-11-05 11:34:28 +05:30
parent 206ec6650c
commit 5cb373d1af

View File

@ -22,7 +22,7 @@ class PD_Controller extends REST_Controller
//class level variable declaration
//protected $external_path;
private $photo_names = array('selfie_with_person_met' => array('Person met', '18', 0, 0), 'person_met_id' => array('Person met ID Proof', '18', 0, 0), 'address_proof_visited' => array('Address Proof', '5', 0, 0), 'name_board_seen' => array('Name Board Seen', '13', 0, 0), 'machinery_image' => array('Machinery Image', '22', 0, 0), 'gst_Regn_cert_pic' => array('GST Regn Cert', '13', 0, 0), 'pf_regn_pic' => array('PF Regn', '13', 0, 0), 'esic_regn_pic' => array('ESIC Regn', '13', 0, 0), 'export_import_cert_pic' => array('Export Import Cert', '13', 0, 0), 'factory_cert_pic' => array('Factory Cert', '13', 0, 0), 'shop_eat_act_cert_pic' => array('Shop Est Act Cert', '13', 0, 0), 'eb_bill_pic' => array('EB Bill', '13', 0, 0), 'practice_cert_pic' => array('Cert of Practice', '13', 0, 0), 'fire_noc_pic' => array('Fire NOC', '13', 0, 0), 'stock_image' => array('Stock image', '11', 1, 1), 'client_image' => array('Client Bills', '2', 1, 1), 'supplier_image' => array('Supplier Bills', '1', 1, 1), 'office_setup' => array('Office/Business Setup', '13', 1, 1), 'additional_photos' => array('Additional Photographs', '13', 1, 1),'video'=>array('Video','34',0,0));
private $photo_names = array('selfie_with_person_met' => array('Person met', '18', 0, 0), 'person_met_id' => array('Person met ID Proof', '18', 0, 0), 'address_proof_visited' => array('Address Proof', '5', 0, 0), 'name_board_seen' => array('Name Board Seen', '13', 0, 0), 'machinery_image' => array('Machinery Image', '22', 0, 0), 'gst_Regn_cert_pic' => array('GST Regn Cert', '13', 0, 0), 'pf_regn_pic' => array('PF Regn', '13', 0, 0), 'esic_regn_pic' => array('ESIC Regn', '13', 0, 0), 'export_import_cert_pic' => array('Export Import Cert', '13', 0, 0), 'factory_cert_pic' => array('Factory Cert', '13', 0, 0), 'shop_eat_act_cert_pic' => array('Shop Est Act Cert', '13', 0, 0), 'eb_bill_pic' => array('EB Bill', '13', 0, 0), 'practice_cert_pic' => array('Cert of Practice', '13', 0, 0), 'fire_noc_pic' => array('Fire NOC', '13', 0, 0), 'stock_image' => array('Stock image', '11', 1, 1), 'client_image' => array('Client Bills', '2', 1, 1), 'supplier_image' => array('Supplier Bills', '1', 1, 1), 'office_setup' => array('Office/Business Setup', '13', 1, 1), 'additional_photos' => array('Additional Photographs', '13', 1, 1));
private $existing_imges = array();
function __construct()
@ -8675,6 +8675,12 @@ class PD_Controller extends REST_Controller
if ($pd_master_details[0]['customer_segment_abbr'] == 'SAL') {
$this->photo_names['attendance_seen_pic'] = array('Attendance Img', '13');
}
if ($pd_master_details[0]['fk_pd_type'] == '4') {
$this->photo_names['video'] = array('Video', '34','0','0');
}else if ($pd_master_details[0]['fk_pd_type'] != '4') {
$this->photo_names['video'] = array('Video', '24','0','0');
}
// print_r($this->photo_names);die();
$final_data = array();
@ -9046,8 +9052,8 @@ class PD_Controller extends REST_Controller
$record_data = array('fk_pd_id' => $pd_id, 'pd_document_title' => 'Video', 'pd_document_name' => $temp_file_name, 'fk_form_id' => $form_id, 'is_show_report' => 1, 'rental_count_id' => null, 'location' => null, 'co_applicant_id' => null, 'img_type' => null, 'image_key' => "video", "pd_image_alias_name" => null,"content_type"=>2);
$record_data['company_id'] = null;
$id = $this->PD_Model->saveRecords($record_data, PDDOCUMENTS);
if($folder_to_check . '/' . $file_name_wo_extension . '.webm'){unlink($folder_to_check . '/' . $file_name_wo_extension . '.webm');}
if($folder_to_check . '/' . $file_name_wo_extension . '.mp4'){unlink($folder_to_check . '/' . $file_name_wo_extension . '.mp4');}
if(file_exists($folder_to_check . '/' . $file_name_wo_extension . '.webm')){unlink($folder_to_check . '/' . $file_name_wo_extension . '.webm');}
if(file_exists($folder_to_check . '/' . $file_name_wo_extension . '.mp4')){unlink($folder_to_check . '/' . $file_name_wo_extension . '.mp4');}
if ($id != null || $id != "") {
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;