5 Replies Latest reply on Apr 2, 2013 11:51 PM by Ivaja

    Help!  Trying to calculate tax on only taxable items

    catebrownphoto Level 1

      Hi everyone,

       

      I have a working invoice that incorporates the following code to calculate tax on a subtotal:

       

      var f = this.getField("Subtotal");

      event.value = Math.round(f.value * 7) / 100;

       

       

      It's been working just fine but I would like to modify my invoice to only calculate the tax for taxable items.  Trying to save myself some time and effort since I am frequently putting in items for both taxable and nontaxable amounts on my invoices, and I don't need tax for the entire subtotal, just for taxable items.  Should I use some "if" code involving radio buttons to indicate taxable items?  Like, if Amount1 and Amount2 are taxable, calculate tax, and then add for total tax value.

       

      Any help would be greatly appreciated!  I really have little to no javascript experience or any idea how to code it.

       

      Thanks so much for any help.

       

      Working in Acrobat 9 Pro on Mac