stopped .writeToRel() from trying to delete joins and update joined records for records with undefined relRecs
tweaked last change to .writeToRel()
debugged sorting of revenue sums in schedule grid view
added error handling for invalid status codes in grid view.