[freeside-commits] freeside/httemplate/view/cust_main packages.html, 1.20.2.8, 1.20.2.9

Jeff Finucane,420,, jeff at wavetail.420.am
Wed Apr 16 11:32:36 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv12474/httemplate/view/cust_main

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	packages.html 
Log Message:
show user who created (cancel/suspend) reason and possibly fix a lingering spurious usergroup bug

Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.20.2.8
retrieving revision 1.20.2.9
diff -u -d -r1.20.2.8 -r1.20.2.9
--- packages.html	16 Mar 2008 22:41:55 -0000	1.20.2.8
+++ packages.html	16 Apr 2008 18:32:34 -0000	1.20.2.9
@@ -125,15 +125,22 @@
 %
 %
 % if ( $cust_pkg->get('cancel') ) { #status: cancelled
+%   my $cpr = $cust_pkg->last_cust_pkg_reason;
 
     <% pkg_status_row($cust_pkg, 'Cancelled', 'cancel', 'color'=>'FF0000' ) %>
 
     <% pkg_status_row_colspan(
-         ( $cust_pkg->last_reason ? $cust_pkg->last_reason->reason : '' ), '',
+         ( ( $cpr && ( $cpr->date == $cust_pkg->get('cancel') ||
+                       $cpr->date == $cust_pkg->expire
+                     )
+           ) ? $cpr->reasontext. ' by '. $cpr->otaker : '' ), '',
          'align' => 'right', 'color' => 'ff0000', 'size' => '-2',
        )
     %>
 
+
+    <% pkg_status_row( $cust_pkg, 'Suspended', 'susp', 'color'=>'FF9900' ) %>
+
 %   unless ( $cust_pkg->get('setup') ) { 
 
         <% pkg_status_row_colspan('Never billed') %>
@@ -150,11 +157,15 @@
 % } else { 
 %
 %   if ( $cust_pkg->get('susp') ) { #status: suspended
+%     my $cpr = $cust_pkg->last_cust_pkg_reason;
 
     <% pkg_status_row( $cust_pkg, 'Suspended', 'susp', 'color'=>'FF9900' ) %>
 
     <% pkg_status_row_colspan(
-         ( $cust_pkg->last_reason ? $cust_pkg->last_reason->reason : '' ), '',
+         ( ( $cpr && ( $cpr->date == $cust_pkg->susp ||
+                       $cpr->date == $cust_pkg->adjourn
+                     )
+           ) ? $cpr->reasontext. ' by '. $cpr->otaker : '' ), '',
          'align' => 'right', 'color' => 'FF9900', 'size' => '-2',
        )
     %>



More information about the freeside-commits mailing list