[freeside-commits] freeside/httemplate/view/cust_main/packages status.html, 1.11, 1.12

Ivan,,, ivan at wavetail.420.am
Thu Mar 18 00:59:54 PDT 2010


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

Modified Files:
	status.html 
Log Message:
disable auto-billing of specific customer packages, RT#6378

Index: status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/status.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -d -r1.11 -r1.12
--- status.html	5 Feb 2010 02:39:31 -0000	1.11
+++ status.html	18 Mar 2010 07:59:52 -0000	1.12
@@ -42,6 +42,8 @@
        )
     %>
 
+    <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
     <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
 
 %   unless ( $cust_pkg->get('setup') ) { 
@@ -76,6 +78,8 @@
 
           <% pkg_status_row_colspan( $cust_pkg, 'Not&nbsp;yet&nbsp;billed&nbsp;(one-time&nbsp;charge)', '', 'colspan'=>$colspan, %opt ) %>
 
+          <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
          <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
 
           <% pkg_status_row_if(
@@ -100,6 +104,8 @@
 
           <% pkg_status_row_colspan($cust_pkg, "Not&nbsp;yet&nbsp;billed&nbsp;($billed_or_prepaid&nbsp;". myfreq($part_pkg). ')', '', 'colspan'=>$colspan, %opt ) %>
 
+          <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
           <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
 
           <% pkg_status_row_if($cust_pkg, 'Start billing', 'start_date', %opt) %>
@@ -114,6 +120,8 @@
 
           <% pkg_status_row($cust_pkg, 'Billed', 'setup', %opt) %>
 
+          <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
           <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
 
 %       } else { 
@@ -138,6 +146,8 @@
             %>
 %         } 
 
+          <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+
           <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
 
           <% pkg_status_row($cust_pkg, 'Setup', 'setup', %opt) %>
@@ -290,6 +300,23 @@
   $html;
 }
 
+sub pkg_status_row_noauto {
+  my( $cust_pkg, %opt ) = @_;
+  my $part_pkg = $opt{'part_pkg'};
+  return '' unless $cust_pkg->no_auto || $part_pkg->no_auto;
+
+  #inefficient, should be passed in
+  my $cust_main = $cust_pkg->cust_main;
+
+  return '' unless $cust_main->payby =~ /^(CARD|CHEK)$/;
+  my $what = lc(FS::payby->shortname($cust_main->payby));
+
+  pkg_status_row_colspan( $cust_pkg, "No automatic $what charge", '',
+                          'colspan' => $opt{'colspan'},
+                          #%opt,
+                        );
+}
+
 sub pkg_status_row_discount {
   my( $cust_pkg, %opt ) = @_;
 



More information about the freeside-commits mailing list