I have done some experimentation and I think I have found the cause of the format mismatch message.
In South Africa, we use the comma as a decimal.
When selecting a number format from the dropdown list (on the 'Format' tab), I naturally choose the last one, nl. 1234,56 (1234 comma 56) applicable to the 'price' field, the 'quantity' field, as well as the calculated 'total' field.
The 'price' field is pre filled in and read-only.
But, and this is pivotal, when entering the price in the 'Default' line (on the 'Options' tab), one has to enter "1 2 3 4 point 5 6" (i.e. without the spaces).
When exiting the Form Edit mode, the field actually displays 1 2 3 4 comma 5 6.
And voila! no more format mismatch message!
I don't understand why, but it works.
Thank you. Your invoice example worked like a charm. I have no experience in scripting, but I was able to quickly copy, paste and edit using your example.