|
|
@@ -2360,15 +2360,8 @@ class ocean_order {
|
|
|
|
|
|
//delivery
|
|
|
$order_from = $_REQUEST['_schemas'];
|
|
|
- $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
|
|
|
- bb as (select o.serial_no from $order_from.ocean o
|
|
|
- where exists(select 1 from aa where aa.master_base_number= o.master_base_number)
|
|
|
- and o.bol_type = 'CONSOL' and o.status::text <> 'Cancelled'::text),
|
|
|
- cc as (select serial_no from aa
|
|
|
- union all
|
|
|
- select serial_no from bb
|
|
|
- ),
|
|
|
- h as (select * from station_data.do_header h where h.serial_no in (select serial_no from cc))
|
|
|
+ $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
|
|
|
+ h as (select * from station_data.do_header h where h.serial_no in (select serial_no from aa))
|
|
|
|
|
|
select h.est_delivery_date,h.est_delivery_time,
|
|
|
h.consignee_country_code,h.consignee_city_code,
|
|
|
@@ -2377,6 +2370,9 @@ class ocean_order {
|
|
|
from h left join station_data.do_detail d on h.id = d.do_header_id and h.from_station = d.from_station
|
|
|
where h.from_station = '".$ocean["destination_station"]."'
|
|
|
order by h.est_delivery_date";
|
|
|
+ // bb as (select o.serial_no from $order_from.ocean o
|
|
|
+ // where exists(select 1 from aa where aa.master_base_number= o.master_base_number)
|
|
|
+ // and o.bol_type = 'CONSOL' and o.status::text <> 'Cancelled'::text),
|
|
|
// $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
|
|
|
// bb as (select o.serial_no from $order_from.ocean o
|
|
|
// where exists(select 1 from aa where aa.master_base_number= o.master_base_number)
|
|
|
@@ -2413,9 +2409,12 @@ class ocean_order {
|
|
|
|
|
|
foreach($EDIDate['containerStatusData'] as $cskey => $csval){
|
|
|
if($csval['ctnr_label'] == $_delivery['ctnr']){
|
|
|
+ $_uncity = common::excuteObjectSql("select uncity from $order_from.ports where active = true and uncode = '".strtoupper($location_code)."' limit 1");
|
|
|
$contentTemp = array("title" =>"Last Mile Delivery",
|
|
|
+ "code"=>"UN-".$location_code,
|
|
|
"date"=>$est_delivery_date,
|
|
|
"country"=>$location_code,
|
|
|
+ "uncity"=>$_uncity['uncity'],
|
|
|
"timezone"=>$_delivery['timezone']);
|
|
|
$originalArray = $EDIDate['containerStatusData'][$cskey]['content'];
|
|
|
//$this->insertInDescendingOrder($originalArray, $contentTemp);
|
|
|
@@ -2804,6 +2803,7 @@ class ocean_order {
|
|
|
'url_param' => $file['url_param'],
|
|
|
'detail' => $file['detail'],
|
|
|
"file_name" => $file['file_name'],
|
|
|
+ "standard" => $file['standard'],
|
|
|
'h_bol' => $h_bol,
|
|
|
'label' => $formatName,
|
|
|
'is_topocean'=> $file['is_topocean']
|