X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=ae869dda6d06bf236e7d205ac3f67971d337ac48;hb=3545cf7c664f5cd24a5c4e9cf8c7ef368ac51f1f;hp=3881606d99c5d30e1a92072b4470050c5a4453bd;hpb=79f809fedf5fc96da31039122c8326d31b6662b6;p=freeside.git diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 3881606d9..ae869dda6 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -32,6 +32,7 @@ my $acl_edit = $curuser->access_right($edit); my $acl_edit_global = $curuser->access_right($edit_global); my $acl_config = $curuser->access_right('Configuration'); #to edit services #and agent types + #and bulk change die "access denied" unless $acl_edit || $acl_edit_global; @@ -72,7 +73,7 @@ if ( $cgi->param('missing_recur_fee') ) { push @where, "0 = ( SELECT COUNT(*) FROM part_pkg_option WHERE optionname = 'recur_fee' AND part_pkg_option.pkgpart = part_pkg.pkgpart - AND CAST ( optionvalue AS NUMERIC ) > 0 + AND CAST( optionvalue AS NUMERIC ) > 0 )"; } @@ -147,6 +148,7 @@ my $filter_change = #restore this so pagination works $cgi->param('classnum', $classnum) if length($classnum); +#should hide this if there aren't any classes my $html_posttotal = "$filter_change\n
( show class: ". include('/elements/select-pkg_class.html', @@ -224,7 +226,7 @@ push @fields, sub { ], [ { data=>( $is_recur - ? $money_char.sprintf('%.2f ', $part_pkg->option('recur_fee') ) + ? $money_char.sprintf('%.2f ', $part_pkg->option('recur_fee')) : $part_pkg->freq_pretty ), align=> ( $is_recur ? 'right' : 'center' ), @@ -237,6 +239,14 @@ push @fields, sub { : () ), ], + [ { data => + ( $part_pkg->option('recur_fee') == 0 && $part_pkg->recur_show_zero ) + ? ' (printed on invoices)' + : '', + align => 'center', #? + colspan => 2, + }, + ], ( map { my $dst_pkg = $_->dst_pkg; [ @@ -325,8 +335,8 @@ if ( $acl_edit_global ) { ); my $cust_pkg_link = $p. 'search/cust_pkg.cgi?pkgpart='; push @fields, sub { my $part_pkg = shift; - [ - map { + [ + map( { my $magic = $_; my $label = $_; if ( $magic eq 'active' && $part_pkg->freq == 0 ) { @@ -360,7 +370,23 @@ if ( $acl_edit_global ) { }, ], } (qw( not_yet_billed active suspended cancelled )) - ]; }; + ), + ($acl_config ? + [ {}, + { 'data' => '[ '. + include('/elements/popup_link.html', + 'label' => 'change', + 'action' => "${p}edit/bulk-cust_pkg.html?". + 'pkgpart='.$part_pkg->pkgpart, + 'actionlabel' => 'Change Packages', + 'width' => 569, + 'height' => 210, + ).' ]', + 'align' => 'left', + } + ] : () ), + ]; + }; $align .= 'r'; #}