CRM-14951: no of terms should be calculated on contribution id rather than entity...