Fix setAmount to set the right amount on payment propertybag
authorMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 5 Jun 2020 09:19:44 +0000 (10:19 +0100)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 5 Jun 2020 09:24:54 +0000 (10:24 +0100)
Civi/Payment/PropertyBag.php

index 3fc564183fdd2aa6b83dd3f1cede4d634a44e9a4..e2e2cdd4abb2101d413ef8702d444fb8f69c13b5 100644 (file)
@@ -388,7 +388,7 @@ class PropertyBag implements \ArrayAccess {
       throw new \InvalidArgumentException("setAmount requires a numeric amount value");
     }
 
-    return $this->set('amount', CRM_Utils_Money::format($value, NULL, NULL, TRUE), $label);
+    return $this->set('amount', $label, \CRM_Utils_Money::format($value, NULL, NULL, TRUE));
   }
 
   /**