fix new tax report w/FS::tax_rate_location->location_sql, RT#12332
[freeside.git] / httemplate / misc / bulk_change_pkg.cgi
1 <% include('/elements/header-popup.html', "Change Packages") %>
2
3 % if ( $cgi->param('error') ) {
4   <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
5   <BR><BR>
6 % }
7
8 <FORM ACTION="<% $p %>misc/process/bulk_change_pkg.cgi" METHOD=POST>
9
10 %# some false laziness w/search/cust_pkg.cgi
11
12 <INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords |h %>">
13 %  for my $param (qw(agentnum custnum magic status classnum custom censustract)) {
14 <INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) |h %>">
15 %  }
16 %
17 % foreach my $pkgpart ($cgi->param('pkgpart')) {
18 <INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $pkgpart |h %>">
19 % }
20 %
21 % foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
22
23   <INPUT TYPE="hidden" NAME="<% $field %>begin" VALUE="<% $cgi->param("${field}.begin") |h %>">
24   <INPUT TYPE="hidden" NAME="<% $field %>beginning" VALUE="<% $cgi->param("${field}beginning") |h %>">
25   <INPUT TYPE="hidden" NAME="<% $field %>end" VALUE="<% $cgi->param("${field}.end") |h %>">
26   <INPUT TYPE="hidden" NAME="<% $field %>ending" VALUE="<% $cgi->param("${field}.ending") |h %>">
27 % }
28
29 <% ntable('#cccccc') %>
30
31   <TR>
32     <TD>New package: </TD>
33     <TD><% include('/elements/select-table.html',
34                      'table'          => 'part_pkg',
35                      'name_col'       => 'pkg',
36                      'empty_label'    => 'Select package',
37                      'label_callback' => sub { $_[0]->pkg_comment },
38                      'element_name'   => 'new_pkgpart',
39                      'curr_value'     => ( $cgi->param('error')
40                                            ? scalar($cgi->param('new_pkgpart'))
41                                            : ''
42                                          ),
43                   )
44         %>
45     </TD>
46   </TR>
47
48 </TABLE>
49
50 <BR>
51 <INPUT TYPE="submit" VALUE="Change packages">
52
53 </FORM>
54 </BODY>
55 </HTML>
56
57 <%init>
58
59 die "access denied"
60   unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
61
62 </%init>