2
0
forked from Wavyzz/dolibarr

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

Conflicts:
	htdocs/admin/tools/listevents.php
	htdocs/commande/class/commande.class.php
	htdocs/core/lib/functions.lib.php
	htdocs/expensereport/card.php
	htdocs/exports/export.php
This commit is contained in:
Laurent Destailleur
2020-01-19 19:01:46 +01:00
6 changed files with 28 additions and 14 deletions

View File

@@ -959,6 +959,7 @@ class Commande extends CommonOrder
if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER)
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
dol_print_error($this->db);
}
$this->db->rollback();
@@ -1434,6 +1435,7 @@ class Commande extends CommonOrder
{
$langs->load("errors");
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
$this->errors[] = $this->error;
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
$this->db->rollback();
return self::STOCK_NOT_ENOUGH_FOR_ORDER;
@@ -3083,6 +3085,7 @@ class Commande extends CommonOrder
{
$langs->load("errors");
$this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
$this->errors[] = $this->error;
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
$this->db->rollback();
return self::STOCK_NOT_ENOUGH_FOR_ORDER;