sorting expense to last date