From: ivan Date: Mon, 28 Mar 2011 02:00:53 +0000 (+0000) Subject: finish existing customer dsl order, RT#7111 X-Git-Tag: freeside_2_3_0~460 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e0a26680d75fc2000bde195eba7946805a3aaa28 finish existing customer dsl order, RT#7111 --- diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html index 2e27f851d..aa7699555 100644 --- a/httemplate/edit/elements/svc_Common.html +++ b/httemplate/edit/elements/svc_Common.html @@ -14,6 +14,13 @@ label_fixup($part_svc, $opt); $svc_x->setfield('svcpart', $svcpart); + + if ( my $cb = $opt{'svc_error_callback'} ) { + my $cust_pkg = $pkgnum + ? qsearchs('cust_pkg', {pkgnum=>$pkgnum}) + : ''; #? + &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); + } }, 'edit_callback' => sub { @@ -29,13 +36,13 @@ die "No part_svc entry!" unless $part_svc; label_fixup($part_svc, $opt); - - if ( my $cb = $opt{'svc_edit_callback'} ) { + + if ( my $cb = $opt{'svc_edit_callback'} ) { my $cust_pkg = $pkgnum ? qsearchs('cust_pkg', {pkgnum=>$pkgnum}) : ''; #? - &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); - } + &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); + } }, 'new_hashref_callback' => sub { @@ -48,23 +55,23 @@ }, 'new_callback' => sub { - my( $cgi, $svc_x, $fields, $opt ) = @_; + my( $cgi, $svc_x, $fields, $opt ) = @_; - $part_svc = qsearchs( 'part_svc', { svcpart=>$svcpart }); - die "No part_svc entry!" unless $part_svc; + $part_svc = qsearchs( 'part_svc', { svcpart=>$svcpart }); + die "No part_svc entry!" unless $part_svc; - label_fixup($part_svc, $opt); + label_fixup($part_svc, $opt); - #$svcnum=''; + #$svcnum=''; - if ( my $cb = $opt{'svc_new_callback'} ) { + if ( my $cb = $opt{'svc_new_callback'} ) { my $cust_pkg = $pkgnum - ? qsearchs('cust_pkg', {pkgnum=>$pkgnum}) - : ''; #? - &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); - } + ? qsearchs('cust_pkg', {pkgnum=>$pkgnum}) + : ''; #? + &{ $cb }( $cgi,$svc_x, $part_svc,$cust_pkg, $fields,$opt); + } - $svc_x->set_default_and_fixed; + $svc_x->set_default_and_fixed; }, diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 704d256e6..a6449b880 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -11,11 +11,9 @@ % % # 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"; -% } +% $redir_url = popurl(3)."edit/".$part_svc->svcdb.".cgi?". +% "pkgnum=".$cust_pkg->pkgnum. ";svcpart=$svcpart"; +% $redir_url .= ";qualnum=$qualnum" if $qualnum; % } <% header('Package ordered') %>