[freeside-commits] freeside/FS/FS/Cron bill.pm, 1.2.2.1, 1.2.2.2 notify.pm, 1.2, 1.2.2.1

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Jun 26 08:36:50 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS/Cron
In directory wavetail:/tmp/cvs-serv2363/FS/FS/Cron

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	bill.pm notify.pm 
Log Message:
suspend later just like expire (#1487)

Index: bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/bill.pm,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -d -r1.2.2.1 -r1.2.2.2
--- bill.pm	9 Jun 2007 00:42:29 -0000	1.2.2.1
+++ bill.pm	26 Jun 2007 15:36:48 -0000	1.2.2.2
@@ -34,6 +34,7 @@
               and (    setup is null or setup =  0
                     or bill  is null or bill  <= $time 
                     or ( expire is not null and expire <= $^T )
+                    or ( adjourn is not null and adjourn <= $^T )
                   )
         )
 END
@@ -91,8 +92,10 @@
     }
     # $^T not $time because -d is for pre-printing invoices
     foreach my $cust_pkg (
-      grep { $_->part_pkg->is_prepaid
-             && $_->bill && $_->bill < $^T && ! $_->susp
+      grep { (    $_->part_pkg->is_prepaid && $_->bill && $_->bill < $^T
+               || $_->adjourn && $_->adjourn <= $^T
+             )
+             && ! $_->susp
            }
            $cust_main->ncancelled_pkgs
     ) {

Index: notify.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/notify.pm,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- notify.pm	14 Feb 2007 03:12:26 -0000	1.2
+++ notify.pm	26 Jun 2007 15:36:48 -0000	1.2.2.1
@@ -42,6 +42,11 @@
                                 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
+*/
                                   )
                         )
           )



More information about the freeside-commits mailing list