X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pkg.cgi;h=dd1ed335fb61756ef98cf84813cf58cc83217e02;hb=42ad860da02665aa21193d3bc418ef03e96727fb;hp=d546f740929a76ad8573589fef8b1245c83ff730;hpb=a4c96748eb6eab29a70f3a944c6520283a635c78;p=freeside.git diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi index d546f7409..dd1ed335f 100755 --- a/httemplate/edit/cust_pkg.cgi +++ b/httemplate/edit/cust_pkg.cgi @@ -1,11 +1,137 @@ - -<% +<% 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 = (); -foreach (qsearch('part_pkg', { 'disabled' => '' })) { +my %all_pkg = (); +my %all_comment = (); +#foreach (qsearch('part_pkg', { 'disabled' => '' })) { +# $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); +# $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); +#} +foreach (qsearch('part_pkg', {} )) { + $all_pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); + $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); @@ -20,89 +146,5 @@ if ( $cgi->param('error') ) { } my $p1 = popurl(1); -print header("Add/Edit Packages", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq! -