Page 2 of 2 < 1 2
Topic Options
#11355 - 02/15/08 12:54 PM Re: More on CN amounts? [Re: Andre Kuehnemund]
Michael Mulrooney Offline
Adagio Virtuoso

Registered: 02/07/02
Posts: 839
Loc: Vancouver, BC
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.

Top
#11356 - 02/15/08 02:13 PM Re: More on CN amounts? [Re: Michael Mulrooney]
Andre Kuehnemund Offline
Adagio Guru

Registered: 08/10/07
Posts: 127
Loc: Emeryville, CA U.S.A.
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 (224 downloads)


Top
#11357 - 02/15/08 02:14 PM Re: More on CN amounts? [Re: Andre Kuehnemund]
Andre Kuehnemund Offline
Adagio Guru

Registered: 08/10/07
Posts: 127
Loc: Emeryville, CA U.S.A.
I meant 'Total Dollar Value' only. The amounts in 'Total Order Value' for credit notes appears to always be zero.

Top
#11361 - 02/15/08 04:42 PM Re: More on CN amounts? [Re: Andre Kuehnemund]
Bruce Gardner Online   content
Adagio Wizard

Registered: 06/15/04
Posts: 3616
Loc: Toronto ON, Canada
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?


Edited by Bruce Gardner (02/15/08 04:50 PM)
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
#11362 - 02/15/08 05:56 PM Re: More on CN amounts? [Re: Bruce Gardner]
Andre Kuehnemund Offline
Adagio Guru

Registered: 08/10/07
Posts: 127
Loc: Emeryville, CA U.S.A.
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

Top
#11372 - 02/16/08 12:04 PM Re: More on CN amounts? [Re: Andre Kuehnemund]
Ralph Allan Offline
Adagio Virtuoso

Registered: 06/02/04
Posts: 694
Loc: Prince George BC
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

Top
Page 2 of 2 < 1 2


Moderator:  Christa_Meissner 
Who's Online
2 registered (Tanya_Belanger, Warren Karges), 58 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14477 Topics
70707 Posts

Max Online: 432 @ 01/20/25 10:17 PM
May
Su M Tu W Th F Sa
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 31