|
@@ -977,6 +977,7 @@ class tools {
|
|
|
from public.kln_ocean oo
|
|
from public.kln_ocean oo
|
|
|
where oo.serial_no = ni.serial_no limit 1) ccc on true
|
|
where oo.serial_no = ni.serial_no limit 1) ccc on true
|
|
|
where lower(ni.user_login) in ('".strtolower(_getLoginName())."','all_user')
|
|
where lower(ni.user_login) in ('".strtolower(_getLoginName())."','all_user')
|
|
|
|
|
+ AND ni.insert_date > NOW() - INTERVAL '3 months'
|
|
|
and (ni.frequency_type = 'Instant'
|
|
and (ni.frequency_type = 'Instant'
|
|
|
or (ni.frequency_type = 'Daily'
|
|
or (ni.frequency_type = 'Daily'
|
|
|
and (case when (timezone(ni.daily_time_zone, NOW())::time > ni.daily_time::time)
|
|
and (case when (timezone(ni.daily_time_zone, NOW())::time > ni.daily_time::time)
|