From b57cb5b1684ef37a62a70466a789d2594a7292d5 Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 17 Jul 2022 19:58:14 +0200 Subject: [PATCH] Rerun 2. Invoice not converting from DN due to float bug in PHP. items_units_db.inc is already included. --- sales/customer_delivery.php | 2 -- sales/customer_invoice.php | 2 -- 2 files changed, 4 deletions(-) diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index 603ba1d7..c634a94e 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -252,10 +252,8 @@ 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)); } diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 7b05aa2d..35cdc5ba 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -203,10 +203,8 @@ 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)); } if (check_num('Line'.$line_no, $min, $max)) { -- 2.30.2