If you search the forum for topic " Invoice sort order is not working properly " it details a discussion and changes from memory. This may explain your query
Found it Invoice sort order is not working properly
Not quite the same but could be related