Skip to content

Invoice for products that use qty decimal rounds down to whole number #11941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ralbin opened this issue Nov 1, 2017 · 5 comments
Closed

Invoice for products that use qty decimal rounds down to whole number #11941

ralbin opened this issue Nov 1, 2017 · 5 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@ralbin
Copy link
Contributor

ralbin commented Nov 1, 2017

This is a new issue in Magento 2.2.0. This feature works as expected in all previous versions. Use check/money order for payment. When trying to invoice an order that has products with quantity decimals, the invoice rounds down to the nearest whole number. Example, ordered 6.5 of a product but the invoice uses 6. The ultimate reason this is not working is in the table sales_order_item column is_qty_decimal is not being set to 1.

Preconditions

  1. Magento ver. 2.2.0
  2. PHP 7.0.24
  3. MySQL 5.7

Steps to reproduce

  1. Create a virtual product
  2. In Advanced Inventory Qty Uses Decimals = Yes
  3. In Advanced Inventory Manage Stock = No
  4. In the admin create an order using the new product and pay with check/money order
  5. Purchase a quantity of 6.5 of the product and complete the order
  6. Start to create the invoice look at the QTY invoiced it will be rounded down to 6
  7. If you set the flag $_canCapturePartial you are able to edit the field, however it resets back to 6
  8. Look at the database table sales_order_item and notice that the column is_qty_decimal is set to 0.

Expected result

  1. Invoice should automatically use the QTY ordered such as 6.5
  2. Ability to edit of a quantity similar to 5.5
  3. Button to update the invoice to show the changes if modified from the original
  4. Review the database table sales_order_item and column is_qty_decimal = 1

Actual result

  1. Quantity is rounded down to the nearest whole number and unable to edit the qty to be invoiced
  2. Inspecting the database sales_order_item I noticed that is_qty_decimal was set to 0, changing that to 1 made the invoice show 6.5 for the quantity.
  3. Ability to edit a check/money order quantity should be available by default, rather than having to do a new module that sets the flag $_canCapturePartial = true;
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Nov 1, 2017
@magento-engcom-team
Copy link
Contributor

@ralbin, thank you for your report.
We've created internal ticket(s) MAGETWO-83167 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Nov 2, 2017
@nmalevanec nmalevanec self-assigned this Nov 2, 2017
@okorshenko
Copy link
Contributor

Fixed in 2.2-develop

@okorshenko okorshenko added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Dec 1, 2017
@magento-engcom-team
Copy link
Contributor

Hi @ralbin. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1289 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 27, 2018
@Jilco
Copy link

Jilco commented Oct 30, 2019

Problem is back in 2.3.3! Never had the problem, but after upgrade from 2.3.2 to 2.3.3 it was there...

@niekappartmedia
Copy link

Problem still exists in 2.4.3-p1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants