Bug 5490: qty_done is not updated correctly when partial invoice is voided. Fixed...
[fa-stable.git] / sales / includes / db / sales_invoice_db.inc
index cbafbccc9ef021064ace89e79f183888db6e85c6..ccbcc0eb032dd7c7adeeaa00bdada22ed4ea3c88 100644 (file)
@@ -259,7 +259,7 @@ function void_sales_invoice($type, $type_no)
                        {
                                $srcdetails = get_sales_parent_lines($type, $type_no);
                                while ($row = db_fetch($srcdetails)) {
-                                       update_parent_line($type, $row['id'], -$row['quantity']);
+                                       update_parent_line($type, $row['id'], -$row['qty_done']);
                                }
                        }
                }