CIVICRM-230 CRM-17040 Import Contributions using External Ids causes soft credit...
authorJustin Freeman <justin@agileware.com.au>
Tue, 1 Aug 2017 02:19:43 +0000 (12:19 +1000)
committerJustin Freeman <justin@agileware.com.au>
Tue, 1 Aug 2017 02:19:43 +0000 (12:19 +1000)
CRM/Utils/DeprecatedUtils.php

index 934a175d1f9ec6e2eef04b80e75b4c4a4ac02d9c..d720fb1ffec967ededfa2ad1171798816c90e42b 100644 (file)
@@ -484,7 +484,9 @@ function _civicrm_api3_deprecated_check_contact_dedupe($params) {
     if ($field == NULL || $field === '') {
       continue;
     }
-    if (is_array($field)) {
+    // CRM-17040, Considering only primary contact when importing contributions. So contribution inserts into primary contact
+    // instead of soft credit contact.
+    if (is_array($field) && $key != "soft_credit") {
       foreach ($field as $value) {
         $break = FALSE;
         if (is_array($value)) {