Open senff opened 3 years ago
Reported in 4421567-zen
In response to the "Actual behavior" section where @senff states "I believe it should not be possible to add products with a negative quantity to begin with.", my thought here is that you should consider woocommerce as the central component of a rich and diverse ecosystem of integrations with various 3rd party for things like ERP, accounting, and inventory control. We currently use this negative qty line item approach to handle RMAs and product exchanges with 3rd party inventory control and accounting products that do successfully pull this data in and make proper use of it. Since woocommerce already functions properly in every other regard with orders that have negative qty line items, we simply need the update button to function to record changes to order details such as status, shipping address, etc.
Hi @senff
Thank you for taking the time to report this bug, we really appreciate your help. I can reproduce it on my end.
If I edit the product quantity in an existing order and press update I get a warning
If I edit the product quantity in an existing order and press save and then press update I get the console message
An invalid form control with name='order_item_qty[43]' is not focusable.
Priority of this issue will be assigned shortly after we'd go through a round of prioritization. Please note it may take a couple of days.
As far as what the expected behaviour is, this requires further feedback from the WooCommerce Core team. I am adding the needs developer feedback
label to this issue so that the Core team could take a look.
Please note it may take a few days for them to get to this issue. Thank you for your patience.
Feels like the inconsistency highlighted in Tam's screenshots definitely ought to be resolved.
If you are shopping for use-cases, I can say that it would be extremely handy to be able to add order line items with negative quantities via the back end for certain customer service use cases.
A Woo shop I manage that has multiple sales channels in addition to Woo, but funnels all revenue and inventory accounting through Woo integrations with back end accounting and inventory management needs a simple way to reconcile situations involving mis-shipments and damaged shipments that require a transaction that can put items back into inventory as well as subtract from revenue already recognized. It’s not a refund because the original sale did not happen on the Woo shop. But creating a negative sale would be a simple transaction that experienced Woo shop managers could easily and quickly create that would solve all the bookkeeping issues in one go.
Describe the bug When editing an order in the backend, it is possible to add a product with a negative quantity. However, after that, the Update button does not work anymore. Error in console: "_An invalid form control with name 'order_itemqty[2767] is not focusable."
Expected behavior Either it should be made impossible to add a product with a negative quantity, OR the Update button should work again after that.
Actual behavior I believe it should not be possible to add products with a negative quantity to begin with.
Steps to reproduce the bug (We need to be able to reproduce the bug in order to fix it.) Steps to reproduce the bug:
Screenshots https://d.pr/i/4zDXYS
Isolating the problem (mark completed items with an [x]):