sort by invoice number and other minor changes