Our accounting department wants me to make a check requisition that calculates for users as they fill it out. I set it up so that as users enter a check amount, they can then allocate percentages toward lines of business in different fields to see how much money is represented by each percentage. However, accounting wants this column of allocated dollar amounts to not just visually round up to the next penny, but to ACTUALLY round up so that when they are totaled they could equal more than the requested check amount by a penny or two. (Long story.)
Currently, if I type in a check amount of $50.50, then allocate 50%, 25%, and 25% to three different lines of business, they calculate to amounts of $25.25, $12.63, and $12.63. This should total $50.51, but the total field is showing $50.50. I can't get it to total the rounded up amounts, just the actual amounts. Accounting swears this is possible in Excel, but I've got to do this in a pdf.
Any suggestions? If it involves Javascript, please go slow. I'm a tech writer/editor, not a programmer. Thanks!!
(Sorry, I'm using Mac not Windows. I see I chose the wrong tag.)
Are you using Acrobat or LiveCycle Designer to create the form?
If I were in your position, I would require the people in accounting to give me explicit rules regarding how rounding should take place. Lacking that, we can only guess at solution. There are many rounding schemes that have been used in financial calculations.
In particular, you need to clarify what numbers like 3.765, 3.775, and -3.765 should be rounded to. Different rounding methods available in JavaScript can round these cases differently. Even if you're not dealing with negative amounts today, you may someday.
George