%
%
%my $pkgnum;
%if ( $cgi->param('error') ) {
% #$custnum = $cgi->param('custnum');
% #%remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg');
% $pkgnum = ($cgi->param('remove_pkg'))[0];
%} else {
% my($query) = $cgi->keywords;
% $query =~ /^(\d+)$/;
% #$custnum = $1;
% $pkgnum = $1;
% #%remove_pkg = ();
%}
%
%my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } )
% or die "unknown pkgnum $pkgnum";
%my $custnum = $cust_pkg->custnum;
%
%my $conf = new FS::Conf;
%
%my $p1 = popurl(1);
%
%my $cust_main = $cust_pkg->cust_main
% or die "can't get cust_main record for custnum ". $cust_pkg->custnum.
% " ( pkgnum ". cust_pkg->pkgnum. ")";
%my $agent = $cust_main->agent;
%
%print header("Change Package", menubar(
% "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
% 'Main Menu' => $p,
%));
%
%print qq!Error: !, $cgi->param('error'),
% "
"
% if $cgi->param('error');
%
%my $part_pkg = $cust_pkg->part_pkg;
%
%print small_custview( $cust_main, $conf->config('countrydefault') ).
% qq!