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
Prestashop 8.x: Incorrect Increase in Physical Quantity when Order Status Changes #36024
Comments
Hello @Sekar33000 , Is your issue similar to #27631 ? Waiting for your feedback. |
According to me, the issues encountered are different: In the problem described in the other post, when an order is placed for a product with zero stock in PrestaShop 1.7.7.8 (and possibly in earlier versions), the system incorrectly changes the quantity of the product in the database. For example, when the order is marked as "shipped" or "refunded", the quantity of the product can become negative or the physical stock can be incorrectly modified. On the other hand, in the problem I'm addressing, when you cancel an order in PrestaShop 8.x and then re-place it in "Awaiting bank transfer payment" or "Awaiting check payment" status, the physical quantity of the product increases incorrectly. While both issues involve incorrect changes in product quantities during order processing, they are caused by different mechanisms. |
Prerequisites
Describe the bug and add attachments
When an order placed in "Awaiting bank transfer or check payment" status is cancelled (status change) and the order is then set to "Awaiting bank transfer payment" or "Awaiting check payment" status in versions 8... (tested on 8.0.5, 8.1.1, and 8.1.5), the system increases the physical quantity. Here's an example of the incorrect behavior:
Initial stock (physical/reserved/available): 15/0/15.
Order status: Awaiting bank transfer payment -> Physical quantity: 15, Reserved quantity: 1, Available: 14.
The order is cancelled -> Physical quantity: 15, Reserved quantity: 0, Available: 15.
The order is set again to "Awaiting bank transfer payment" or "Awaiting check payment" -> Physical quantity: 16, Reserved quantity: 1, Available: 15.
This incorrect behavior is observed in versions 8... of Prestashop and leads to an incorrect increase in the physical quantity reserved when an order is cancelled and modified again to the "Awaiting bank transfer payment" or "Awaiting check payment" status. It's not acceptable for stock levels to increase in this way; if, for example, an employee mistakenly changes the status to cancelled and then reverts to the initial status, the physical quantity will have increased.
Expected behavior
I expected that when an order is cancelled and then set back to the "Awaiting bank transfer payment" or "Awaiting check payment" status in Prestashop 8.x, the system should not increase the physical quantity. Instead, the physical quantity should remain the same as before the cancellation.
Steps to reproduce
PrestaShop version(s) where the bug happened
8.0.0 - 8.1.6
PHP version(s) where the bug happened
7.4
If your bug is related to a module, specify its name and its version
No response
Your company or customer's name goes here (if applicable).
No response
The text was updated successfully, but these errors were encountered: