Bug 5490: qty_done is not updated correctly when partial invoice is voided. Fixed...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 24 Sep 2021 15:32:43 +0000 (17:32 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 24 Sep 2021 15:32:43 +0000 (17:32 +0200)
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']);
                                }
                        }
                }