The average material cost test for either qoh > 0 and qoh + qty > 0 has changed to...
[fa-stable.git] / sales / customer_invoice.php
index 7b05aa2de784e518dad8dae46acb29fcd17b57ea..e6ded2d3a4e025315f2adc6241c7c53145d0cf6d 100644 (file)
@@ -203,11 +203,9 @@ function check_quantities()
                                $min = $itm->qty_done;
                                $max = $itm->quantity;
                        } else {
-                               global $path_to_root;
                                $min = 0;
                                // Fixing floating point problem in PHP.
-                               include_once($path_to_root . "/inventory/includes/db/items_units_db.inc"); 
-                               $max = round2($itm->quantity - $itm->qty_done, get_unit_dec($itm->stock_id));
+                               $max = round2($itm->quantity - $itm->qty_done, get_qty_dec($itm->stock_id));
                        }
                        if (check_num('Line'.$line_no, $min, $max)) {
                                $_SESSION['Items']->line_items[$line_no]->qty_dispatched =