October 10, 20188 yr I try to add product in backoffice, in a order but when i add the item....they reduct the stock two times. example: stock before add: 10 add in order: 2 expected stock result: 8 result in TB: 6 I solved here in controller/admin/AdminOrderController.php Line 2429 (comment the line): // StockAvailable::updateQuantity($orderDetail->product_id, $orderDetail->product_attribute_id, ($orderDetail->product_quantity * -1), $order->id_shop); Line 2775: Before: // Update product available quantity StockAvailable::updateQuantity($orderDetail->product_id, $orderDetail->product_attribute_id, ($oldQuantity - $orderDetail->product_quantity), $order->id_shop); After: StockAvailable::updateQuantity($orderDetail->product_id, $orderDetail->product_attribute_id, ($oldQuantity - $productQuantity), $order->id_shop); I dont right if this will impact in more places.... Thanks Mauro
October 10, 20188 yr hi interesting found. just to clarify, are you using advance stock management? and is this bug always occurs or just occasionally?
October 10, 20188 yr Author @dosbiner I don't use advanced stock, and i migrate from PS 1.6.0.14 to TB 1.0.7 Thanks Mauro
October 10, 20188 yr Author @traumflug said in Bug in stock to add product in backoffice: Let's track this: https://github.com/thirtybees/thirtybees/issues/622 I put here, in production, to test more the solution and working fine with the sugestions. I think this is important to test and patch, about the impact in stock is big if use admin to make orders or update it. Thanks... Mauro
Create an account or sign in to comment