2 Replies Latest reply on Jan 8, 2011 4:33 PM by SophiaM.

    Complex taxes calculation scripts

    SophiaM. Level 1

      This is very simple therefore very frustrating that it's not working!

       

      1. I have a "subtotal" field which is the sum of 6 field. That works fine.

       

      2. I have a first "gst" tax of 5% field coded as:

       

       

       

      var f = this.getField(“subtotal”);

      event.value = f.value * 0.05;

       

      There's no error, but it doesn't work. The value in that field remains 0.

       

      3. I also have a second "qst" tax 7.5% that is more complex.

      The 7.5% is on the sum of the "subtotal" and the "gst", coded as:

       

       

      var f = this.getField(“subtotal”) + this.getField(“gst”);

      event.value = f.value * 0.075;

       

       

      (Now I'm not sure about that one) I didn't get a error warning but it doesn't work either.

       

      The value in that field remains 0.

       

      What seems to wrong in both taxes?