Added period balance to query hours
Merge branch 'gh9'