From e2cff16135741b166473d18f828ad54f57037dae Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 18 Oct 2010 02:46:33 +0000 Subject: suspend_bill package option to continue recurring billing while suspended and part_pkg-default_suspend_bill conf option to set it by default, RT#10148 --- httemplate/edit/part_pkg.cgi | 3 +++ httemplate/view/cust_main/packages/status.html | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'httemplate') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 79dfa6afa..be8b0f68f 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -419,11 +419,14 @@ my $new_callback = sub { my( $cgi, $object, $fields ) = @_; my $conf = new FS::Conf; + if ( $conf->exists('agent_defaultpkg') ) { #my @all_agent_types = map {$_->typenum} qsearch('agent_type',{}); @agent_type = map {$_->typenum} qsearch('agent_type',{}); } + $options{'suspend_bill'}=1 if $conf->exists('part_pkg-default_suspend_bill'); + }; my $clone_callback = sub { diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index 74e52efdd..c05cd5a94 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -54,7 +54,9 @@ <% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %> <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %> -% # pkg_status_row($cust_pkg, 'Next bill', 'bill', %opt) +% if ( $part_pkg->option('suspend_bill') ) { + <% pkg_status_row_if( $cust_pkg, 'Next bill', 'bill', %opt, curuser=>$curuser ) %> +% } <% pkg_status_row_if( $cust_pkg, 'Expires', 'expire', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, 'Contract ends', 'contract_end', %opt ) %> -- cgit v1.2.1