As an Australian I have to dispute your assertion that all currency here is in .05 increments. All cash payments are in .05 increments because our smallest denomination coin is the 5c, but any electronic transactions, or old-school paper-based credit card or cheque transactions (including, obviously, AMEX transactions) are to the nearest cent. Do not even think about rounding to nearest 5 cents unless your customer is paying cash.
oDCQTY1:Value is 1
oDCUNITPR1 is 126.50
nGSTInc is 10
Result = 134.14
It should be rounded up to 134.15 (see below)
Karl-Heinz, interesting yes, but useless fact nonetheless. The quoted statement is legally true, however, "the customer is always right" and they're insisting on the rounding. To be honest, it's not a particularly strange request, MYOB Accounting software does it as I believe does Xero.
There must be something wrong in your code. I tried my formula in excel and see the following:
1,21 1,22 1,23 1,24 1,25 1,26 1,27 1,28 1,29 1,30
2,42 2,44 2,46 2,48 2,50 2,52 2,54 2,56 2,58 2,60
2,40 2,40 2,50 2,50 2,50 2,50 2,50 2,60 2,60 2,60
1,20 1,20 1,25 1,25 1,25 1,25 1,25 1,30 1,30 1,30
you are really trying to make it as hard as possible to help you and to waste others time as much as possible.
If you initially had posted what your rounding requirements were, like:
1.05 -> 1.00
1.06 -> 1.10
the entire thread would have been 3 or 4 messages long, and you had a solution in a few hours.
So you have lost hours not only of your time, but also Roberts, Karls, Karl-Heinz's and mine.
The problem is not the Australian Dollar, but that you are not clear about your own requirements.
First you need to be clear about them, and then you should try to formulate your requests as clear as possible.
Otherwise people will not be able to help you.
I echo what Wolfgang said: Specify what you expect to get and then we'll be able to help you.
And this is not the first time you have not given us everything we needed to reproduce and fix your problems.
Remember the report with the image that was too big where you did not include that image, so we could not reproduce your "out of memory" issue?
What the hell else can i give you guys? You have ALL the code, all the resultant screenshots of resultant code, HOW HAVE I NOT GIVEN YOU BLOKES ENOUGH INFORMATION? Seriously. It's not rocket science you multiply two numbers together each with 2 decimal places, get the product of those two and multiply it by another number, also on 2 decimal places. What have I NOT EXPLAINED? Why is it so hard for you to understand? Why, once again, have I NOT given you lot enough information? You have 100% reproducible code. Something you harp on incessantly, yet you accuse me of not giving you enough information. Is this a language barrier thing? Thats the only thing I can think of.
Seriously if I explain a problem in PLAIN, SIMPLE ENGLISH is too hard for you to understand, then there's no chance of me testing the X Sharp waters where I admit I'm starting off out of my depth.
The point is im not getting help. Free or otherwise is not the point. People aren't reading my posts, just rolling their eyes and dissing me, then accuse me of not giving you guys enough information. Tell me Karl READ ALL MY POSTS IN THIS THREAD ,then tell me what more i can tell you, other than the answer. I have been so polite and appreciated all the help given, but I'm sick of being accused of not giving you enough information, and then when I do, I get accused of supplying "massive files", and sending too many emails, even each one explained in detail changes in code to attempt to fix the problem and the results of such changes... WTF else am i logically be expected to do?
unfortunately the Round() function in VO works as documented - and it seems you are not able to understand what the documentation says - and this was written by a native English speaker.
The Round() function was only not doing what YOU expected, And how WE can understand what YOU think without writing it when we don't have any problems with this function? We can not read your mind (fortunately)
I had answered to your question because I was thinking I could have a solution, and so did the others - but nobody was able to understand what you needed.
Maybe we all that we are not native English speakers are too stupid to understand your requests.
But try to ask yourself why all your requests both in the NG and here in the forum take so long to get an answer or don't get any answer that works for you? Even when in both places there are several native speakers and experts of the language?
t's not rocket science you multiply two numbers together each with 2 decimal places, get the product of those two and multiply it by another number, also on 2 decimal places
This is NOT what you asked!!!!!!
You wrote that the numbers were not rounded correctly, and how can we understand what YOU mean with correctly rounded?
If Australia has some rules how to round: we don't know them, and YOU have to say what you need, and then someone can provide the correct function (and Robert DID).