Squashed commit of the following:

commit 11a39e6c518b0f6faf54d2430995f9b982dfd181
Author: sdm86 <sdm86@cornell.edu>
Date:   Thu Jul 17 11:00:56 2014 -0400

    code cleanup, SQL refactoring

commit 78ad44ac19b292d966125dddae4b0befca64b48a
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 16 16:14:15 2014 -0400

    optimization of SQL to use fiscal year

commit 48543950f6ad494c7120f31ef7dbce33a3864655
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 16 13:45:38 2014 -0400

    comment and code cleanup

commit f806a28557bd804543f4781a767a177616e28d68
Merge: 625f963 869e774
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 16 13:15:43 2014 -0400

    Merge branch 'kfs-5.2.1' of https://github.com/CU-CommunityApps/cu-kfs into KFSUPGRADE-981

commit 625f96369df64ffcafd294450f7f674ab6991956
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 16 12:25:09 2014 -0400

    checking this in

commit 0f8258ae8eb0e7bd0cc0b68311e1ccb51df21af2
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 16 12:22:41 2014 -0400

    modified sql

commit 47ee4681bf943ac5e0722fd05befb375441b2313
Author: sdm86 <sdm86@cornell.edu>
Date:   Tue Jul 15 10:15:28 2014 -0400

    initial implementation of gl_entry_stats_t table

commit a2de3c47522bd9c34523c2c55861ac6aa34cb171
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 2 12:51:29 2014 -0400

    doing this so I can switch back to master, not sure how this will go

commit 52f00379ff7eb2436c27c0bb573b7722020589be
Author: sdm86 <sdm86@cornell.edu>
Date:   Wed Jul 2 12:36:32 2014 -0400

    creation of custom batch sql

final commit for KFSUPGRADE-981