Some optimizations and simple testing script for BOM_PriceXXX.sql scripts.
Adds testcase for Acct_Balance. Fixes some errors.