X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main_county.pm;h=8e83b1a1d166033e4a03fc44735cc7919ac5adb7;hp=17fe164e492a3d2873bccb6d6d8e34e8891a7a81;hb=a63b2729682586d8860290576e9307629424dbe0;hpb=cd2371a35a0c416366fa1822d99571ca68a5ad1e diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm index 17fe164e4..8e83b1a1d 100644 --- a/FS/FS/cust_main_county.pm +++ b/FS/FS/cust_main_county.pm @@ -57,6 +57,10 @@ currently supported: =item tax - percentage +=item taxclass + +=item exempt_amount + =back =head1 METHODS @@ -97,11 +101,15 @@ methods. sub check { my $self = shift; + $self->exempt_amount(0) unless $self->exempt_amount; + $self->ut_numbern('taxnum') || $self->ut_textn('state') || $self->ut_textn('county') || $self->ut_text('country') || $self->ut_float('tax') + || $self->ut_textn('taxclass') # ... + || $self->ut_money('exempt_amount') ; } @@ -119,15 +127,17 @@ sub check { sub regionselector { my ( $selected_county, $selected_state, $selected_country, $prefix, $onchange ) = @_; - $countyflag=1 if $selected_county; - unless ( @cust_main_county ) { #cache + $countyflag = 0; + +# unless ( @cust_main_county ) { #cache @cust_main_county = qsearch('cust_main_county', {} ); foreach my $c ( @cust_main_county ) { $countyflag=1 if $c->county; push @{$cust_main_county{$c->country}{$c->state}}, $c->county; } - } +# } + $countyflag=1 if $selected_county; my $script_html = < @@ -225,7 +235,7 @@ END =head1 BUGS -regionseletor? putting web ui components in here? they should probably live +regionselector? putting web ui components in here? they should probably live somewhere else... =head1 SEE ALSO