X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fgeocode_Mixin.pm;h=a17a0abed2d071da035aa52d439920098e39b290;hb=7ebd90ec5704605ee79d8cc29eba825f1a8e6a48;hp=498b7cf97c44edb3ffa1571d0df9b4e355d25918;hpb=528e7e1cb1a6d05f87847bf9fd9b7e0e9fc33f6f;p=freeside.git diff --git a/FS/FS/geocode_Mixin.pm b/FS/FS/geocode_Mixin.pm index 498b7cf97..a17a0abed 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');