Skip to content

Commit

Permalink
CIVIMM-213: Revert PR #202
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Nov 8, 2024
1 parent e249cfa commit e20c5a4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions CRM/Financeextras/BAO/CreditNoteAllocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ private static function createPayment($account, $paymentParams) {
$params['line_item'] = ContributionUtils::allocatePaymentToLineItem($params['total_amount'], $params['contribution_id']);
}

self::preventExtendingMembershipEndDate();
$transaction = \CRM_Financial_BAO_Payment::create($params);

// The Payment API typically uses the "Accounts Receivable" as the "from" account
Expand Down Expand Up @@ -300,14 +299,4 @@ private static function isContributionStatus($contributionId, $status) {
->first());
}

private static function preventExtendingMembershipEndDate() {
$manager = \CRM_Extension_System::singleton()->getManager();
if ($manager->getStatus('uk.co.compucorp.membershipextras') !== \CRM_Extension_Manager::STATUS_INSTALLED) {
return;
}

// This is to prevent the membershipextras extension from extending the membership date.
Civi::$statics['uk.co.compucorp.membershipextras']['paymentApiCalled'] = TRUE;
}

}

0 comments on commit e20c5a4

Please sign in to comment.