MONEY WISE SALE PD RELATED
This commit is contained in:
parent
1a0a1da1b1
commit
9aa7ce3bd4
@ -4801,7 +4801,7 @@ public function getPDFormDetailsJSON_post()
|
||||
//Get Common Images
|
||||
$data['pd_images']['common_images'] = $this->PD_Model->getSignedPDDocsURL($pdid,null,null,'common',null,'report');
|
||||
$temp = 'DEFAULT DATA';
|
||||
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'SMC' && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
|
||||
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'SMC'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
|
||||
{
|
||||
$temp = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true);
|
||||
}
|
||||
@ -6024,7 +6024,7 @@ public function getPDFormDetailsJSON_post()
|
||||
$t = "";
|
||||
if(!count($add_on_pd))
|
||||
{
|
||||
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'SMC' && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
|
||||
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || ($data['pd_master_details'][0]['lender_short_name'] == 'SMC'))// && $data['pd_master_details'][0]['product_abbr'] == 'BL'))
|
||||
{
|
||||
$t = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true);
|
||||
}
|
||||
|
||||
@ -101,12 +101,12 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
|
||||
$where_condition_array = array('SALES_PD_DATA.sales_pd_id' => $sales_pd_id);
|
||||
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array);
|
||||
print_r($sales_pd_data);//die();
|
||||
//print_r($sales_pd_data);//die();
|
||||
|
||||
if($sales_pd_data)
|
||||
{
|
||||
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$sales_pd_data[0]['lender_id'];
|
||||
$key = 'sales_pd/'.$sales_pd_id;
|
||||
$key = 'sales_pd/'.$sales_pd_id.'/'.$sales_pd_id.'.pdf';
|
||||
|
||||
if(!file_exists($this->external_path.'/sales_pd/'.$sales_pd_id))
|
||||
{
|
||||
@ -122,18 +122,30 @@ 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);
|
||||
die();
|
||||
$bucket_data = array('bucket_name'=>$bucket_name,'key'=>$key.'/1.pdf','sourcefile'=>$this->external_path.'/sales_pd/'.$sales_pd_id.'/temp.pdf');
|
||||
//die();
|
||||
$bucket_data = array('bucket_name'=>$bucket_name,'key'=>$key,'sourcefile'=>$this->external_path.'/sales_pd/'.$sales_pd_id.'/temp.pdf');
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
echo 'SUCESS';
|
||||
//echo 'SUCESS';
|
||||
$this->Sales_PD_Model->updateRecords(array('is_pdf' => 1,'is_edited' => 0),SALES_PD_DATA,array('sales_pd_id' => $sales_pd_id));
|
||||
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $singed_uri;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$key,'30 minutes');
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $singed_uri;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2544,7 +2544,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to']? '<td class="customtd">'. $trading_product['trade_product_credit_days_from'].' to '. $trading_product['trade_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ;
|
||||
|
||||
$client_eigth_row .= isset($main_raw_material['trade_product_contribution_total_turnover']) && $main_raw_material['trade_product_contribution_total_turnover'] != "" ? '<td class="customtd">'. $main_raw_material['trade_product_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
|
||||
$client_eigth_row .= isset($trading_product['trade_product_contribution_total_turnover']) && $trading_product['trade_product_contribution_total_turnover'] != "" ? '<td class="customtd">'. $trading_product['trade_product_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
|
||||
|
||||
}
|
||||
|
||||
@ -2591,7 +2591,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to']? '<td class="customtd">'. $service_product['service_provider_product_credit_days_from'].' to '. $service_product['service_provider_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ;
|
||||
|
||||
$client_eigth_row .= isset($main_raw_material['service_provider_contribution_total_turnover']) && $main_raw_material['service_provider_contribution_total_turnover'] != "" ? '<td class="customtd">'. $main_raw_material['service_provider_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
|
||||
$client_eigth_row .= isset($service_product['service_provider_contribution_total_turnover']) && $service_product['service_provider_contribution_total_turnover'] != "" ? '<td class="customtd">'. $service_product['service_provider_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
|
||||
|
||||
}
|
||||
}
|
||||
@ -2642,7 +2642,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php echo $client_fourth_row?>
|
||||
|
||||
<?php
|
||||
if($pd_master_details[0]['lender_short_name'] == 'MONEYWISE')
|
||||
if($pd_master_details[0]['lender_short_name'] == 'SMC')
|
||||
{
|
||||
?>
|
||||
<?php echo $client_fifth_row?>
|
||||
@ -2829,7 +2829,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '<td class="customtd">'. $tradeRow['trade_product_credit_days_from'].' to '. $tradeRow['trade_product_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>';
|
||||
|
||||
$supplier_eigth_row .= isset($raw['trade_product_contribution_total_purchase']) && $raw['trade_product_contribution_total_purchase'] != "" ? '<td class="customtd">'.$raw['trade_product_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
|
||||
$supplier_eigth_row .= isset($tradeRow['trade_product_contribution_total_purchase']) && $tradeRow['trade_product_contribution_total_purchase'] != "" ? '<td class="customtd">'.$tradeRow['trade_product_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
|
||||
///array_push($supplierResult,$temp);
|
||||
|
||||
//}
|
||||
@ -2875,7 +2875,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '<td class="customtd">'. $serviceRow['service_provider_credit_days_from'].' to '. $serviceRow['service_provider_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>';
|
||||
|
||||
$supplier_eigth_row .= isset($raw['service_provider_contribution_total_purchase']) && $raw['service_provider_contribution_total_purchase'] != "" ? '<td class="customtd">'.$raw['service_provider_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
|
||||
$supplier_eigth_row .= isset($serviceRow['service_provider_contribution_total_purchase']) && $serviceRow['service_provider_contribution_total_purchase'] != "" ? '<td class="customtd">'.$serviceRow['service_provider_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
|
||||
//array_push($supplierResult,$temp);
|
||||
|
||||
//}
|
||||
@ -2927,7 +2927,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
echo $supplier_third_row;
|
||||
echo $supplier_fourth_row;
|
||||
|
||||
if($pd_master_details[0]['lender_short_name'] == 'MONEYWISE')
|
||||
if($pd_master_details[0]['lender_short_name'] == 'SMC')
|
||||
{
|
||||
|
||||
echo $supplier_fifth_row;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user