if params['sort']
        sort = case params['sort']
        when "date"  then "created_on"
        when "note"   then "note"
        when "amount" then "amount"