X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pkg.cgi;h=7a0432c5d677c77edd96742a4c5859039832d119;hb=0dd05e9ff98263d2d42b419b1e278a5a3bc594b2;hp=ea92ac05e0dc0265536a24fffeca1e355e6b7461;hpb=91387f8f489e561deaf1de052d80ef800a4970a3;p=freeside.git diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi index ea92ac05e..7a0432c5d 100755 --- a/httemplate/edit/cust_pkg.cgi +++ b/httemplate/edit/cust_pkg.cgi @@ -1,120 +1,152 @@ -<% -# - -use strict; -use vars qw( $cgi %pkg %comment $custnum $p1 @cust_pkg - $cust_main $agent $type_pkgs $count %remove_pkg $pkgparts ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header popurl); -use FS::part_pkg; -use FS::type_pkgs; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -%pkg = (); -%comment = (); -foreach (qsearch('part_pkg', {})) { - $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -} - -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - %remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - undef %remove_pkg; -} - -$p1 = popurl(1); -print $cgi->header( @FS::CGI::header ), header("Add/Edit Packages", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!