delocalize total amount before passing to setOverrideTotal
authorJon Goldberg <jon@megaphonetech.com>
Thu, 12 Aug 2021 21:55:57 +0000 (17:55 -0400)
committerJon Goldberg <jon@megaphonetech.com>
Thu, 12 Aug 2021 21:55:57 +0000 (17:55 -0400)
CRM/Contribute/Form/Contribution.php

index 3c12c603400a63795c7da1ab42eb72ea2e0d3310..748fd6cfdd44ae1db24a226604dc5c575d6251b7 100644 (file)
@@ -921,7 +921,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $order = new CRM_Financial_BAO_Order();
     $order->setPriceSelectionFromUnfilteredInput($fields);
     if (isset($fields['total_amount'])) {
-      $order->setOverrideTotalAmount((float) $fields['total_amount']);
+      $order->setOverrideTotalAmount((float) CRM_Utils_Rule::cleanMoney($fields['total_amount']));
     }
     $lineItems = $order->getLineItems();
     try {