This module implements the fix from magento/magento2#14346 and is meant to be used with Magento 2.2.x
- Issue #14328 - Qty to ship and Qty to invoice are handling decimals poorly
- PR #14346 - Fixed decimal handling in order quantities
The module requires a completely installed and functional copy of Magento 2.2
Add the module as a dependency to your Magento project
Edit composer.json
{
"require": {
"semexpert/module-fix-sales-decimals": "1.0.0"
}
}
then
php composer.phar install
or with composer require
php composer.phar require semexpert/module-fix-sales-decimals
After installing the package, you need to enable the module from Magento CLI
php bin/magento module:enable SemExpert_FixSalesDecimals
All the included tests can be run from the Magento CLI. Refer to the documentation.
The same tets that were included in the original Pull Request are provided but as integration tests.
There are additional unit tests specific for the plugin funcionality.
All the provided code follows the Magento 2 coding standard.
This module should not be used in Magento 2.3+ as the referenced fixes have already been applied. This is reflected on the version dependencies so you will need to explicitly remove it to upgrade Magento.
php composer.phar remove semexpert/module-fix-sales-decimals
You should also consider removing it if the fix ever makes it into Magento 2.2.
2 plugins are provided. One for Magento\Sales\Order\Item::getSimpleQtyToShip()
and one for
Magento\Sales\Order\Item::getQtyToInvoice()
We use SemVer for versioning. To see all available versions, check the tags for this repository.
- Matías Montes - Original core fix and initial version of this module - barbazul
Also check the list of contributors who collaborated in this project.
This module is licensed under the MIT License.