Haggis
7th April 2003, 13:53
Hi

Had a consultant on site who wrote a session but the total amount appearing on the report is wrong so trying to figure out why. His calculation in the script is:

amth.l = tfgld106.amth(attr.rotate) * (tfgld106.dbcr = tfgld.dbcr.credit ? -1 : 1)

I realise it getting the home currency but what is the rest doing, the ? and the :1 etc? Any ideas?

Thanks
Haggis

morpheus
7th April 2003, 15:07
Originally posted by Haggis

(tfgld106.dbcr = tfgld.dbcr.credit ? -1 : 1)

I realise it getting the home currency but what is the rest doing, the ? and the :1 etc? Any ideas?

Thanks
Haggis



if (tfgld106.dbcr = tfgld.dbcr.credit) then
multiplication by (-1)
else
multiplication by (1)
endif

evesely
7th April 2003, 16:02
See this topic (http://www.baanboard.com/programmers_manual_baanerp_help_3gl_features_expressions_and_operators) for more information on the ?: operator.

Haggis
7th April 2003, 16:09
Thanks for the help guys.

I now know whats happening.

Thanks
Haggis