Fix sales/service_order::prepareInvoice qty

Use case:
We creating invoice and our $qtys array does NOT content ALL visible order items. For that item that not in our list, we have qty value from previous order item in our cycle or undefined $qty variable.

This issue is present in version 1.7.0.2 and 1.8.1.