Welcome, Guest Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
 Page:12

# TOPIC:

## Rounding issue 20 Jan 2020 07:27 #12766

 Karl-Heinz Posts: 774 Hi Jeff, if it doesn´t help what Robert suggests, you should search the web with keywords like "math round australian cent". i´m pretty sure there's no need to reinvent the (formula) wheel. regards Karl-Heinz Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 07:56 #12768

 Karl-Heinz Posts: 774 Interesting - at least to me - is the statement below about the difference if a payment is made by cash or by electronic transaction. stackoverflow.com/questions/7510107/java...ces-in-05-increments [...] 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. [...] regards Karl-Heinz Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 08:53 #12772

• BiggyRat
• Topic Author

Hi Robert, No, that didn't work - at least if I've understood you correctly.

? Round(((self:oDCQTY1:VALUE * self:oDCUNITPR1:VALUE) * nGSTInc)*2,1)
? ((self:oDCQTY1:VALUE * self:oDCUNITPR1:VALUE) * nGSTInc)/2

In the example where

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.

Thanks again guys.

Jeff

## Rounding issue 20 Jan 2020 09:47 #12776

 robert Posts: 3447 Jeff, 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 - row 1 = 'raw value' - row 2 = value * 2 - row 3 = row 2, rounded to 1 decimal - row 4 = row 3 divided by 2 I think the rounding to 0,05 works exactly like expected. XSharp Development Team The Netherlands Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 11:28 #12781

 BiggyRat Topic Author I just don't get why this is so hard. The Australian dollar is just a decimal system. Hardly unusual. Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 11:44 #12783

 wriedmann Posts: 3297 Hi Jeff, 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. Wolfgang Wolfgang Riedmann Meran, South Tyrol, Italy www.riedmann.it - docs.xsharp.it Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 12:36 #12791

 robert Posts: 3447 Jeff, 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? Robert XSharp Development Team The Netherlands Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 12:50 #12792

 BiggyRat Topic Author 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. Please Log in or Create an account to join the conversation. Last edit: by BiggyRat.

## Rounding issue 20 Jan 2020 12:55 #12793

 FFF Posts: 1398 May i kindly remind you: it is YOU, who wants help, for free. So, take a step back, calm down, rethink, what people tried to explain, then come back. Regards Karl (X# 2.14.0.4; Xide 1.33; W8.1/64 German) Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 13:03 #12794

 BiggyRat Topic Author 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? Please Log in or Create an account to join the conversation. Last edit: by BiggyRat.

## Rounding issue 20 Jan 2020 13:32 #12795

 wriedmann Posts: 3297 Hi Jeff, 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). This is my last message in this thread. Wolfgang Wolfgang Riedmann Meran, South Tyrol, Italy www.riedmann.it - docs.xsharp.it Please Log in or Create an account to join the conversation.

## Rounding issue 20 Jan 2020 13:35 #12796

 BiggyRat Topic Author It's EXACTLY WHAT I ASKED. Anyway, there's clearly no future here. And I've NEVER accused any of you of being stupid. That seems to be an area set aside for me.. Please Log in or Create an account to join the conversation. Last edit: by BiggyRat.
 Page:12