X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=a90fbe170f67a4dfc95df753ff0249f9be11e214;hb=740a284c94d57bd755baa58dae36eae5bc581e44;hp=997532c904529f507a09e332cad8f207741348c7;hpb=9af90be45fa97bc6108d224f71bd85d55c073c23;p=freeside.git diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 997532c90..a90fbe170 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -202,9 +202,9 @@ sub location_label { foreach (qw ( city county state zip ) ) { my $method = "$prefix$_"; if ( $self->$method ) { - $line .= '(' if $method eq 'county'; + $line .= ' (' if $method eq 'county'; $line .= ($notfirst ? ' ' : $separator). &$escape($self->$method); - $line .= ')' if $method eq 'county'; + $line .= ' )' if $method eq 'county'; $notfirst++; } } @@ -225,6 +225,20 @@ sub line { $self->location_label; } +=item location_hash + +Returns a list of key/value pairs, with the following keys: address1, adddress2, +city, county, state, zip, country. + +=cut + +#geocode? not yet set + +sub location_hash { + my $self = shift; + map { $_ => $self->$_ } qw( address1 address2 city county state zip country ); +} + =back =head1 BUGS