Bug fixes for invoice/inventory functionality.