semexpert / module-fix-sales-decimals
Backports fixes from Magento 2.3 to the decimal qty handling in sales module.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ~7.0.13|~7.1.0
- magento/framework: ~101.0
- magento/module-sales: ^101.0
Requires (Dev)
- phpunit/phpunit: ^7.3
This package is auto-updated.
Last update: 2025-06-24 12:17:52 UTC
README
This module implements the fix from magento/magento2#14346 and is meant to be used with Magento 2.2.x
References
- Issue #14328 - Qty to ship and Qty to invoice are handling decimals poorly
- PR #14346 - Fixed decimal handling in order quantities
Getting Started
Prerequisitos
The module requires a completely installed and functional copy of Magento 2.2
Installation
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
Running the tests
All the included tests can be run from the Magento CLI. Refer to the documentation.
Included tests
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.
Coding Styles
All the provided code follows the Magento 2 coding standard.
Deployment
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.
Magento 2
Components
2 plugins are provided. One for Magento\Sales\Order\Item::getSimpleQtyToShip()
and one for
Magento\Sales\Order\Item::getQtyToInvoice()
Versioning
We use SemVer for versioning. To see all available versions, check the tags for this repository.
Autores
- MatÃas Montes - Original core fix and initial version of this module - barbazul
Also check the list of contributors who collaborated in this project.
License
This module is licensed under the MIT License.