diff options
author | ivan <ivan> | 2010-03-18 07:59:52 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-03-18 07:59:52 +0000 |
commit | e078ca418dcf3c7b92efcd371ce761df3314c369 (patch) | |
tree | a296537d522a47cf083db299fa016c818881a4db /httemplate/view/cust_main/packages | |
parent | ca68d3b10051450d8523f54cc4e579bb0d8a6cc2 (diff) |
disable auto-billing of specific customer packages, RT#6378
Diffstat (limited to 'httemplate/view/cust_main/packages')
-rw-r--r-- | httemplate/view/cust_main/packages/status.html | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index 7b1b53add..a6868434b 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -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,7 +78,9 @@ <% pkg_status_row_colspan( $cust_pkg, 'Not yet billed (one-time charge)', '', 'colspan'=>$colspan, %opt ) %> - <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %> + <% pkg_status_row_noauto( $cust_pkg, %opt, 'colspan'=>$colspan ) %> + + <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %> <% pkg_status_row_if( $cust_pkg, @@ -100,6 +104,8 @@ <% pkg_status_row_colspan($cust_pkg, "Not yet billed ($billed_or_prepaid ". 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 @@ sub pkg_status_row_changed { $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 ) = @_; |