This fixes #7033.  It is now correctly getting the total and maxDecimals.
A style tweak for bug #7674.
Style fix for bug #7469.