2
0
forked from Wavyzz/dolibarr

Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2020-02-29 12:52:18 +01:00
6 changed files with 6 additions and 6 deletions

View File

@@ -760,7 +760,7 @@ if (! $error && $action == 'writebookkeeping') {
} }
} }
if (price2num($totaldebit) != price2num($totalcredit)) if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
{ {
$error++; $error++;
$errorforline++; $errorforline++;

View File

@@ -355,7 +355,7 @@ if ($action == 'writebookkeeping') {
} }
// Protection against a bug on line before // Protection against a bug on line before
if (price2num($totaldebit) != price2num($totalcredit)) if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
{ {
$error++; $error++;
$errorforline++; $errorforline++;

View File

@@ -513,7 +513,7 @@ if ($action == 'writebookkeeping') {
} }
// Protection against a bug on lines before // Protection against a bug on lines before
if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit))) if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
{ {
$error++; $error++;
$errorforline++; $errorforline++;

View File

@@ -471,7 +471,7 @@ if ($action == 'writebookkeeping') {
} }
// Protection against a bug on lines before // Protection against a bug on lines before
if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit))) if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
{ {
$error++; $error++;
$errorforline++; $errorforline++;

View File

@@ -7857,12 +7857,11 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
} }
else // $mode=0 else // $mode=0
{ {
$textcrit = '';
$tmpcrits = explode('|', $crit); $tmpcrits = explode('|', $crit);
$i3 = 0; $i3 = 0;
foreach ($tmpcrits as $tmpcrit) foreach ($tmpcrits as $tmpcrit)
{ {
if (empty($tmpcrit)) continue; if ($tmpcrit !== '0' && empty($tmpcrit)) continue;
$newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : ''); $newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '');

View File

@@ -36,6 +36,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.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.'/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.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'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
if (!empty($conf->categorie->enabled)) if (!empty($conf->categorie->enabled))
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';