In answer to your question
dmx-on:click=“specialist_total.setValue((specialist_radio.value * specialist_cost).formatNumber(2, “.”, “”))”
But I think I’m asking the wrong question, sorry.
The following is what I am after (I have hidden the Specialist options that were talked about above).
I am sure this makes sense but I cannot get the various fields to calculate.
The ‘Paint & sundries’ at £88 should be added to the ‘Parts’ at £77. I have done this with
- dmx-bind:value="(inp_costs_paint.value + inp_costs_parts.value)"
But it concatenates the figures (‘8877’) rather than adding them together (‘165’).
Then the user should press either ‘VAT’ or ‘Repairer is not VAT registered’ which would then show the VAT figure in the input field next to it.
I thought this might work but doesn’t
- dmx-on:click="((vat_yes_no.value == 138 ? 0.2 : 0) * costs_cont_rep.value).formatNumber(2, “.”, “”)"
(where 138 is the value of the ‘VAT’ field)
and then finally in the ‘Grand total’ field it adds the 165 to the 33 to give 198.00
All very straight forward I am sure but I can’t seem to get it to work.