Solved

# Calaulate interest on debt until paid

Posted on 2012-08-29
431 Views
Not sure how to ask this question. I am using Adobe Acrobat X to present a form to a dealer that is used to report monthly meals tax remittance. The dealer is required to collect a local percentage of the net cost of the meal in addition to state sales tax. Each month, the amount collected must be reported and the amount collected must be remitted to the locality. I have the form created that does that. In addition, if the amount they owe (based on the calculation against gross sales * the % of local meals tax) is not remitted they pay a penalty of 10% or \$10, whichever is more. I have worked out that calculation as well.

Where I am stumped is calculating the interest on the amount due if it is not reported and paid within 30 days of the due date. As an example:

Gross Sales = \$1,000
Local % = 6%
Penalty = The greater of 10% or \$10
Due Date = July 20, 2012
Filing Date = August 21, 2012
Gross Sales * Local % = Tax Due (\$60)
PenaltyAmt = \$10
Total Due = Tax Due (\$60) + Penalty (\$10)
Interest = 10% (.8333% per month) per year on the unpaid balance after 30 days.

Notes:

If not paid by the 20th of the month following the last day of the month being reported(January 1-31 Gross is reportable by February 20), the penalty is the greater of 10% or \$10. In this scenario the dealer is late filing by 60 days therefore subject to the penalty. The interest will not be applied until the 31st day of delinquency.

The answer I am looking for in the scenario above is:

Tax Due + Penalty = \$70
Interest = \$.58
Total Due = Tax Due + Penalty + Interest (\$70.58)

On August 21, the amount due will be:

Tax Due + Penalty = \$70
Interest = \$1.17 (\$70 * .016666)
Total Due = \$71.17

Now JavaScript can I attach to the Toal Due field in an Acrobat for to calculate the Interest and populate the Total Due.

Wow. That was tough!!
0
Question by:ergenbgr

LVL 25

Expert Comment

its not clear what you are asking for.

are you looking for the formula to calculate annual interest with a javascript implementation,

or how to connect javascript to acrobat?
0

Author Comment

How to calculate annual interest with javascript. My concern is that the interest is applied to the TotalDue (TaxDue + Penalty) each month.  There is no interest on interest as the TotalDue increases. Every 30 days, interest is applied to the original principle, not the balance due.

Make sense?
0

LVL 25

Expert Comment

Do you want to apply interest on interest? In other words, compound monthly - that would be a typical scenario. ( you can also compound quarterly, semi-annually, annually, etc...)

Or, do you Not want to compound the interest?
0

Author Comment

Will not compound interest. This project is for a local government meals tax administration. That being the case, the interest is applied each month only to the initial assessment. First 30 day period would be TotalDue * .0083, second 30 day period would be TotalDue * .016667, third 30 day would be TotalDue * .024999.

Thanks.
0

LVL 25

Expert Comment

If someone wants to pay off their debt in the middle of the month, is the interest pro-rated (in which you would calculate daily interest, not monthly), or do they pay the full month's interest?
0

Author Comment

I just checked with collections and was told that the interest is calculated daily after the first day of delinquency. That being the case, DailyRateOfInterest (AnnualTaxRate / 365) = .000274.
0

LVL 25

Accepted Solution

multiply .000274 by the munber of days interest is due:

`````` var _rate = .00027397260274; // constant
var taxDue = 60; // the \$60 dolloars from your example
var penalty = 10; // the \$10 from your example
var principal = taxDue + penalty;
var interestDue = 0;
var daysOwing = 60; // the number of days that interest is charged

function calculateTotalDue(){
interestDue = principal * _rate * daysOwing;

totalDue = principal + interestDue;

// UP to two decimal places
totalDue = Math.ceil((totalDue * 100));
totalDue /= 100;

}
``````

Do you need help figuring the days owing or other date functions?
0

Author Closing Comment

Valuable assistance, thanks.
0

## Featured Post

### Suggested Solutions

Input sanitization for text field 3 26
json format text only 4 50
CRM 2011 Error when closing 17 30
The ability to edit PDF documents can be useful, however it may not be a straight forward process. Many non-technical people don't realise that a PDF document is basically an image rather than a text file, even if it contains nothing but text. If…
*Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…