Invoice sorting and filename fixes

Solves a subtask of https://github.com/kaspernj/awesome_tasks/issues/144