[ic] Tax caluculation problem

murahashi interchange-users@interchange.redhat.com
Thu Nov 15 04:16:01 2001


> I think this may be a problem in the round_to_frac_digits
> routine -- it doesn't operate when the number is zero.
> 
> Try this patch to Util.pm:
> 
> Index: Util.pm
> ===================================================================
> RCS file: /anon_cvs/repository/interchange/lib/Vend/Util.pm,v
> retrieving revision 2.7
> diff -u -r2.7 Util.pm
> --- Util.pm 2001/10/31 22:22:35 2.7
> +++ Util.pm 2001/11/15 07:16:55
> @@ -203,7 +203,8 @@
>   # use what we were given
>   }
>   elsif ( $Vend::Cfg->{Locale} ) {
> - $digits = $Vend::Cfg->{Locale}{frac_digits} || 2;
> + $digits = $Vend::Cfg->{Locale}{frac_digits};
> + $digits = 2 if ! defined $digits;
>   }
>   else {
>   $digits = 2;
> 
> If it works for you, I will then put it in the distribution.
> Thank you very much for the investigation.
> 
It worked well in All of cases we tested.
You are super! Thank you very very much.

Please put in the distribution.

---------------------------------------------------------------
KIDA Net Business Ltd
Shozo Murahashi