summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
authorivan <ivan>2009-05-31 08:39:19 +0000
committerivan <ivan>2009-05-31 08:39:19 +0000
commit19701fd4538d5e3a00766a7ad88ae46d23f12f1a (patch)
tree26bd3df1d24fee1cbda341e00cf5b275973b8dee /httemplate/browse
parent9832f4d4086970d7612ff2a6facd797fa85d7814 (diff)
add "hide one-time charges" toggle, RT#5255
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-xhttemplate/browse/part_pkg.cgi10
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index 886c6c849..8c961b839 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -57,7 +57,7 @@ my @where = ();
if ( $cgi->param('recurring') ) {
$hash{'freq'} = { op=>'!=', value=>'0' };
- $extra_count = ' freq != 0 ';
+ $extra_count = " freq != '0' ";
}
my $classnum = '';
@@ -152,6 +152,14 @@ my $html_posttotal =
).
' )';
+my $recur_toggle = $cgi->param('recurring') ? 'show' : 'hide';
+$cgi->param('recurring', $cgi->param('recurring') ^ 1 );
+
+$html_posttotal .=
+ '( <A HREF="'. $cgi->self_url.'">'. "$recur_toggle one-time charges</A> )";
+
+$cgi->param('recurring', $cgi->param('recurring') ^ 1 ); #put it back
+
# ------
my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];