Merge pull request #19225 from colemanw/select2Tweak
[civicrm-core.git] / CRM / Core / BAO / FinancialTrxn.php
index f3c242da19f318724f959037693f25d16d900094..0e1499e208094dd118e7f9b75f941184351aa402 100644 (file)
@@ -415,9 +415,9 @@ WHERE ceft.entity_id = %1";
     $fItemParams
       = [
         'financial_account_id' => $financialAccount,
-        'contact_id' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain', CRM_Core_Config::domainID(), 'contact_id'),
+        'contact_id' => CRM_Core_BAO_Domain::getDomain()->contact_id,
         'created_date' => date('YmdHis'),
-        'transaction_date' => date('YmdHis'),
+        'transaction_date' => $params['trxnParams']['trxn_date'],
         'amount' => $amount,
         'description' => 'Fee',
         'status_id' => CRM_Core_PseudoConstant::getKey('CRM_Financial_BAO_FinancialItem', 'status_id', 'Paid'),