#11338 - 02/14/08 04:25 PM
Re: More on CN amounts?
[Re: Andre Kuehnemund]
|
Adagio Guru
Registered: 08/10/07
Posts: 127
Loc: Emeryville, CA U.S.A.
|
OK, I created a calculated column called 'True amount' based on the formula shown in the above message. This now shows the credit note amounts as negative (they actually show as "(3,289.44)". However, when I looked at the commissions to be paid in this report, even the supposedly negative amounts resulted in positive commissions being calculated. For instance, 10% commission on (a credit note amount of) "(1,000.00)" resulted in a commission amount of "10.00". Obviously, GridView doesn't view amounts in parantheses as negative amounts. In order to get around that, I created another calculated column called '$$$' (to distinguish it from my existing '$ Comm' column and entered the following formula:
IF({Doc Type}="C", -{True Amount}*{% Comm}/100, {True Amount}*{% Comm}/100)
However, the commissions calculated in the '$$$' are still all positive. Is there something I'm missing? How do I get GridView to view amounts in parentheses as negative amounts?
thx,
A.
|
Top
|
|
|
|
#11342 - 02/14/08 07:08 PM
Re: More on CN amounts?
[Re: Andre Kuehnemund]
|
Adagio Virtuoso
Registered: 02/07/02
Posts: 839
Loc: Vancouver, BC
|
GridView treats Positive Numbers as "Positive" and Negative Numbers as "Negative". There is something else going on.
Try
IF({Doc Type}="C",-{Total Dollar Value}*{% Comm}/100, {Total Dollar Value}*{% Comm}/100)
|
Top
|
|
|
|
#11355 - 02/15/08 12:54 PM
Re: More on CN amounts?
[Re: Andre Kuehnemund]
|
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
|
|
|
|
#11361 - 02/15/08 04:42 PM
Re: More on CN amounts?
[Re: Andre Kuehnemund]
|
Adagio Wizard
Registered: 06/15/04
Posts: 3641
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)
|
Top
|
|
|
|
#11372 - 02/16/08 12:04 PM
Re: More on CN amounts?
[Re: Andre Kuehnemund]
|
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
|
|
|
|
|
0 registered (),
80
Guests and
1
Spider online. |
Key:
Admin,
Global Mod,
Mod
|
|
1872 Members
5 Forums
14527 Topics
70937 Posts
Max Online: 432 @ 01/20/25 10:17 PM
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|