Hello All,
I am designing a sales worksheet and just not getting the the simple calculation steps I have read in help to work??
What I have is a form using numeric field boxes for each line. What I am trying to do is add multiple numbers together, subtotal them, and calculate two taxes gst of 5% & pst of 5% on the subtotal ( the two taxes go into seperate fields) then provide a total. From there I need to add liens and subtract rebates and deposits.Can this be done in the livecylcle designer using the value tab under the object? if So can someone walk me through it?
I understand how the calculation should work, but need help on how and where to put the information in the field boxes for the calculations. The calculations required are represented as follows:
Purchase Price - Trade = Difference
Difference + Admin = Subtotal
Subtotal x 5% = GST
Subtotal x 5% = PST
Subtotal + GST + PST = Subtotal2
Subtotal2 + Lien - Rebates - Deposit = Balance Due
Is there a simpler way I am missing? I am a rookie with this and just not getting it.
Thanks for your help.
Click on the textfield which shows the GST, from the top EVENTS drop down choose the calculate event.
Now go to Window > Script Editor --- this will open a small script window above you design pane.Since you have selected the calculate event for the GST field, you will see a permanent grey text in the script window, telling you which field and event you are applying the script to.
Then draft the script as follows ::
//this calculates GST value and places that in the GST textfield.
GST.rawValue = (((PurchasePrice.rawValue-Trade.rawvalue)+Admin.rawValue) *5)/100
similarly you can do the rest.
*rawValue is used to pick the value of field.
*Calculate event will ensure that the GST field constantly scans the other fields and changes its value according to any change in them.
~~ S I D ~~