summaryrefslogtreecommitdiff
path: root/FS/FS/geocode_Mixin.pm
diff options
context:
space:
mode:
authorivan <ivan>2011-03-13 19:38:02 +0000
committerivan <ivan>2011-03-13 19:38:02 +0000
commitf0f1d277947922b81bcc4d77971a43ed125d72f5 (patch)
tree524610d255885564d06a63f37f0d45076888267f /FS/FS/geocode_Mixin.pm
parent528e7e1cb1a6d05f87847bf9fd9b7e0e9fc33f6f (diff)
qualification address handling changes, RT#7111
Diffstat (limited to 'FS/FS/geocode_Mixin.pm')
-rw-r--r--FS/FS/geocode_Mixin.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/FS/FS/geocode_Mixin.pm b/FS/FS/geocode_Mixin.pm
index 498b7cf..a17a0ab 100644
--- a/FS/FS/geocode_Mixin.pm
+++ b/FS/FS/geocode_Mixin.pm
@@ -96,19 +96,23 @@ sub location_label {
$notfirst++;
}
- my %location_type;
- if ( 1 ) { #ikano, switch on via config
- { no warnings 'void';
- eval { 'use FS::part_export::ikano;' };
- die $@ if $@;
+ if ( $self->get($prefix.'location_type') ) {
+ my %location_type;
+ if ( 1 ) { #ikano, switch on via config
+ { no warnings 'void';
+ eval { 'use FS::part_export::ikano;' };
+ die $@ if $@;
+ }
+ %location_type = FS::part_export::ikano->location_types;
+ } else {
+ %location_type = (); #?
}
- %location_type = FS::part_export::ikano->location_types;
- } else {
- %location_type = (); #?
+
+ $line .= ' '.&$escape( $location_type{ $self->get($prefix.'location_type') }
+ || $self->get($prefix.'location_type')
+ );
}
- $line .= ' '. &$escape( $location_type{ $self->get($prefix.'location_type') })
- if $self->get($prefix.'location_type');
$line .= ' '. &$escape($self->get($prefix.'location_number'))
if $self->get($prefix.'location_number');