CRM-16189 Renamed param
authorEdsel <edsel.lopez@jmaconsulting.biz>
Wed, 20 Jul 2016 07:56:10 +0000 (13:26 +0530)
committerEdsel <edsel.lopez@jmaconsulting.biz>
Wed, 20 Jul 2016 07:56:10 +0000 (13:26 +0530)
----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
  https://issues.civicrm.org/jira/browse/CRM-16189

CRM/Contribute/BAO/Contribution.php

index a1e2601b82308d4f3fd8a50d84257a50078669c3..aaba9508c2cda0965d6203b763bb6858219e7abd 100644 (file)
@@ -4816,10 +4816,10 @@ LIMIT 1;";
    *
    * @param array $lineItems
    * @param array $contributions
-   * @param array $previousContributionId
+   * @param array $contributionStatusId
    *
    */
-  public static function addPayments($lineItems, $contributions, $previousContributionId = NULL) {
+  public static function addPayments($lineItems, $contributions, $contributionStatusId = NULL) {
     // get financial trxn which is a payment
     $ftSql = "SELECT ft.id, ft.total_amount
       FROM civicrm_financial_trxn ft
@@ -4834,7 +4834,7 @@ LIMIT 1;";
     ));
     foreach ($contributions as $k => $contribution) {
       if (!($contributionStatus[$contribution->contribution_status_id] == 'Partially paid'
-        || CRM_Utils_Array::value($previousContributionId, $contributionStatus) == 'Partially paid')
+        || CRM_Utils_Array::value($contributionStatusId, $contributionStatus) == 'Partially paid')
       ) {
         continue;
       }