summaryrefslogtreecommitdiff
path: root/FS/FS/cust_main_county.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-04-23 11:36:54 -0700
committerMark Wells <mark@freeside.biz>2013-04-23 11:37:12 -0700
commitd372a6b46727cd3d86f70e4c9c567a97f5f1f077 (patch)
treed2e957589a3ecdf18cdd2a1e3cb42c953679465b /FS/FS/cust_main_county.pm
parent8e83c67a7c8fdb375e9c48f6dac92b1fcd5b5e3a (diff)
option to show district on 3.0 tax report, #22137
Diffstat (limited to 'FS/FS/cust_main_county.pm')
-rw-r--r--FS/FS/cust_main_county.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm
index 9a4990a9d..a61d67e11 100644
--- a/FS/FS/cust_main_county.pm
+++ b/FS/FS/cust_main_county.pm
@@ -147,13 +147,10 @@ If the taxname field is set, it will look like
If the taxclass is set, then it will be
"Anytown, Alameda County, CA, US (International)".
-Currently it will not contain the district, even if the city+county+state
-is not unique.
-
-OPTIONS may contain "no_taxclass" (hides taxclass) and/or "no_city"
-(hides city). It may also contain "out", in which case, if this
-region (district+city+county+state+country) contains no non-zero
-taxes, the label will read "Out of taxable region(s)".
+OPTIONS may contain "with_taxclass", "with_city", and "with_district" to show
+those fields. It may also contain "out", in which case, if this region
+(district+city+county+state+country) contains no non-zero taxes, the label
+will read "Out of taxable region(s)".
=cut
@@ -175,12 +172,15 @@ sub label {
my $label = $self->country;
$label = $self->state.", $label" if $self->state;
$label = $self->county." County, $label" if $self->county;
- if (!$opt{no_city}) {
+ if ($opt{with_city}) {
$label = $self->city.", $label" if $self->city;
+ if ($opt{with_district} and $self->district) {
+ $label = $self->district . ", $label";
+ }
}
# ugly labels when taxclass and taxname are both non-null...
# but this is how the tax report does it
- if (!$opt{no_taxclass}) {
+ if ($opt{with_taxclass}) {
$label = "$label (".$self->taxclass.')' if $self->taxclass;
}
$label = $self->taxname." ($label)" if $self->taxname;