# Rounding Invoices in Collaborati

We implemented the unbiased rounding mechanism widely used in financials which is called half-even rounding (or convergent rounding, or Gaussian rounding).  This uses a tie-breaking rule in which half-way values are rounded toward the nearest even number.  For example, if you run your test with total = 70.115 – it will round it to 70.12, 70.125 will also round to 70.12, then 70.135 – will be rounded to 70.14, and 70.145 – will be also rounded to 70.14, etc. The idea is that the overall totals across all rounded values add up most closely to the rounded total.

Additionally, Collaborati will round all Rates, Hours, and Units to two decimal places before calculating the line item totals.  Collaborati will send Rates, Hours and Units to TeamConnect with two decimal places.  The Price for Expenses is limited by the number of decimals in the client’s TeamConnect settings.  This can be found on the Client’s Settings page in Collaborati.  If Non-US Taxes are used, they are also rounded to two decimal places.

In order to avoid any problems with rounding, we suggest using Round Rates (rounded to the nearest dollar) and also hours in tenths of an hour (such as 0.1 or 0.5).

Note that Collaborati also has an allowance rule:
In the INVOICE_TOTAL calculation, a 0.1% variable amount is allowed for numeric rounding and in the LINE_ITEM_TOTAL calculation, a 0.1% variable amount is allowed for numeric rounding.  This may mean that the calculation discrepancy could appear as a Warning instead of an Error.

## Example

In this example, TK8 has a rate of \$522.75 .
In the LEDES file, the invoice total is showing as \$1725.11 .
The file is uploaded, but shows that there are Warnings, even though the File Status says: Ready to Submit

Click on the File Name (notice the Invoice total is \$1725.07 which is different from the calculated total of \$1725.11 )

Then click on View Warnings

There are two types of Warnings for Invoice Total and Line Item Total:

INVOICE_TOTAL 1725.11 does not match the total calculated by Collaborati 1725.07.
LINE_ITEM_TOTAL "104.56" does not match total "104.55" calculated by Collaborati.

Use the Warnings to review the LEDES file and check for Rounding issues.  Note the Line Item Total Warnings only occur on Line Items 4, 5, 6
Here we have opened the file in Excel for easier viewing:

The formula for the Line Item Total is:

LINE_ITEM_TOTAL = (LINE_ITEM_UNIT_COST * LINE_ITEM_NUMBER_OF_UNITS) + LINE_ITEM_ADJUSTMENT_AMOUNT

For example, the calculation for line 4 is:

LINE_ITEM_TOTAL = (522.75 * 0.3) + 0 = 156.825

Using half-even rounding:
156.825
rounds to
156.82

But in the file, the Line Item Total rounds up to 156.83 .

Review the file this way to correct Rounding issues.  Note also that the Rounding issues affect the Invoice Total.  So the Invoice Total may need to be reviewed.

Here the Invoice Total is the sum of the Line Item Totals.

Once the file has been corrected, upload the file again. The file preview indicates that there are no warnings.