Magento2 - admin price input's are rounding value to 2 decimals

by Raul Sanchez   Last Updated July 12, 2019 13:09 PM - source

This is a Magento CE 2.3.2 project

In this project we need to work with 4 decimals for prices. We have tried this which works fine, all prices are printed with 4 decimals in frontend, calculations are fine, and values are registered with 4 decimals in database tables when updating data through import/export functionality, or saving a product in admin, if we enter 4 decimal values

We have only 1 problem, but a big problem. In admin, in product edit page the html price input's are showing the value rounded to 2 decimals. So if we have a product with a price 1000.9555 €, if some admin user changes just one single letter in product's description then the rounded price value which is shown in the input (1000.96) is sent to form & saved, overwriting it to 1000.9600 in database

We have spent some days trying to find which template / js is responsible to print that form element, with no success. Any tips?

Related Questions

Magento 2: Round up foreign currency. How to do it?

Updated March 02, 2017 07:09 AM

Magento 2 - rounding issues with voucher discount applied

Updated September 24, 2018 15:09 PM

Magento 1.9 Rounding Issue Tax Calculation

Updated August 02, 2017 23:09 PM

Fill fileds on the basis of Other Filed Value

Updated January 02, 2019 22:09 PM

Magento 2 add modal popup customer edit adminhtml

Updated March 28, 2017 11:09 AM