Skip to content

Commit

Permalink
dev/core#2493 Default to not cleaning money for order.create api
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Apr 7, 2021
1 parent 73a5a9a commit 2c35902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v3/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ function _civicrm_api3_order_create_spec(&$params) {
'name' => 'total_amount',
'title' => 'Total Amount',
];
$params['skipCleanMoney'] = [
'api.default' => TRUE,
'title' => 'Do not attempt to convert money values',
'type' => CRM_Utils_Type::T_BOOLEAN,
];
$params['financial_type_id'] = [
'name' => 'financial_type_id',
'title' => 'Financial Type',
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ public function testCommaSeparatorAmount() {
'receipt_date' => '20080522000000',
'total_amount' => '20,000.00',
'api.Payment.create' => ['total_amount' => '8,000.00'],
'skipCleanMoney' => FALSE,
];

$contribution = $this->callAPISuccess('Order', 'create', $params);
Expand Down

0 comments on commit 2c35902

Please sign in to comment.