Topic: Partial Delivery - insufficient quantity - Bug?
I have a customer order for 10 items, and I have 2 in stock. When I try to deliver the 2 and Place Delivery, I get an error that there isn't enough quantity in stock.
Tracing through the code, I found in customer_delivery.inc it checks $_SESSION['items']->check_qoh which ultimately calls check_negative_stock (cart_class.inc).
For the quantity for check_negative_stock (line 568) it uses $line_item->quantity. I suggest it should be using $line_item->qty_dispatched. This way it is checking for the amount I am trying to deliver, rather than the amount that is not yet delivered.
Have I understood the variables correctly? Also, are there any side effects from making this change that I may not be aware of?