X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main_county.pm;h=6316f239a1428d478fc3aefbf1e1387b5767f346;hb=4cc0b69a94138d85b1ff8b67966127af3c72288d;hp=effc428817091f69b3ebff09f3ab94cbc9a70aa6;hpb=2413a3d43808ea6567bf25215d810bf102c498fd;p=freeside.git diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm index effc42881..6316f239a 100644 --- a/FS/FS/cust_main_county.pm +++ b/FS/FS/cust_main_county.pm @@ -56,6 +56,8 @@ currently supported: =item taxnum - primary key (assigned automatically for new tax rates) +=item district - tax district (optional) + =item city =item county @@ -119,6 +121,7 @@ sub check { $self->exempt_amount(0) unless $self->exempt_amount; $self->ut_numbern('taxnum') + || $self->ut_alphan('district') || $self->ut_textn('city') || $self->ut_textn('county') || $self->ut_anything('state') @@ -173,7 +176,7 @@ with different tax classes. sub sql_taxclass_sameregion { my $self = shift; - my $same_query = 'SELECT taxclass FROM cust_main_county '. + my $same_query = 'SELECT DISTINCT taxclass FROM cust_main_county '. ' WHERE taxnum != ? AND country = ?'; my @same_param = ( 'taxnum', 'country' ); foreach my $opt_field (qw( state county )) {