Thread:Mhommer/@comment-15636815-20150330193908/@comment-15636815-20150401051310

Fixed.

The quickest and easiest way to install "qty" was to assume it would be present 100% of the time, and therefore to multiply all numbers supplied to cost by "qty". When the user does not supply "qty", the template assigns it a default value of 1, then multiplies.

Previously, Cost didn't care about commas because it wasn't calculating with its input; the numbers were for display only. Once I forced it to calculate, it always expected numbers without formatting, which meant that any formatted input made the thing explode.

The fix was to use  to unformat all input before attempting maths. It's happy now. I'm just glad that turned out to be relatively simple. I remembered reading something about something needing unformatted numbers sometimes, but I'd never encountered the situation before, and I didn't really understand it. Now I understand it completely. :P