summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorlevinse <levinse>2011-01-20 20:46:30 +0000
committerlevinse <levinse>2011-01-20 20:46:30 +0000
commit98779ec47370ad67c716154f67f6a726b83e09ed (patch)
tree808e131493ef786f9b63e13b1341167aaae72b3c /httemplate/edit
parent6f1653f32e2d7bef2b31832a0289482bc40613e5 (diff)
Ikano / svc_dsl / qualification improvements, RT7111
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/process/quick-cust_pkg.cgi22
-rw-r--r--httemplate/edit/svc_dsl.cgi17
2 files changed, 36 insertions, 3 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi
index 599f7607c..704d256e6 100644
--- a/httemplate/edit/process/quick-cust_pkg.cgi
+++ b/httemplate/edit/process/quick-cust_pkg.cgi
@@ -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 @@ $cgi->param('discountnum') =~ /^(\-?\d*)$/
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 @@ if ( $locationnum == -1 ) {
$opt{'cust_location'} = $cust_location;
}
-my $error = $cust_main->order_pkg( %opt );
+my $error = $cust_main->order_pkg( \%opt );
</%init>
diff --git a/httemplate/edit/svc_dsl.cgi b/httemplate/edit/svc_dsl.cgi
index 9b4d1c77d..48464fbad 100644
--- a/httemplate/edit/svc_dsl.cgi
+++ b/httemplate/edit/svc_dsl.cgi
@@ -95,6 +95,16 @@ my $new_cb = sub {
my $ddd = $cust_pkg->start_date;
$ddd = time unless $ddd;
+ my @quals = $export->quals_by_cust_and_pkg($cust_pkg->cust_main->custnum,$cust_pkg->pkgpart);
+ my @prequalids;
+ my %prequal_labels;
+ foreach my $qual ( @quals ) {
+ my $prequalid = $qual->vendor_qual_id;
+ push @prequalids, $prequalid;
+ $prequal_labels{$prequalid} = "$prequalid - qualification #"
+ .$qual->qualnum;
+ }
+
my @addl_fields = (
{ field => 'loop_type',
type => 'select',
@@ -105,7 +115,12 @@ my $new_cb = sub {
'password',
{ field => 'isp_chg', type => 'checkbox', },
'isp_prev',
- 'vendor_qual_id',
+ { field => 'vendor_qual_id',
+ type => 'select',
+ options => \@prequalids,
+ labels => \%prequal_labels,
+ onchange => 'ikano_vendor_qual_id_changed',
+ },
{ field => 'vendor_order_type',
type => 'hidden',
value => 'NEW' },