PUSHING ALL CHANGES

This commit is contained in:
Velz2020 2020-02-18 15:30:50 +05:30
parent 951520230b
commit d5933ac1e5
7 changed files with 49 additions and 22 deletions

View File

@ -5859,7 +5859,7 @@ public function getPDFormDetailsJSON_post()
public function codeigniterViewTest_post()
{
//print_r($this->aws_s3->createNewBucket('len3'));die();
//print_r($this->aws_s3->createNewBucket('xmldatatest007'));die();
//satellite_image::getSatelliteImage(1213);die();
//echo $this->assignPDTempalate(1325);die();
//$this->getSatelliteImage(342);die();//velmurugan.s@venbainfotech.com
@ -5870,6 +5870,13 @@ public function getPDFormDetailsJSON_post()
// $this->load->helper('push_notification');
// PUSH_NOTIFICATION::notifyWeb("fJJeUjCWSSs:APA91bHJIHVBJ4KuBbz5sEQSTXG171KpUyraekuejPedkCVrFrULvh8R8JmIHZlovA3QJogr007Yv6IN0Bhja_oBScMBFS2MAWAyPOWLDwsY-OeoPbOx8vzNalvJ7yt0jcB_atJcTbAD","The New PD 255 has been triggered...",array());die();
// print_r($this->db->error());die();
//$s3result= $this->aws_s3->uploadFileToS3Bucket(array('bucket_name' =>'xmldatatest007' ,'key' => 'packages/tourone.xml','sourcefile' => 'C:\xampp\htdocs\XMLTOARRAY\mydata.xml',));die();
//$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI('xmldatatest007','packages/tourone.xml','+1 minutes');
//echo $singed_uri;
// $new = simplexml_load_string(file_get_contents($singed_uri));
// $con = json_decode(json_encode($new),true);
// print_r($con) ;
// die();
set_time_limit(60);
$records = $this->post('records');
$pdid = $records['pd_id'];
@ -6124,9 +6131,9 @@ public function getPDFormDetailsJSON_post()
$t = $this->load->view('report_templates/JSONTOREPORT_DI_AI_ADDON',$data,true);
}
//$t = $this->load->view('temp_html.html',null,true);
echo $t;
//echo $t;
die();
//die();
$total_replaces = substr_count($t,'<span class="tooltip">');
for($i = 0 ;$i < $total_replaces;$i++)
@ -6142,7 +6149,7 @@ public function getPDFormDetailsJSON_post()
$t = substr_replace($t,'',strpos($t,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
}
//echo $t;
//echo $t;die();
//$t = file_get_contents($this->external_path ."/pd_reports/" . $pdid . "/sample.html");
// $start_pos = strpos($t,'</script>');
@ -6308,7 +6315,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
}
}
// $company_list = array( array('company_order_id' => 1));
//print_r($company_list);
//print_r($company_list);die();
$form_array = array();
if($ai_flag == 0) // DI case
@ -6369,6 +6376,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$this->db->WHERE('PDFORMDETAILSJSON.company_id',$company['company_order_id']);
$this->db->WHERE('PDFORMDETAILSJSON.isactive',1);
$template_forms_count = $this->db->GET()->result_array();
print_r($this->db->last_query());die();
}
else
{
@ -7157,6 +7166,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
{
log_message('ERROR','###PDIMAGE saveBase64Images function called'.$pd_id.' - '.$form_id);
$count = 0;
$result = array();
$pks = array();
@ -7183,11 +7193,12 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
}
$temp_file_name = $randomString.date('Y-m-d-H-i-s').'.jpeg';
log_message('ERROR','###PDIMAGE writing started'.$pd_id.' - '.$form_id);
$ifp = fopen( $output_file, 'wb' );
$temp_data = explode( ',', $temp_base64_string );
fwrite( $ifp, base64_decode( $temp_data[ 1 ] ) );
fclose( $ifp );
log_message('ERROR','###PDIMAGE writing done'.$pd_id.' - '.$form_id);
// // ################### start img water marking with text
@ -7217,7 +7228,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
// imagejpeg($curret_file,$output_file,100);// save png image in specified location
// //###########end of image water marking with logo
log_message('ERROR','###PDIMAGE uploading to S3'.$pd_id.' - '.$form_id);
$tempdoc = $output_file;
$tempdocname = $temp_file_name;
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_details[0]['fk_lender_id'];
@ -7233,6 +7244,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
{
log_message('ERROR','###PDIMAGE stored in S3'.$pd_id.' - '.$form_id);
$record_data = array('fk_pd_id' => $pd_id,'pd_document_title'=>$title,'pd_document_name'=>$tempdocname,'fk_form_id'=>$form_id,'is_show_report' =>$is_show_report,'rental_count_id' => $rental_count_id,'location' => $doc['link'],'co_applicant_id' => $co_applicant_id,'img_type' => $img_type);
$record_data['company_id'] = $company_id ? $company_id : null;
$id = $this->PD_Model->saveRecords($record_data,PDDOCUMENTS);

View File

@ -212,8 +212,8 @@ class Sales_PD_Controller extends REST_Controller {
//End of PDF Gen using DOM PDF
$output_file = $this->external_path ."/sales_pd/" . $sales_pd_id . "/temp.pdf";
$bytes = file_put_contents($output_file, $pdf_doc);
// echo $bytes;
// die();
// echo $bytes;
// die();
$bucket_data = array('bucket_name'=>$bucket_name,'key'=>$key,'sourcefile'=>$this->external_path.'/sales_pd/'.$sales_pd_id.'/temp.pdf');
log_message('ERROR','####SALES PD REPORT UPLOAD TO S3'.$sales_pd_id);
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
@ -591,7 +591,7 @@ class Sales_PD_Controller extends REST_Controller {
$this->prepareSalesPDReport($records['sales_pd_id'],false);
sleep(10);
log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$sales_pd_id);
log_message('ERROR','####SALESPD AFTER 10 PREPARED REPORT'.$records['sales_pd_id']);
//echo 'afetr 10';
//trigger mail function
PDALERTS::sendSalesPDMail($this,$records['sales_pd_id']);

View File

@ -524,7 +524,7 @@ class PDALERTS
public static function sendSalesPDMail($CI,$salespd_id)
{
log_message('ERROR','####SALESPD MAIL CALLED'.$sales_pd_id);
log_message('ERROR','####SALESPD MAIL CALLED'.$salespd_id);
$mail = $CI->phpmailer_library->load();
$mail_contents = SELF::salesPDMailContentGrabber($CI,$salespd_id);
//echo "$msg";

View File

@ -27,7 +27,7 @@ class PUSH_NOTIFICATION
$web_msg = array
(
'title'=> $additional_data['to_whom'] .' - '. $additional_data['pd_status'],
'title'=> 'Hi, '.$additional_data['to_whom'] .' - PD was '. $additional_data['pd_status'],
'body'=> $msg,
'icon' => 'https://pdgenie.com/logo/sinelogo.png',
'img' => 'https://pdgenie.com/logo/sinelogo.png'
@ -43,7 +43,8 @@ class PUSH_NOTIFICATION
$app_msg = array
(
'message'=> $msg,
'title'=> $additional_data['pd_status'],
'body'=> $msg,
'title'=> $msg,
'subtitle'=> $msg,
'tickerText'=> $msg,
'vibrate'=>1,

View File

@ -1889,6 +1889,12 @@ class PD_Model extends SPARQ_Model {
function getLenderContactPersons($lender_id,$pd_branch_id)
{
// check CLIX group - this script for is lender is whether clix or clix housing, then have to bring both lender contact persons, otherwise pull contact persons belongs to single entity
$is_lenderid_clix_group = ENVIRONMENT == 'production' && ($lender_id == 5 || $lender_id == 9) ? true : (($lender_id == 16 || $lender_id == 38) ? true : false);
$clix = ENVIRONMENT == 'production' ? 5 : 16;$clixhousing = ENVIRONMENT == 'production' ? 9 : 38;
// check CLIX group
$this->db->select('USERPROFILE.userid, concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as user_name,USERPROFILE.fk_entity_id,USERPROFILE.fk_city,USERPROFILEROLES.user_role,USERPROFILE.fk_entity_type_id,ROLES.role_name,if( POSITION("credit" IN ROLES.role_name),"CREDIT","SALES") as role_type');
$this->db->from(USERPROFILE.' as USERPROFILE');
//$this->db->join(ENTITYLENDERBRANCH.' as ENTITYLENDERBRANCH',"USERPROFILE.fk_entity_id = ENTITYLENDERBRANCH.fk_entity_id and ENTITYLENDERBRANCH.isactive = 1 and ENTITYLENDERBRANCH.fk_city_id = USERPROFILE.fk_city and ENTITYLENDERBRANCH.entity_lender_branch_id = $pd_branch_id");
@ -1898,14 +1904,23 @@ class PD_Model extends SPARQ_Model {
$this->db->join(USERPROFILEROLES. ' as USERPROFILEROLES','USERPROFILEROLES.fk_userid = USERPROFILE.userid and USERPROFILEROLES.isactive =1');
$this->db->join(ROLES.' as ROLES','ROLES.role_id = USERPROFILEROLES.user_role');
//$this->db->where('USERPROFILE.fk_city',$pd_branch_id);
$this->db->where('USERPROFILE.fk_entity_id',$lender_id);
if(!$is_lenderid_clix_group)
{
$this->db->where('USERPROFILE.fk_entity_id',$lender_id);
}
else
{
$this->db->where('USERPROFILE.fk_entity_id',$clix);
$this->db->or_where('USERPROFILE.fk_entity_id',$clixhousing);
}
if($pd_branch_id)
{
$this->db->where('USERPROFILE.fk_lender_branch_id',$pd_branch_id);
//$this->db->where('USERPROFILE.fk_lender_branch_id',$pd_branch_id);
}
$this->db->where('USERPROFILE.isactive',1);
$result = $this->db->get()->result_array();
//print_r($this->db->last_query());
// print_r($this->db->last_query());
return $result;
}

View File

@ -1120,9 +1120,9 @@ if ( isset($pdf) ) {
if($business_assets_details['business_assets_for_address'][0]['business_month'] != ""){ $yrs_being_run.= ' and '.$business_assets_details['business_assets_for_address'][0]['business_month'].' Months';}
echo '<p style="text-align:justify;">';
echo '<span contenteditable="true">The PD visit was done at </span><span class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></span><span contenteditable="true"> of the loan applicants. </span>';
echo '<span contenteditable="true">The </span><span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span><span contenteditable="true"> is </span><span class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></span><span contenteditable="true"> and the business has been in operation from here for the last</span> <span class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></span><span contenteditable="true">.</span>';
echo '<br><br><span contenteditable="true">The</span> <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is located in </span><span class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></span> <span contenteditable="true">'.($estimated_area != 0? 'and the estimated area of the</span> <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is</span> <span class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></span> <span contenteditable="true">.</span>' : '');
echo 'The PD visit was done at <span class="tooltip">'. $address_type. '<span class="tooltiptext">Address Form - Type of Address </span></span> of the loan applicants.';
echo 'The <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is <span class="tooltip">'.$property_owner_type.'<span class="tooltiptext">Business Assest Form - Owner of the Property </span></span> and the business has been in operation from here for the last <span class="tooltip">'.$yrs_being_run.'<span class="tooltiptext">Business Assest Form - Business running Yrs in this premise </span></span>.';
echo '<br><br>The <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is located in <span class="tooltip">'.$locality.'<span class="tooltiptext">Address Form - Locality of Address </span></span> '.($estimated_area != 0? 'and the estimated area of the <span class="tooltip">'.$address_type.'<span class="tooltiptext">Address Form - Type of Address </span></span> is <span class="tooltip">'.$estimated_area.'<span class="tooltiptext">Address Form - Estimated Area </span></span> .' : '');
echo '<br><br><span contenteditable="true">The PD location was </span><span class="tooltip">'. $pd_address['pd_location_master'].'<span class="tooltiptext">Address Form - Approach to PD location </span></span>. ' . '<span contenteditable="true">As Per PD Officer, the</span> <span class="tooltip">'.$address_type .'<span class="tooltiptext">Address Form - Type of Address </span></span> <span contenteditable="true">is situated in</span><span class="tooltip"> '.$comment_locality_master .'<span class="tooltiptext">Address Form - Comment on locality </span></span> <span contenteditable="true">Locality.</span>';
echo '<br><br><span contenteditable="true">The PD officer also made the following observations:</span>' ;
echo '<br><ul>';
@ -2941,7 +2941,7 @@ if($total_no_of_business > 0) {
$supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '<td class="customtd">'. $raw['person_stdcode'].' '.$raw['person_landline'].'</td></tr>' : '<td class="customtd">'.'Not Provided'.'</td>';
$supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '<td class="customtd">'. $raw['person_stdcode'].' '.$raw['person_landline'].'</td>' : '<td class="customtd">'.'Not Provided'.'</td>';

View File

@ -72,9 +72,8 @@
}
else if(isset($_SERVER['HTTP_HOST']) && !strcasecmp($_SERVER['HTTP_HOST'],'localhost') && isset($_SERVER['REQUEST_URI']) && substr_count($_SERVER['REQUEST_URI'], 'sparqapi') == 1)
{
define('ENVIRONMENT','testing');
define('ENVIRONMENT','testing');
define('XLPATH',$_SERVER['DOCUMENT_ROOT'].'/ssa_external_data/'.ENVIRONMENT);
}
else
{