pjohns
3rd March 2009, 17:19
Hello,

We have an invoice layout where we are doing a currency conversion on the invoice total using a print expression in the report field. The expression we are using is -

(invo.totl*tdsls045.rats)/tdsls045.ratf

This is causing a rounding difference of 0.01 So we have an total of 150.57 instead of 150.56. Our customers system will not allow for any tollerance in totals so they are rejecting our invoices.

How can I resolve my issue?

Thanks

PJ

Kozure Ohashi
3rd March 2009, 17:32
You can try:


round((invo.totl*tdsls045.rats)/tdsls045.ratf,2,1)

in the field or report script, or reprogram the baan logic for rounding detail lines in invoices to match 100 % same amount.

Regards,

Kozure

pjohns
3rd March 2009, 17:35
Thanks Kozure,

I have already tried round((invo.totl*tdsls045.rats)/tdsls045.ratf,2,1) but that made no difference.


PJ

mark_h
3rd March 2009, 17:48
What I did for my customers was get them agree to let me apply the difference to the last line. This was not invoices, but same theory. What I had to do was track the difference. For this example lets say I have 2 lines of data. So I set up a total variable, calculate first line amount. Subtract first line amount from total. Then calculate second line total. Subtract from the total amount again. Then after the selectdo I add that difference to the last line. So if I had a 10.25 cost and 50% line 1 and 50% line 2 then line 1 got 5.12 and line 2 got 5.13. It worked for what I needed. I have to admit I was doing this in tables in a script and not in a report. So I had a subroutine to apply the balance of the difference to the last line. Not sure if this type logic will work for you.