Fix:  [ bug #698 ] Bad calculation of totals of associated documents
Merge pull request #628 from simnandez/3.3

Fix:  [ bug #698 ] Bad calculation of totals of associated documents