X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-cust_pkg.cgi;h=6b65653c23113f6a20af3e40224eae907d0eff3c;hb=0930d22ffc440f80c1b222b2e750cadbabd9e8f6;hp=fd9e5947258e86c9c74f6ea23fe6386639a175e6;hpb=2041a9143fac20b79ead4a1ae01224dedf5b27c2;p=freeside.git diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index fd9e59472..6b65653c2 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -1,4 +1,23 @@ -<% +%if ($error) { +% $cgi->param('error', $error); +<% $cgi->redirect(popurl(2). 'misc/order_pkg.html?'. $cgi->query_string ) %> +%} else { +% my $frag = "cust_pkg". $cust_pkg[0]->pkgnum; +<% header('Package ordered') %> + + + +%} +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Order customer package'); #untaint custnum $cgi->param('custnum') =~ /^(\d+)$/ @@ -9,17 +28,6 @@ $cgi->param('pkgpart') =~ /^(\d+)$/ my $pkgpart = $1; my @cust_pkg = (); -my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, ); - -if ($error) { -%> - -<% - eidiot($error); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum". - "#cust_pkg". $cust_pkg[0]->pkgnum ); -} - -%> +my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, [ $cgi->param('refnum') ] ); +