finishing e911/svc_phone location, RT#7047
[freeside.git] / FS / FS / cust_location.pm
index 997532c..a90fbe1 100644 (file)
@@ -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