i'm currently working on a PS 1.6 shop which uses advanced stock management.
Here is the issue we're in trouble with :
- an order has 1 product (let's say with 1 quantity) which has negative stock (real quantity)
- when this order is shipped, the product stock (let's say -10) goes from +1 instead of -1 (in this case from -10 to -9 instead of -11)...
I've tried several ways to correct like
if(StockAvailable::dependsOnStock($product['id_product'], (int)$order->id_shop)) {
StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop);
}
but nothing changed... In ps_stock_available, quantity is not good (and I don't want to correct it by a simple SQL request which could have massive side effects)
Has someone ever experienced this ?
Thanks in advance ;)