X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main_county.pm;h=9a4990a9dd37e1de280bd9c5e1d3a2a0764a9b21;hb=c6782ab85ea83e0c78d85b8975985aac9d467f9d;hp=57335957112436e22b6ca9dc16f2794bff0fed7f;hpb=2be0687ad93376100101bb270d7ff838b91a869a;p=freeside.git diff --git a/FS/FS/cust_main_county.pm b/FS/FS/cust_main_county.pm index 573359571..9a4990a9d 100644 --- a/FS/FS/cust_main_county.pm +++ b/FS/FS/cust_main_county.pm @@ -137,33 +137,6 @@ sub check { } -sub taxname { - my $self = shift; - if ( $self->dbdef_table->column('taxname') ) { - return $self->setfield('taxname', $_[0]) if @_; - return $self->getfield('taxname'); - } - return ''; -} - -sub setuptax { - my $self = shift; - if ( $self->dbdef_table->column('setuptax') ) { - return $self->setfield('setuptax', $_[0]) if @_; - return $self->getfield('setuptax'); - } - return ''; -} - -sub recurtax { - my $self = shift; - if ( $self->dbdef_table->column('recurtax') ) { - return $self->setfield('recurtax', $_[0]) if @_; - return $self->getfield('recurtax'); - } - return ''; -} - =item label OPTIONS Returns a label looking like "Anytown, Alameda County, CA, US". @@ -512,8 +485,10 @@ sub taxline { # now round and distribute my $extra_cents = sprintf('%.2f', $taxable_cents * $self->tax / 100) * 100 - $tax_cents; + # make sure we have an integer + $extra_cents = sprintf('%.0f', $extra_cents); if ( $extra_cents < 0 ) { - die "nonsense extra_cents value $extra_cents"; # because seriously, wtf + die "nonsense extra_cents value $extra_cents"; } $tax_cents += $extra_cents; my $i = 0;