From: Pradeep Nayak Date: Thu, 11 Aug 2016 03:24:58 +0000 (+0530) Subject: CRM-16189, added code to create transaction for participant X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=594790e0a924731979b70bd18f0057247a903c58;p=civicrm-core.git 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 --- 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