[freeside-commits] freeside/httemplate/misc bulk_change_pkg.cgi, 1.1, 1.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Jan 28 19:34:13 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail:/tmp/cvs-serv17659/httemplate/misc
Added Files:
bulk_change_pkg.cgi
Log Message:
bulk package changing (RT#1394)
--- NEW FILE: bulk_change_pkg.cgi ---
<% include('/elements/header-popup.html', "Change Packages") %>
% if ( $cgi->param('error') ) {
<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
<BR><BR>
% }
<FORM ACTION="<% $p %>misc/process/bulk_change_pkg.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="query" VALUE="<% $cgi->keywords %>">
% for my $param (qw(agentnum magic status classnum pkgpart)) {
<INPUT TYPE="hidden" NAME="<% $param %>" VALUE="<% $cgi->param($param) %>">
% }
%
% foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
%
<INPUT TYPE="hidden" NAME="<% $field %>begin" VALUE="<% $cgi->param("${field}.begin") %>">
<INPUT TYPE="hidden" NAME="<% $field %>beginning" VALUE="<% $cgi->param("${field}beginning") %>">
<INPUT TYPE="hidden" NAME="<% $field %>end" VALUE="<% $cgi->param("${field}.end") %>">
<INPUT TYPE="hidden" NAME="<% $field %>ending" VALUE="<% $cgi->param("${field}.ending") %>">
% }
<% ntable('#cccccc') %>
<TR>
<TD>New package: </TD>
<TD><% include('/elements/select-table.html',
'table' => 'part_pkg',
'name_col' => 'pkg',
'empty_label' => 'Select package',
'label_callback' => sub { $_[0]->pkgpart. ': '.
$_[0]->pkg. ' - '.
$_[0]->comment;
},
'element_name' => 'new_pkgpart',
'curr_value' => ( $cgi->param('error')
? scalar($cgi->param('new_pkgpart'))
: ''
),
)
%>
</TD>
</TR>
</TABLE>
<BR>
<INPUT TYPE="submit" VALUE="Change packages">
</FORM>
</BODY>
</HTML>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Bulk change customer packages');
#false laziness w/report_cust_pkg.html
my %disable = (
'all' => {},
'one-time charge' => { 'last_bill'=>1, 'bill'=>1, 'adjourn'=>1, 'susp'=>1, 'expire'=>1, 'cancel'=>1, },
'active' => { 'susp'=>1, 'cancel'=>1 },
'suspended' => { 'cancel' => 1 },
'cancelled' => {},
'' => {},
);
</%init>
More information about the freeside-commits
mailing list