From f54d9ae7c8e9e7257fdab1086fb675e660b64207 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 17 May 2017 06:53:52 +0530 Subject: [PATCH] --CRM-20585, fixed financial trxn entry for deferred revenue --- CRM/Core/BAO/FinancialTrxn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/FinancialTrxn.php b/CRM/Core/BAO/FinancialTrxn.php index 31e04c38d3d0..d09ac055180b 100644 --- a/CRM/Core/BAO/FinancialTrxn.php +++ b/CRM/Core/BAO/FinancialTrxn.php @@ -685,10 +685,10 @@ public static function createDeferredTrxn($lineItems, $contributionDetails, $upd } foreach ($results['values'] as $result) { if ($result['account_relationship'] == $accountRel) { - $trxnParams['to_financial_account_id'] = $result['financial_account_id']; + $trxnParams['from_financial_account_id'] = $result['financial_account_id']; } else { - $trxnParams['from_financial_account_id'] = $result['financial_account_id']; + $trxnParams['to_financial_account_id'] = $result['financial_account_id']; } } foreach ($deferredRevenue['revenue'] as $revenue) {