fixed invoice subtotal calculation failure