--CRM-16015, code to update civicrm_line_item.financial_type_id when civicrm_contribu...
authorPradeep Nayak <pradpnayak@gmail.com>
Sat, 14 Mar 2015 20:51:32 +0000 (02:21 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Thu, 19 Mar 2015 09:40:21 +0000 (15:10 +0530)
CRM/Contribute/BAO/Contribution.php

index 5d80490419a6ad15037a568bbc22b65df6eb4c5b..5376860bc893dc7e99212d968a2ec63c7c9aef19 100644 (file)
@@ -3122,6 +3122,13 @@ WHERE  contribution_id = %1 ";
         }
       }
     }
+    if ($context == 'changeFinancialType') {
+      foreach ($params['line_item'] as &$lineItems) {
+        foreach ($lineItems as &$line) {
+          $line['financial_type_id'] = $params['financial_type_id'];
+        }
+      }
+    }
   }
 
   /**