From 98779ec47370ad67c716154f67f6a726b83e09ed Mon Sep 17 00:00:00 2001 From: levinse Date: Thu, 20 Jan 2011 20:46:30 +0000 Subject: Ikano / svc_dsl / qualification improvements, RT7111 --- FS/FS/part_export/ikano.pm | 51 ++++++++++++++++++++++++++++++++++++---------- FS/FS/qual.pm | 15 ++++++++++++-- 2 files changed, 53 insertions(+), 13 deletions(-) (limited to 'FS') diff --git a/FS/FS/part_export/ikano.pm b/FS/FS/part_export/ikano.pm index fe645e479..5d8285e6b 100644 --- a/FS/FS/part_export/ikano.pm +++ b/FS/FS/part_export/ikano.pm @@ -313,7 +313,7 @@ sub qual { }; } -sub qual_html { +sub qual_result { my($self,$qual) = (shift,shift); my %qual_options = $qual->options; @@ -325,23 +325,52 @@ sub qual_html { && $optionvalue ne '' ); } - # XXX: eventually perhaps this should return both the packages a link to - # order each package and go to the svc prov with the prequal id filled in - # but only if cust, not prospect! - my $list = "Qualifying Packages:"; - $list; + + @filtered_quals; } sub notes_html { diff --git a/FS/FS/qual.pm b/FS/FS/qual.pm index 23a827224..8f5838973 100644 --- a/FS/FS/qual.pm +++ b/FS/FS/qual.pm @@ -141,11 +141,22 @@ sub location { if ( $self->locationnum ) { my $l = qsearchs( 'cust_location', { 'locationnum' => $self->locationnum }); - return $l->location_hash if $l; + if ( $l ) { + my %loc_hash = $l->location_hash; + $loc_hash{locationnum} = $self->locationnum; + return %loc_hash; + } } if ( $self->custnum ) { my $c = qsearchs( 'cust_main', { 'custnum' => $self->custnum }); - return $c->location_hash if $c; + + if($c) { + # always override location_kind as it would never be known in the + # case of cust_main "default service address" + my %loc_hash = $c->location_hash; + $loc_hash{location_kind} = $c->company ? 'B' : 'R'; + return %loc_hash; + } } # prospectnum does not imply any particular address! must specify locationnum -- cgit v1.2.1