Merge pull request #662 from pramodn02/MIFOSX-730

Mifosx 730
remove unused warnings, replace toDateMidnight with toDateTimeAtStartOfDay method as recommended by joda time lib.
handled null pointer exceptoin when there is no charges