summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-02-03 19:45:05 -0800
committerIvan Kohler <ivan@freeside.biz>2013-02-03 19:45:05 -0800
commitd2eeb4a5d310fe5eb1b16ada10b57e01511122f9 (patch)
tree5a711936949c7395e66e7fc62a364d6f4e99d41d /FS
parent55152935236dd33b72214a8fb7260e71d2ce9ca2 (diff)
add location to credit application detail, RT#21054
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_bill_pkg_tax_location.pm6
-rw-r--r--FS/FS/cust_location.pm14
2 files changed, 16 insertions, 4 deletions
diff --git a/FS/FS/cust_bill_pkg_tax_location.pm b/FS/FS/cust_bill_pkg_tax_location.pm
index 723d6e0a3..140982e53 100644
--- a/FS/FS/cust_bill_pkg_tax_location.pm
+++ b/FS/FS/cust_bill_pkg_tax_location.pm
@@ -215,10 +215,8 @@ sub cust_credit_bill_pkg {
sub cust_main_county {
my $self = shift;
- my $result;
- if ( $self->taxtype eq 'FS::cust_main_county' ) {
- $result = qsearchs( 'cust_main_county', { 'taxnum' => $self->taxnum } );
- }
+ return '' unless $self->taxtype eq 'FS::cust_main_county';
+ qsearchs( 'cust_main_county', { 'taxnum' => $self->taxnum } );
}
sub _upgrade_data {
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index b86529b3d..b25163f36 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -479,6 +479,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 CLASS METHODS