I have a Business Rule in a process that transmits EDI documents that verifies the sum of line items on an invoice to the field that holds the total amount of the invoice. To do this, I have a map function that uses the Running Total function and maps that total to a Dynamic Document Property.

As you can see from the image, I'm multiplying fields and then mapping to a Running Total as well as to a Profile Element that holds the line item cost for each line on the invoice.

My problem is this: one of my input fields, in this case LDT28, is a decimal number: 8.333. Multiplying it and then mapping that value to a profile element means I can set the number of decimals and the profile will round the multiplied value.

But mapping it to a Dynamic Document Property gives me no such option. And the Number Format function I've got there is not rounding the results, it's simply truncating the results down to 2 decimal places. I also tried using a Math Set Precision function and had the same result.

Here's what it looks like when I run the process in Test Mode:

Notice that the Running Total output result is **1253.994984** and when it hits the Number Format function, it's changing that number to 1253.99 *instead of rounding it up to 1254.00*. As a result, my Dynamic Document property is $.01 off from the actual total of the invoice. I get the same result with a Math Set Precision function.

I've tried changing the format of the input profile element, but the result is the same.

How do I go about rounding this Dynamic Document Property?

Thanks.

Doesn't "1253.994" round down to "1253.99"? The behavior seems correct.