|
@@ -2368,13 +2368,15 @@ class ocean_order {
|
|
|
union all
|
|
union all
|
|
|
select serial_no from bb
|
|
select serial_no from bb
|
|
|
),
|
|
),
|
|
|
- h as (select * from station_data.do_header h where h.serial_no = (select serial_no from cc) and from_station = '".$ocean["from_station"]."')
|
|
|
|
|
|
|
+ h as (select * from station_data.do_header h where h.serial_no in (select serial_no from cc))
|
|
|
|
|
|
|
|
select h.est_delivery_date,h.est_delivery_time,
|
|
select h.est_delivery_date,h.est_delivery_time,
|
|
|
h.consignee_country_code,h.consignee_city_code,
|
|
h.consignee_country_code,h.consignee_city_code,
|
|
|
(select time_zone from public.city_timezone where uncode = CONCAT(h.consignee_country_code, h.consignee_city_code) limit 1) as timezone,
|
|
(select time_zone from public.city_timezone where uncode = CONCAT(h.consignee_country_code, h.consignee_city_code) limit 1) as timezone,
|
|
|
d.ctnr
|
|
d.ctnr
|
|
|
- from h left join station_data.do_detail d on h.id = d.do_header_id order by h.est_delivery_date";
|
|
|
|
|
|
|
+ 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";
|
|
|
// $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
|
|
// $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
|
|
// 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)
|
|
// where exists(select 1 from aa where aa.master_base_number= o.master_base_number)
|