Sometimes the simplest problems are harder than they first seem. A client once specified a requirement to me: we'll give you the VAT-inclusive (20%) price; you need to generate invoices showing the net and VAT amounts. Sounds easy, right? net = round(tot*5/6) vat = round(tot/6)
That doesn't fix the issue that a 20%-tax-inclusive amount of 119 cents shouldn't exist: there's no net amount which should produce it.
-
-
Agreed, the soln is not to accept tax-inclusive as the input, store orig transaction in cents and always calc taxes & tax-inclusive on request.
-
But how should one recognise that it's a problem in the first place? Experience, I guess...
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.