Fix defect that causes duplicate Period Items on save.
When a new line is added to an invoice scroll the form so that the new line is away from the bottom of the page.  This allows the SalesItem selection drop down to be seen.
When switching between view and edit mode and when filtering the Period view the sort order of the period items, by category and sales item name, should be maintained