Ray Ergenbright
asked on
Script to claculate PENALTY
I am using FormClac in an Adobe LifeCycle4 interactive form. I have included a copy of the form as an attachment.
The problem I am having deals with the calculation of Penalty. The penalty for late payment of the TAX Due is 10% of the TAX DUE or $10, whichever is greater. The penalty is applied unless the tax payment is remitted late. The form I am creating allow the taxpayer to calculate Penalty and Interest if they know the payment will be made after the deadline. Therefore the form has a checkbox to indicate the payment will be late. The taxpayer check the checkbox and enters the due date and the anticipated payment date. The form will then calculate the penalty, interest and the toal amount due if received on or before the anticipated date of payment.
The formula I am trying to use must consider the following logic:
I have everything resolved except the issue of populateing the PENALTY. I can claculate the PENALTY if the CHECKBOX id checked, using the following statement:
What can I add to this script to ensure that if the PENALTY calculates to less than $10, that amount is not entered into PENALTY but $10 is.
Thanks,
Ray
PenaltyInterest-1-.pdf
The problem I am having deals with the calculation of Penalty. The penalty for late payment of the TAX Due is 10% of the TAX DUE or $10, whichever is greater. The penalty is applied unless the tax payment is remitted late. The form I am creating allow the taxpayer to calculate Penalty and Interest if they know the payment will be made after the deadline. Therefore the form has a checkbox to indicate the payment will be late. The taxpayer check the checkbox and enters the due date and the anticipated payment date. The form will then calculate the penalty, interest and the toal amount due if received on or before the anticipated date of payment.
The formula I am trying to use must consider the following logic:
1.If CHECKBOX1 is checked, a PENALTY and INTEREST must be calculated
2. If the PENALTY claculated is less than $10, the PENALTY is populated with $10.
3. If the PENALTY calucates to > $10, the PENALTY is populated with the calculated amount.
4. If CHECKBOX1 is checked, INTEREST must be calculated at the rate on the form.
5. The TOTAL DUE is to be calculated.
I have everything resolved except the issue of populateing the PENALTY. I can claculate the PENALTY if the CHECKBOX id checked, using the following statement:
if (CheckBox1 == 1) then (NumericField2 * NumericField8) endif
What can I add to this script to ensure that if the PENALTY calculates to less than $10, that amount is not entered into PENALTY but $10 is.
Thanks,
Ray
PenaltyInterest-1-.pdf
ASKER
Thanks leakim971. I tried both your suggested scripts and neither worked.
I have attached a Word document that show the Adobe error info. If you have other script ideas after seeing the error message, please repost and I will try them.
Thanks again.
ScriptErrors.docx
I have attached a Word document that show the Adobe error info. If you have other script ideas after seeing the error message, please repost and I will try them.
Thanks again.
ScriptErrors.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This script did it. I had to change the && to just one & and had to enter an open parenthesis in line three. I ran it with those changes and it worled. Thanks to leakim971 for this solution.
Open in new window
or this :Open in new window