[freeside-commits] freeside/FS/FS qual.pm,1.7,1.8
Erik Levinson
levinse at wavetail.420.am
Thu Jan 20 12:46:31 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15820/FS/FS
Modified Files:
qual.pm
Log Message:
Ikano / svc_dsl / qualification improvements, RT7111
Index: qual.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/qual.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- qual.pm 8 Dec 2010 21:37:45 -0000 1.7
+++ qual.pm 20 Jan 2011 20:46:29 -0000 1.8
@@ -141,11 +141,22 @@
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
More information about the freeside-commits
mailing list