Form calculation script
I am working on a pdf form of a service report for my team. All is going well and I am now looking at using some java script to assist me with its operation.
On the form are areas for labour, travel and parts costs.
Here’s where it gets a little more complicated:
Currently the form auto calculates the values of labour and travel depending on the number of hours selected from a dropdown box multiplied with a predetermined rate (labour or travel). This is fine for a customer who has no service contract.
We have three variables: A customer has no contract in which case the above works perfectly.
A customer may have a ‘full contract’ in which case they do not pay for any parts, labour or travel. So I need the total boxes to read 0 or ideally “Contract”.
A customer may have a ‘support contract’ in which case they do not pay for any labour or travel. So I need the labour and travel total to read “Contract” but any parts prices to still be applicable.
I am new to the java script world and have seen that there are lots of very clever people out there. After researching the web and many forums I am just looking for advice on the best way to go about this?
The contract type is automatically populated from a merge from our CRM. The options being (None, Full or Support)
Thank you for any advice you can offer - Daniel
