X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=ec001cb0c7f10abe3131fd62dcf85c5788483c5e;hb=c81e566743e9e1bc0d9803f8c33adaddbd1a0b34;hp=2837e47e7464d393a728a12c978a4fc15f0550f5;hpb=a60b8251761d45c90fce93cc01a856c9330434f7;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 2837e47e7..ec001cb0c 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -1,12 +1,9 @@ -<% include("/elements/header.html","$action Package Definition", menubar( - 'Main Menu' => popurl(2), +<% include('/elements/header.html', "$action Package Definition", menubar( 'View all packages' => popurl(2). 'browse/part_pkg.cgi', )) %> % #), ' onLoad="visualize()"'); -% if ( $cgi->param('error') ) { - Error: <% $cgi->param('error') %> -% } +<% include('/elements/error.html') %>
@@ -180,10 +177,18 @@ Line-item revenue recognition % } % % push @fixups, "pkg_svc$svcpart"; +% +% my $quan = 0; +% if ( $cgi->param("pkg_svc$svcpart") =~ /^\s*(\d+)\s*$/ ) { +% $quan = $1; +% } elsif ( $pkg_svc->quantity ) { +% $quan = $pkg_svc->quantity; +% } + - quantity || 0 %>"> + @@ -207,10 +212,9 @@ Line-item revenue recognition -% foreach my $f ( qw( clone pkgnum ) ) { - - -% } +% foreach my $f ( qw( clone pkgnum ) ) { #safe, these were untained in %init + +% } % @@ -239,6 +243,7 @@ Line-item revenue recognition % delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq; %} % +%#this should be replaced by /elements/selectlayers.html %my $widget = new HTML::Widgets::SelectLayers( % 'selected_layer' => $part_pkg->plan, % 'options' => \%options, @@ -355,8 +360,8 @@ Line-item revenue recognition

Price plan <% $widget->html %> - - + +<% include('/elements/footer.html') %> <%init> if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { @@ -370,6 +375,13 @@ if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { $cgi->param('pkgnum', ''); } +my $curuser = $FS::CurrentUser::CurrentUser; + +die "access denied" + unless $curuser->access_right('Edit package definitions') + || $curuser->access_right('Edit global package definitions') + || ( $cgi->param('pkgnum') && $curuser->access_right('Customize customer package') ); + my ($query) = $cgi->keywords; my $conf = new FS::Conf;