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