[freeside-commits] freeside/httemplate/misc inventory_item-move.cgi, NONE, 1.1
Mark Wells
mark at wavetail.420.am
Tue May 25 00:53:10 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv22191/misc
Added Files:
inventory_item-move.cgi
Log Message:
RT#7010: inventory items can be moved between agents
--- NEW FILE: inventory_item-move.cgi ---
<% '',$cgi->redirect(popurl(2). "search/inventory_item.html?$browse_opts") %>
<%init>
# Shamelessly copied from misc/cust_attachment.cgi.
my $browse_opts = join(';', map { $_.'='.$cgi->param($_) }
qw( classnum avail )
);
my $move_agentnum = $cgi->param('move_agentnum') or
die "No agent selected";
foreach my $itemnum (
map { /^itemnum(\d+)$/; $1; } grep /^itemnum\d+$/, $cgi->param ) {
my $item = qsearchs('inventory_item', { 'itemnum' => $itemnum });
# die "Can't move assigned inventory item $itemnum" if $item->svcnum;
my $error;
$item->agentnum($move_agentnum);
$error = $item->replace;
die $error if $error;
}
</%init>
More information about the freeside-commits
mailing list