X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pkg.cgi;h=7ffbb1fc0e2da2fe81b40ed6523af6ce04ae8685;hb=25386efd0e3f725d6cef005eba729840d3b4b3cb;hp=485d601eb58ec5277f04a41961a5b618e71c3689;hpb=2041a9143fac20b79ead4a1ae01224dedf5b27c2;p=freeside.git diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi index 485d601eb..7ffbb1fc0 100755 --- a/httemplate/edit/cust_pkg.cgi +++ b/httemplate/edit/cust_pkg.cgi @@ -1,5 +1,122 @@ - -<% +<% include('/elements/header.html', "Add/Edit Packages", '') %> + +<% include('/elements/error.html') %> + +
+ +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages'); my %pkg = (); my %comment = (); @@ -11,10 +128,10 @@ my %all_comment = (); #} foreach (qsearch('part_pkg', {} )) { $all_pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $all_comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); + $all_comment{ $_ -> getfield('pkgpart') } = $_->custom_comment; next if $_->disabled; $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); + $comment{ $_ -> getfield('pkgpart') } = $_->custom_comment; } my($custnum, %remove_pkg); @@ -29,89 +146,25 @@ if ( $cgi->param('error') ) { } my $p1 = popurl(1); -print header("Add/Edit Packages", ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); +my @cust_pkg = qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ); +my @main_pkgs; +my %supp_pkgs_of; # main pkgnum => arrayref of cust_pkgs -print qq! -