From 594790e0a924731979b70bd18f0057247a903c58 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 11 Aug 2016 08:54:58 +0530 Subject: [PATCH] CRM-16189, added code to create transaction for participant ---------------------------------------- * CRM-16189: Improve support for Accrual Method bookkeeping https://issues.civicrm.org/jira/browse/CRM-16189 --- CRM/Member/BAO/Membership.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 1805b76426..3ed18e20aa 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -340,6 +340,10 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership { if (!empty($params['line_item']) && empty($ids['contribution'])) { CRM_Price_BAO_LineItem::processPriceSet($membership->id, $params['line_item'], CRM_Utils_Array::value('contribution', $params)); + if (!empty($params['contribution'])) { + $trxnParams['contribution'] = $params['contribution']; + CRM_Contribute_BAO_Contribution::recordAlwaysAccountsReceivable($trxnParams, 'Membership'); + } } //insert payment record for this membership -- 2.25.1