diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-02-03 19:45:09 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-02-03 19:45:09 -0800 |
| commit | d77c2c4261d351684b6aec18a2b8e91702320e4a (patch) | |
| tree | 0578799d4570e085af46518d9dfb38714a4a71d9 /FS | |
| parent | 2f6d076bfbc49dcef8934381ff7eed331be916e9 (diff) | |
add location to credit application detail, RT#21054
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_bill_pkg_tax_location.pm | 6 | ||||
| -rw-r--r-- | FS/FS/cust_location.pm | 14 |
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 44dd6e3c4..cb8b34bb3 100644 --- a/FS/FS/cust_bill_pkg_tax_location.pm +++ b/FS/FS/cust_bill_pkg_tax_location.pm @@ -202,10 +202,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 } ); } =back diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index bcdb50c61..daa851b6b 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -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 |
