Changes related to trxn_date
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Mon, 4 May 2015 10:35:05 +0000 (16:05 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Mon, 4 May 2015 10:35:05 +0000 (16:05 +0530)
CRM/Contribute/BAO/Contribution.php

index 127b17871f68b97cf016935e43a428864d04e6c8..062d8ab24faacd4a1179bf5edc801e9cb2e45bdf 100644 (file)
@@ -2725,7 +2725,7 @@ WHERE  contribution_id = %1 ";
         $balanceTrxnParams['total_amount'] = $partialAmtTotal;
         $balanceTrxnParams['to_financial_account_id'] = $toFinancialAccount;
         $balanceTrxnParams['contribution_id'] = $params['contribution']->id;
-        $balanceTrxnParams['trxn_date'] = !empty($params['contribution']->receipt_date) ? $params['contribution']->receipt_date : date('YmdHis');
+        $balanceTrxnParams['trxn_date'] = !empty($params['contribution']->receive_date) ? $params['contribution']->receive_date : date('YmdHis');
         $balanceTrxnParams['fee_amount'] = CRM_Utils_Array::value('fee_amount', $params);
         $balanceTrxnParams['net_amount'] = CRM_Utils_Array::value('net_amount', $params);
         $balanceTrxnParams['currency'] = $params['contribution']->currency;
@@ -2778,7 +2778,7 @@ WHERE  contribution_id = %1 ";
       $trxnParams = array(
         'contribution_id' => $params['contribution']->id,
         'to_financial_account_id' => $params['to_financial_account_id'],
-        'trxn_date' => !empty($params['contribution']->receipt_date) ? $params['contribution']->receipt_date : date('YmdHis'),
+        'trxn_date' => !empty($params['contribution']->receive_date) ? $params['contribution']->receive_date : date('YmdHis'),
         'total_amount' => $totalAmount,
         'fee_amount' => CRM_Utils_Array::value('fee_amount', $params),
         'net_amount' => CRM_Utils_Array::value('net_amount', $params, $totalAmount),