fix margin reports bugs (wrong group by + jquery syntax error)

Conflicts:
	htdocs/margin/customerMargins.php
	htdocs/margin/productMargins.php