X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fstatus.html;h=a6868434b680d586884f06ea26ff5a87fe91fd34;hp=7b1b53adde3e0863a24daee56307f12c267fbd8e;hb=e078ca418dcf3c7b92efcd371ce761df3314c369;hpb=ca68d3b10051450d8523f54cc4e579bb0d8a6cc2 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 ) = @_;