Skip to content

Commit

Permalink
Merge pull request #19991 from eileenmcnaughton/order
Browse files Browse the repository at this point in the history
dev/core#2493 Default to not cleaning money for order.create api
  • Loading branch information
seamuslee001 authored Apr 26, 2021
2 parents 2ae38c9 + 2c35902 commit 7a6cf3a
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 7a6cf3a

Please sign in to comment.