--CRM-16189, updated hook to provide more information
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 22 Jul 2016 14:22:40 +0000 (19:52 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Fri, 22 Jul 2016 14:22:40 +0000 (19:52 +0530)
CRM/Core/BAO/FinancialTrxn.php
CRM/Utils/Hook.php

index ab589e78444660ca24e218fb114e40bacd291f37..c3f63490c881f17bfff2ed8c8982a4d6720d9dee 100644 (file)
@@ -670,7 +670,7 @@ WHERE pp.participant_id = {$entityId} AND ft.to_financial_account_id != {$toFina
       }
       $accountRel = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Income Account is' "));
 
-      CRM_Utils_Hook::alterDeferredRevenueItems($deferredRevenues);
+      CRM_Utils_Hook::alterDeferredRevenueItems($deferredRevenues, $contributionDetails, $update, $context);
 
       foreach ($deferredRevenues as $key => $deferredRevenue) {
         $results = civicrm_api3('EntityFinancialAccount', 'get', array(
index e52af4e30b733f1802b0a4b964b384ce365b67a8..34ebf8011963bb57e1c18ef97ff60bcb4bc3faf6 100644 (file)
@@ -2100,12 +2100,17 @@ abstract class CRM_Utils_Hook {
    *
    * @param array $deferredRevenues
    *
+   * @param array $contributionDetails
+   *
+   * @param bool $update
+   *
+   * @param string $context
+   *
    * @return mixed
    */
-  public static function alterDeferredRevenueItems(&$deferredRevenues) {
-    return self::singleton()->invoke(1, $deferredRevenues, self::$_nullObject,
-      self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject,
-      'civicrm_alterDeferredRevenueItems'
+  public static function alterDeferredRevenueItems(&$deferredRevenues, $contributionDetails, $update, $context) {
+    return self::singleton()->invoke(4, $deferredRevenues, $contributionDetails, $update, $context,
+      self::$_nullObject, self::$_nullObject, 'civicrm_alterDeferredRevenueItems'
     );
   }