[freeside-commits] freeside/httemplate/edit/process quick-cust_pkg.cgi, 1.21, 1.22

Erik Levinson levinse at wavetail.420.am
Thu Jan 20 12:46:31 PST 2011


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv15820/httemplate/edit/process

Modified Files:
	quick-cust_pkg.cgi 
Log Message:
Ikano / svc_dsl / qualification improvements, RT7111

Index: quick-cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/quick-cust_pkg.cgi,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -d -r1.21 -r1.22
--- quick-cust_pkg.cgi	12 Oct 2010 01:15:17 -0000	1.21
+++ quick-cust_pkg.cgi	20 Jan 2011 20:46:29 -0000	1.22
@@ -6,12 +6,23 @@
 %  my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
 %               ? ''
 %               : ';show=packages';
+%  my $redir_url = popurl(3)
+%            ."view/cust_main.cgi?custnum=$custnum$show;fragment=$frag#$frag";
+% 
+% # for going right to a provision service after ordering a package
+% if ( $svcpart ) { 
+%    my $part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } );
+%    if ( $part_svc ) {
+%	$redir_url = popurl(3)."edit/".$part_svc->svcdb.".cgi?"
+%		    ."pkgnum=".$cust_pkg->pkgnum.";svcpart=$svcpart";
+%   }
+% }
 <% header('Package ordered') %>
   <SCRIPT TYPE="text/javascript">
     // XXX fancy ajax rebuild table at some point, but a page reload will do for now
 
     // XXX chop off trailing #target and replace... ?
-    window.top.location = '<% popurl(3). "view/cust_main.cgi?custnum=$custnum$show;fragment=$frag#$frag" %>';
+    window.top.location = '<% $redir_url %>';
 
   </SCRIPT>
 
@@ -49,6 +60,13 @@
   or die 'illegal discountnum '. $cgi->param('discountnum');
 my $discountnum = $1;
 
+# for going right to a provision service after ordering a package
+my $svcpart;
+if ( $cgi->param('svcpart') ) {
+    $cgi->param('svcpart') =~ /^(\-?\d*)$/
+       or die 'illegal svcpart '. $cgi->param('svcpart');
+    $svcpart = $1;
+}
 
 my $cust_pkg = new FS::cust_pkg {
   'custnum'              => $custnum,
@@ -83,6 +101,6 @@
   $opt{'cust_location'} = $cust_location;
 }
 
-my $error = $cust_main->order_pkg( %opt );
+my $error = $cust_main->order_pkg( \%opt );
 
 </%init>



More information about the freeside-commits mailing list