2 Replies Latest reply on Feb 11, 2013 11:59 AM by GigEmAgs96

    Need calculation script to figure discount value

    GigEmAgs96 Level 1

      First of all, I haven't posted often to these forums, so I'll try to be clear about what I'm looking for, and if I've neglected to include any important information, please bear with me.

       

      I am trying to create a pdf form to be used in my veterinary practice that serves as an invoice.  When it comes to calculating the total amount due on the invoice, I was hoping to be able to include a line for a discount value based on the selection in an adjacent combo box.  The selections would be blank (for no discount), 10%, or 15%.  If the 10% or 15% values are selected, I'd like the field to calculate that discount by multiplying the subtotal by the correct discount percentage.  This discount would be displayed in the field, then the next field down would subtract the discount from the subtotal to give a final amount due.

       

      I assume this will be a matter of a series of "if/then" conditions, but, not being at all familiar with Javascript, I don't know where to begin.  I've tried to cut and paste other scripts I've seen on this forum, but my naivete is showing, as the editor is giving me error messages before I even leave it.

       

      I am using Acrobat Pro, version 9.

       

      Any help would be greatly appreciated.