foodcoop-adam / foodsoft

DEPRECATED, being merged in upstream. Web-based software for foodcoops - as used in NL.
http://foodcoop-adam.github.io/
Other
10 stars 3 forks source link

Round numbers only on display #140

Closed wvengen closed 10 years ago

wvengen commented 10 years ago

Doing some calculations with order totals, I find that there are small differences. E.g. computing the VAT of a group_order over its net price is not exactly equal to the group_order's gross price minus net and deposit.

Rounding is now done in ArticlePrice each time a computation is done. This should be removed, and rounding should only be done in display, perhaps in number_to_currency.

wvengen commented 10 years ago

Also introduced a grace price in payorder, so that (by default) members may spend EUR 0.10 more than they have, without needing to pay. This is useful to minimize transaction costs, but is also used as a safeguard here to be sure that any rounding issues don't affect the result.