8 Replies Latest reply on Jan 6, 2010 10:23 AM by gkaiseril

    Script to calculate the discount amount..

    richardellis Level 1

      Hi, I need a script to calculate the following;


       

       

      Package Weekly Amount = £100

      Package Discount Percentage field = 10%

      Package Discount Weekly Amount = -£10

      Subtotal = £90

       

      The script I have does not work and my knowledge of javascript is limited.

       

      My script:

       

      var a = this.getField("Weekly Amount");
      var b = this.getField("Package Discount");
      event.value = a.value - (a.value * (b.value/100));

       

      Any help with this would be appreciated.