fix RT per-transaction recipient squelching, RT#25260
[freeside.git] / FS / FS / cust_location.pm
index a99fa17..daa851b 100644 (file)
@@ -429,7 +429,7 @@ sub location_label {
     elsif ( $self->prospectnum )  {
       $cust_or_prospect = FS::prospect_main->by_key($self->prospectnum);
     }
-    my $agent = $conf->config('cust_location-agent_code', 
+    my $agent = $conf->config('cust_main-custnum-display_prefix',
                   $cust_or_prospect->agentnum)
                 || $cust_or_prospect->agent->agent;
     # else this location is invalid
@@ -444,6 +444,20 @@ sub location_label {
   $prefix . $self->SUPER::location_label(%opt);
 }
 
+=item county_state_county
+
+Returns a string consisting of just the county, state and country.
+
+=cut
+
+sub county_state_country {
+  my $self = shift;
+  my $label = $self->country;
+  $label = $self->state.", $label" if $self->state;
+  $label = $self->county." County, $label" if $self->county;
+  $label;
+}
+
 =back
 
 =head1 BUGS