Search: Browse by Category:
FAQ Main Page > General
ASK QUESTION
How can I control the rounding of billing/invoice amounts?
 
Print
Tell A Friend
Author: writeAuthor
Views: 14
Votes: 0

 
When you create a new database, by default the OT bill rate on a placement is carried to 3 decimal places. You control how many decimal places it can be carried to through the Screen Def.  You can set it to Money (2 decimals) or to 3 or 4 Decimals. This controls both what a user can enter for new placements and how to display rates for existing placements (and the latter is the rub.) 

Consider that the default OT bill factor is 1.5. By default, anytime a rate that ends in an odd cent is entered into the regular bill rate, the OT bill rate will have 3 decimals. So you go and change the Screen Def to limit the OT bill rate to 2 decimals. That controls what happens with placements created from that point forward -- but it does not change existing rate data.  And because the Screen Def also controls how the data is displayed on the placement screen, everything looks cool to the user when viewing placements -- as if the data were changed -- but it wasn't. It is merely being rounded on the display.

The period batch editor does not use the screen defs. It shows you exactly what you are billing and limits any entered bill rates to 3 decimal places. Still, the reports and invoice formats (like the placement screen) use whatever formatting you specify for the rate column within the report format. It all adds up and it gives you all the necessary flexibility -- but it can be confusing.

So how do you handle things? You can change the invoice formats to display up to 3 (or more) decimals in the rate column -- and do the same thing with the hours/units column. That is the surest way of showing the customer that things are being extended correctly. (The actual extension of an hours * rate calculation is always rounded to 2 decimals.) But my guess is that you don't want to be billing customers for half penny rates. So to handle that you should set the screen def in placements to limit the overtime bill rate to 2 decimals and then you should run a query to update any existing rates that may have already been carried to the half penny. The following query will use 5/4 rounding to update any overtime bill rate carried to 3 or more decimal places to 2 decimal places:

UPDATE Placements SET OvertimeBillRate=INT(OvertimeBillRate*100+.5)/100 WHERE int(OvertimeBillRate  *100)/100 <> OvertimeBillRate

Remember, you need only run this once to change any existing data. Any new placements will be limited by the Screen Def.

If you are using the CustomerRates feature then you should run a similar query on the CustomerRates tables:

UPDATE CustomerRates SET OTBill=INT(OTBill*100+.5)/100 WHERE int(OTBill  *100)/100 <> OTBill

This still would not prevent a user from entering a 3 decimal bill rate directly into the Period Batch Billing Editor, but they'd only get to that point because they explicitly entered it.

Last update: 06:05 PM Wednesday, May 2, 2007

Related Questions: