APIv4 - Fix contribution create
authorColeman Watts <coleman@civicrm.org>
Wed, 1 Apr 2020 21:26:32 +0000 (17:26 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 1 Apr 2020 21:36:54 +0000 (17:36 -0400)
Civi/Api4/Generic/Traits/DAOActionTrait.php

index b8cb994feb497ed2badaa45986f18740be9cd814..27ad486a9bdb99f783be63d99e822c2748e60950 100644 (file)
@@ -134,6 +134,11 @@ trait DAOActionTrait {
         $item['contact_id'] = $entityId;
       }
 
+      // FIXME: Weird thing the Contribution BAO expects
+      if ($this->getEntityName() == 'Contribution') {
+        $item['skipCleanMoney'] = TRUE;
+      }
+
       if ($this->getCheckPermissions()) {
         $this->checkContactPermissions($baoName, $item);
       }