HomeIn-Portal Phabricator

Fixes #0000811: Move grid total function definition to grid