- or cust_pkg.expire > $time
- + cast(part_pkg_option.optionvalue as integer)
- * 86400
-/* and ( cust_pkg.adjourn is null
- or cust_pkg.adjourn > $time
--- Should notify suspended ones + cast(part_pkg_option.optionvalue as integer)
- * 86400
-*/
+ or cust_pkg.expire > ( $time
+ + CAST( part_pkg_option.optionvalue AS $integer )
+ * 86400
+ )
+END
+
+#/* and ( cust_pkg.adjourn is null
+# or cust_pkg.adjourn > $time
+#-- Should notify suspended ones + cast(part_pkg_option.optionvalue as $integer)
+# * 86400
+#*/
+
+ $where_pkg .= <<"END";