30.08.2015, 15:05
Should throw in more random pays to check that it is indeed correct. Rather than simply using 1 value of 5000.
And compare it with a calculator.
And when you do it with the calculator, be sure that it is actually doing it correctly. Cheap calculators are common to fault in percentages.
That's why when shop clerks are calculating product tax, they don't use the percent button at all, they divide the whole number, then times by another number to get their result.
(I can't remember the way we used to do it in my old work, as they've changed the tax rate from 12.5 to 15, so whatever I could remember, would lead you wrong, but we used to divide the "actual internal price" by like, 8 or something, then times that by 9, and that would give us our tax inclusive price for the customer. (That would be on a 12.5% markup, if it were even remotely close to being correct via recall)
Even maybe plot out comparisons of various prices on a spreadsheet and get that to check it. Spreadsheet would more likely pull the % not a problem, and would likely be accurate as long as the formula it recieved is correct.
MOAR NUMBERS! The count, wants MOAR...
Your first seems more right than the second... The second is grabbing a value that's not being altered at all, where the first is actually checking against the main value.
And compare it with a calculator.
And when you do it with the calculator, be sure that it is actually doing it correctly. Cheap calculators are common to fault in percentages.
That's why when shop clerks are calculating product tax, they don't use the percent button at all, they divide the whole number, then times by another number to get their result.
(I can't remember the way we used to do it in my old work, as they've changed the tax rate from 12.5 to 15, so whatever I could remember, would lead you wrong, but we used to divide the "actual internal price" by like, 8 or something, then times that by 9, and that would give us our tax inclusive price for the customer. (That would be on a 12.5% markup, if it were even remotely close to being correct via recall)
Even maybe plot out comparisons of various prices on a spreadsheet and get that to check it. Spreadsheet would more likely pull the % not a problem, and would likely be accurate as long as the formula it recieved is correct.
MOAR NUMBERS! The count, wants MOAR...
Your first seems more right than the second... The second is grabbing a value that's not being altered at all, where the first is actually checking against the main value.