-<!-- mason kludge -->
-<%
+<% include('/elements/header.html', "Change Package") %>
+
+% if ( $cgi->param('error') ) {
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
+ <BR><BR>
+% }
+
+<% small_custview( $cust_main, $conf->config('countrydefault') || '' , '',
+ "${p}view/cust_main.cgi")
+%>
+
+<FORM ACTION="<% $p %>edit/process/cust_pkg.cgi" METHOD=POST>
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
+<INPUT TYPE="hidden" NAME="remove_pkg" VALUE="<% $pkgnum %>">
+
+<BR>
+Current package: <% $part_pkg->pkg %> - <% $part_pkg->comment %>
+
+<BR>
+New package: <SELECT NAME="new_pkgpart"><OPTION VALUE=0></OPTION>
+
+%foreach my $part_pkg (
+% grep { ! $_->disabled && $_->pkgpart != $cust_pkg->pkgpart }
+% map { $_->part_pkg } $agent->agent_type->type_pkgs
+%) {
+% my $pkgpart = $part_pkg->pkgpart;
+
+ <OPTION VALUE="<% $pkgpart %>" <% ( $cgi->param('error') && $cgi->param('new_pkgpart') == $pkgpart ) ? ' SELECTED' : '' %>>
+ <% $pkgpart %>: <% $part_pkg->pkg %> - <% $part_pkg->comment %>
+ </OPTION>
+
+%}
+
+</SELECT>
+<BR><BR><INPUT TYPE="submit" VALUE="Change package">
+ </FORM>
+ </BODY>
+</HTML>
+<%init>
my $pkgnum;
if ( $cgi->param('error') ) {
" ( 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!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
- "</FONT><BR><BR>"
- if $cgi->param('error');
-
my $part_pkg = $cust_pkg->part_pkg;
-print small_custview( $cust_main, $conf->config('countrydefault') ).
- qq!<FORM ACTION="${p}edit/process/cust_pkg.cgi" METHOD=POST>!.
- qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
- qq!<INPUT TYPE="hidden" NAME="remove_pkg" VALUE="$pkgnum">!.
- '<BR>Current package: '. $part_pkg->pkg. ' - '. $part_pkg->comment.
- qq!<BR>New package: <SELECT NAME="new_pkgpart"><OPTION VALUE=0></OPTION>!;
-
-foreach my $part_pkg (
- grep { ! $_->disabled && $_->pkgpart != $cust_pkg->pkgpart }
- map { $_->part_pkg } $agent->agent_type->type_pkgs
-) {
- my $pkgpart = $part_pkg->pkgpart;
- print qq!<OPTION VALUE="$pkgpart"!;
- print ' SELECTED' if $cgi->param('error')
- && $cgi->param('new_pkgpart') == $pkgpart;
- print qq!>$pkgpart: !. $part_pkg->pkg. ' - '. $part_pkg->comment. '</OPTION>';
-}
-
-print <<END;
-</SELECT>
-<BR><BR><INPUT TYPE="submit" VALUE="Change package">
- </FORM>
- </BODY>
-</HTML>
-END
-%>
+</%init>