Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIWEMB-320: User can optionally record payment for new membership #58

Conversation

olayiwola-compucorp
Copy link
Contributor

Overview

The change introduced in this PR makes the recording of payment for associated contributions during new membership registration for a contact optional. The contribution status field has also been removed from the user interface (UI).

Before

Previously, users had the ability to change the membership contribution status from the UI, as the contribution was directly linked to the payment.

Before

After

Now, users can use the Record Payment checkbox to decide whether to record a payment or not when creating a new membership registration.

After

When the checkbox is unchecked and no payment will be recorded, and the associated contribution will have no payment linked to it, resulting in a "pending" status.

Payment Not Recorded

Simultaneously, the membership registration itself will also have a "Pending" status.

Membership Pending

Technical Details

The majority of the changes are related to the visual aspect, with minimal modifications made to the core logic. The alterations are primarily implemented through JavaScript, where payment-related fields are grouped together.

(function() {
setTotalAmount();
togglePaymentBlock();
toggleMembershipType();
toggleContributionBlock();
placePaymentFieldsTogether();
hidePaymentFieldsOnPaymentToggler();
})();

return;
}

if (!empty($this->fields['payment_plan_schedule'])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should instead check on this field contribution_type_toggle if it is value != 'payment_plan'

@olayiwola-compucorp olayiwola-compucorp merged commit 0a4461b into CIWEMB-15-contribution-workstream Jul 28, 2023
1 of 2 checks passed
@olayiwola-compucorp olayiwola-compucorp deleted the CIWEMB-320-membership-new branch July 28, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants