diff --git a/ajax/convertWithSign.php b/ajax/convertWithSign.php index 16c2a3f8a11c4745f14566d6e90a2ae0e04a7525..f7bb2e643abf445b13120af0f526195d4ee4f5fc 100644 --- a/ajax/convertWithSign.php +++ b/ajax/convertWithSign.php @@ -10,6 +10,8 @@ * @return array */ +use QUI\ERP\Currency\Handler; + QUI::$Ajax->registerFunction( 'package_quiqqer_currency_ajax_convertWithSign', function ($data) { @@ -27,7 +29,10 @@ function ($data) { $exploded = explode('.', $numberAsString); $numberOfDecimalPlaces = isset($exploded[1]) ? strlen($exploded[1]) : 0; - if ($numberOfDecimalPlaces > 4) { + if ( + Handler::getCurrency($currencyTo)->getCurrencyType() !== Handler::CURRENCY_TYPE_DEFAULT + && $numberOfDecimalPlaces > 4 + ) { $CurrencyTo = QUI\ERP\Currency\Handler::getCurrency($currencyTo); $priceRounded = round($converted, 4);