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

Rounding issue 20 Jan 2020 09:47 #12776

 robert Posts: 1846 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 12:36 #12791

 robert Posts: 1846 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: 995 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.5b; Xide 1.25; 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.