Inconsistent rounding on currency fields

S

stuartwhiteford

I have an InfoPath 2007 form which pulls data from an ASP.NET web service
(with an underlying SQL Server database). The data types in all the affected
columns are Money.

The web service returns the following XML: -

<Subtotal>249.9</Subtotal>
<Delivery>20</Delivery>
<Tax>40.485</Tax>
<Total>310.385</Total>

On my form the Tax and Total fields have been formatted as currency with 2
decimal places and they show the following: -

Tax £40.48
Total £310.39

I've checked the values in the database and displayed them in the form out
to 9 decimal places and the values are: -

40.485000000
310.385000000

So why does one round up and the other round down?

Cheers,
Stuart.
 
S

stuartwhiteford

Thanks, that seems to work.

Also fixes the other issue I posted about today "Inconsistent rule behaviour
when value has 2 decimal places".
 
S

S.Y.M. Wong-A-Ton

Cool!

stuartwhiteford said:
Thanks, that seems to work.

Also fixes the other issue I posted about today "Inconsistent rule behaviour
when value has 2 decimal places".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top