Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Joined: Feb 2002
Posts: 839
M
Adagio Virtuoso
Adagio Virtuoso
M Offline
Joined: Feb 2002
Posts: 839
Numbers are not always displayed as Positive.

Gridview displays positive numbers and negative numbers differently.

999.99 is positive; (999.99) is negative.

In the formula

IF({Doc Type}="C",-{Total Dollar Value}*{% Comm}/100, {Total Dollar Value}*{% Comm}/100)

it is the -{Total Dollar Value} that makes the Commission negative.

Joined: Aug 2007
Posts: 127
Adagio Guru
Adagio Guru
Joined: Aug 2007
Posts: 127
Hi Michael:

I understand that, but that's not what I see happening. Please look at the attached screenshot. You'll see 3 credit notes. Under both 'Total Dollar Value' and 'Total Order Value' you'll see positive amounts. I had to create a calculated column called 'True Amount' that would convert those amounts that were credit notes into negative amounts.

Cheers,

Andre
Attachments
8-amounts2.jpg (90.56 KB, 250 downloads)

Joined: Aug 2007
Posts: 127
Adagio Guru
Adagio Guru
Joined: Aug 2007
Posts: 127
I meant 'Total Dollar Value' only. The amounts in 'Total Order Value' for credit notes appears to always be zero.

Joined: Jun 2004
Posts: 3,692
B
Adagio Wizard
Adagio Wizard
B Offline
Joined: Jun 2004
Posts: 3,692
Andre:

Yes, "Total Dollar Value" will always be positive. You need to look at the type of Document and reverse the sign if it is a Credit Note.

That is what Michael's formula does. If the Document is "C", then switch the sign. And this is exactly what you did with your "True Amount" calculated column.

I believe that you and Michael are in agreement, just expressing yourselves differently.

The only question is why you weren't able to use your "True Amount" column to calculate your commission amount. As David said earlier, that will work. For instance: {True Amount} * .10 will give you proper figures.

Of course, since you have a calculation that works, why change it?

Last edited by Bruce Gardner; 02/15/08 10:50 PM.
Joined: Aug 2007
Posts: 127
Adagio Guru
Adagio Guru
Joined: Aug 2007
Posts: 127
Hi Bruce:

Yes, now that it's working, I'm not going to change it.;-)

By the way, I recreated this report using the Sales Order Detail table (We had to exclude miscellaneous charges - and those are not in the header table). I used pretty much the same formula ('Amt' instead of 'Total Dollar Value') - and everything worked like a charm. And the user I wrote this for seems to like the result.:-)

Thanks all for your help!

Andre

Joined: Jun 2004
Posts: 694
Adagio Virtuoso
Adagio Virtuoso
Joined: Jun 2004
Posts: 694
Andre,

I am not familiar with the programming language used for Adagio modules, but there is one general underlying reason why the number may always be stored as positive ones: you can store larger numbers.

A small example:

In one byte, 8 bits, you can store values up to 2 to the 8th power, 256.

But, if you take away one bit to store the sign, you can then store values from -128 to +128.

The same is true, of course, for multi-byte integers as well.

Just a thought: I'm sure Adagio's programmers did not set it up that way just to annoy you and me .


Ralph Allan
Business Computer Centre
Prince George BC Canada
Page 2 of 2 1 2

Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 69 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,682
Posts71,651
Members1,875
Most Online1,408
Dec 9th, 2025
November
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Powered by UBB.threads™ PHP Forum Software 8.0.0