From: ivan Date: Wed, 31 Jan 2007 02:08:40 +0000 (+0000) Subject: this should be a popup too, but, until then, it shouldn't be missing the standard... X-Git-Tag: TRIXBOX_2_6~704 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=966e32b588916cb7f6208e075efcded5ff3620b0 this should be a popup too, but, until then, it shouldn't be missing the standard header --- diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index 7276f3256..cfa460964 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -1,65 +1,69 @@ - -% -% -%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"); -% -%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') || '' , '', -% "${p}view/cust_main.cgi"). -% qq!
!. -% qq!!. -% qq!!. -% '
Current package: '. $part_pkg->pkg. ' - '. $part_pkg->comment. -% qq!
New package: + + +
+Current package: <% $part_pkg->pkg %> - <% $part_pkg->comment %> + +
+New package: -%
-% -% -%END -% + +

+ + + +<%init> + +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; + +my $part_pkg = $cust_pkg->part_pkg; + +