lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 05/09/16 09:39, Rob Kendrick wrote:
> When handling money calculations, you basically have to go and read the
> Wikipedia article for every currency you're ever likely to handle so you
> can manage all the hideous corner cases.

It gets worse than that. You have to be careful of the order you perform
certain operations on the items you're pricing. Things like; do you
apply VAT/sales tax on the total of an order, or on each item.

These details will be part of the tax codes or the various regions
you're dealing with. I think they'd also mention the precision of the
calculations needed (e.g. calculate to 1/10th of a cent)

Scott