summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-04-27 02:56:41 -0700
committerIvan Kohler <ivan@freeside.biz>2015-04-27 02:56:41 -0700
commit189707c123fab3152d231bdb1d75bf9f65e016ca (patch)
tree63a817974543b548fb77379f35e33faac12ee83b /httemplate
parent048756865bec53d4c5fd7e2b6240ea8ecd583eaa (diff)
multiple payment options (package display: make "No automatic charge" label work correctly), RT#23741
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/view/cust_main/packages/section.html2
-rw-r--r--httemplate/view/cust_main/packages/status.html11
2 files changed, 5 insertions, 8 deletions
diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html
index e888c94..e38c34f 100755
--- a/httemplate/view/cust_main/packages/section.html
+++ b/httemplate/view/cust_main/packages/section.html
@@ -20,6 +20,8 @@
cust_pkg-group_by_location
no_services
)),
+ #for status.html
+ 'has_cust_payby_auto' => $cust_main->has_cust_payby_auto,
&>
% }
% } else { # there are no packages
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index 2bb4bef..3515b38 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -494,16 +494,11 @@ sub pkg_status_row_detached {
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_pkg->no_auto || $opt{'part_pkg'}->no_auto );
+ && $opt{'has_cust_payby_auto'};
- return '' unless $cust_main->payby =~ /^(CARD|CHEK)$/;
- my $what = lc(FS::payby->shortname($cust_main->payby));
-
- pkg_status_row_colspan( $cust_pkg, emt("No automatic $what charge"), '');
+ pkg_status_row_colspan( $cust_pkg, emt("No automatic charge"), '');
}
sub pkg_status_row_separate_bill {