compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

BTHA-194: Ensure membeership rate total can be calculated for line item #538

Closed olayiwola-compucorp closed 1 month ago

olayiwola-compucorp commented 1 month ago

Overview

Before this PR we had an issue where when a user ‘record’ a payment against a membership contribution with total computed from membersjhiprate extension, the amount due is shown as the amount attached to the original membership type ‘minimum fee’ (ie, pre calculation from the membership fee calculator).

The event we added here https://github.com/compucorp/uk.co.compucorp.membershipextras/pull/508, requires that contactID be sent, but in the line item create hook, the contact ID was null.

In this PR we have retrieved the set the contact ID from the line item contribution.

Before

The amount due is shown as the amount attached to the original membership type ‘minimum fee. @@@11111111qqq22222222

After

The amount due is shown as the amount calculated by the membership fee calculator. @@11111111qqq22222222