diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 8372a728cd2..d849496d965 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -760,7 +760,7 @@ if (! $error && $action == 'writebookkeeping') { } } - if (price2num($totaldebit) != price2num($totalcredit)) + if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')) { $error++; $errorforline++; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 1fbed52b9e3..29131274c7a 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -355,7 +355,7 @@ if ($action == 'writebookkeeping') { } // Protection against a bug on line before - if (price2num($totaldebit) != price2num($totalcredit)) + if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')) { $error++; $errorforline++; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 4d4368ede62..c7fb4c06304 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -513,7 +513,7 @@ if ($action == 'writebookkeeping') { } // Protection against a bug on lines before - if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit))) + if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))) { $error++; $errorforline++; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 6043d2bf857..878270d3687 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -471,7 +471,7 @@ if ($action == 'writebookkeeping') { } // Protection against a bug on lines before - if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit))) + if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))) { $error++; $errorforline++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index add951feb16..c9b8d2c5702 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7857,12 +7857,11 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0) } else // $mode=0 { - $textcrit = ''; $tmpcrits = explode('|', $crit); $i3 = 0; foreach ($tmpcrits as $tmpcrit) { - if (empty($tmpcrit)) continue; + if ($tmpcrit !== '0' && empty($tmpcrit)) continue; $newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : ''); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 2988de62476..252c3e214fa 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -36,6 +36,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';