ShuanghongS 3 ماه پیش
والد
کامیت
c799a678dc
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      service/destination_delivery.class.php

+ 2 - 1
service/destination_delivery.class.php

@@ -844,7 +844,8 @@ class destination_delivery {
                     select regexp_split_to_table('".utils::implode(',',$ctnr)."', ',') as ctnr
                 )
                 select h_bol,ctnr from public.kln_destination_delivery kde
-                    where exists(select 1 from save_table where save_table.serial_no = any(kde.h_serial_no))
+                    where status not in ('Cancel','Reject')
+                        and exists(select 1 from save_table where save_table.serial_no = any(kde.h_serial_no))
                         and (exists(select 1 from save_table_ctnr where save_table_ctnr.ctnr = ANY(regexp_split_to_array(kde.ctnr, ',')) 
                             or COALESCE(kde.ctnr,'') = ''))
                         and exists(select 1 from public.kln_ocean oo ". $sqlWhere."  and oo.serial_no = any(kde.h_serial_no) limit 1)";