|
|
@@ -433,7 +433,7 @@ class ocean_order {
|
|
|
when a.code='IFFDEP' then 'Departed'
|
|
|
when a.code='IFFARR' then 'Arrived'
|
|
|
when a.code='IFFAFD' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.code in (select regexp_split_to_table('IFFBCF,IFFCPU,IFFREC,IFFDEP,IFFARR,IFFAFD', ','))
|
|
|
@@ -992,7 +992,7 @@ class ocean_order {
|
|
|
|
|
|
private function getOcanOrderSearchSql($type,$sqlWhere) {
|
|
|
if($type == "Booked"){
|
|
|
- $Booked_sqlWhere = " and (1<>1 or dd.status ='Booked')";
|
|
|
+ $Booked_sqlWhere = " and (1<>1 or dd.new_status ='Booked')";
|
|
|
return "select count(1) from online_ocean
|
|
|
left join LATERAL (select case when a.description='Booking Confirmation' then 'Booked'
|
|
|
when a.description='Cargo Pickup' then 'Cargo Received'
|
|
|
@@ -1000,7 +1000,7 @@ class ocean_order {
|
|
|
when a.description='Departure' then 'Departed'
|
|
|
when a.description='Arrived at Final Destination Port Arrived' then 'Arrived'
|
|
|
when a.description='Arrived at Final Destination' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.description in (
|
|
|
@@ -1008,7 +1008,7 @@ class ocean_order {
|
|
|
order by id desc limit 1) dd on true" . $sqlWhere.$Booked_sqlWhere;
|
|
|
}
|
|
|
if($type == "Cargo Received"){
|
|
|
- $Cargo_Received_sqlWhere = " and (1<>1 or dd.status ='Cargo Received')";
|
|
|
+ $Cargo_Received_sqlWhere = " and (1<>1 or dd.new_status ='Cargo Received')";
|
|
|
return "select count(1) from online_ocean
|
|
|
left join LATERAL (select case when a.description='Booking Confirmation' then 'Booked'
|
|
|
when a.description='Cargo Pickup' then 'Cargo Received'
|
|
|
@@ -1016,7 +1016,7 @@ class ocean_order {
|
|
|
when a.description='Departure' then 'Departed'
|
|
|
when a.description='Arrived at Final Destination Port Arrived' then 'Arrived'
|
|
|
when a.description='Arrived at Final Destination' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.description in (
|
|
|
@@ -1024,7 +1024,7 @@ class ocean_order {
|
|
|
order by id desc limit 1) dd on true" . $sqlWhere.$Cargo_Received_sqlWhere;
|
|
|
}
|
|
|
if($type == "Departed"){
|
|
|
- $Departed_sqlWhere = " and (1<>1 or dd.status ='Departed')";
|
|
|
+ $Departed_sqlWhere = " and (1<>1 or dd.new_status ='Departed')";
|
|
|
return "select count(1) from online_ocean
|
|
|
left join LATERAL (select case when a.description='Booking Confirmation' then 'Booked'
|
|
|
when a.description='Cargo Pickup' then 'Cargo Received'
|
|
|
@@ -1032,7 +1032,7 @@ class ocean_order {
|
|
|
when a.description='Departure' then 'Departed'
|
|
|
when a.description='Arrived at Final Destination Port Arrived' then 'Arrived'
|
|
|
when a.description='Arrived at Final Destination' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.description in (
|
|
|
@@ -1040,7 +1040,7 @@ class ocean_order {
|
|
|
order by id desc limit 1) dd on true" . $sqlWhere.$Departed_sqlWhere;
|
|
|
}
|
|
|
if($type == "Arrived"){
|
|
|
- $Arrived_sqlWhere = " and (1<>1 or dd.status ='Arrived')";
|
|
|
+ $Arrived_sqlWhere = " and (1<>1 or dd.new_status ='Arrived')";
|
|
|
return "select count(1) from online_ocean
|
|
|
left join LATERAL (select case when a.description='Booking Confirmation' then 'Booked'
|
|
|
when a.description='Cargo Pickup' then 'Cargo Received'
|
|
|
@@ -1048,7 +1048,7 @@ class ocean_order {
|
|
|
when a.description='Departure' then 'Departed'
|
|
|
when a.description='Arrived at Final Destination Port Arrived' then 'Arrived'
|
|
|
when a.description='Arrived at Final Destination' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.description in (
|
|
|
@@ -1056,7 +1056,7 @@ class ocean_order {
|
|
|
order by id desc limit 1) dd on true" . $sqlWhere.$Arrived_sqlWhere;
|
|
|
}
|
|
|
if($type == "Completed"){
|
|
|
- $Completed_sqlWhere = " and (1<>1 or dd.status ='Completed')";
|
|
|
+ $Completed_sqlWhere = " and (1<>1 or dd.new_status ='Completed')";
|
|
|
return "select count(1) from online_ocean
|
|
|
left join LATERAL (select case when a.description='Booking Confirmation' then 'Booked'
|
|
|
when a.description='Cargo Pickup' then 'Cargo Received'
|
|
|
@@ -1064,7 +1064,7 @@ class ocean_order {
|
|
|
when a.description='Departure' then 'Departed'
|
|
|
when a.description='Arrived at Final Destination Port Arrived' then 'Arrived'
|
|
|
when a.description='Arrived at Final Destination' then 'Completed'
|
|
|
- else 'Booked' END as status
|
|
|
+ else 'Booked' END as new_status
|
|
|
from ocean_milestone a
|
|
|
where a.serial_no=online_ocean.serial_no
|
|
|
and a.description in (
|