Jump to content
thirty bees forum

Bug in stock to add product in backoffice


mauroagr

Recommended Posts

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

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...