diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 93612387adb..6f6f9e91867 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1200,7 +1200,8 @@ class CommandeFournisseur extends CommonOrder } if ($result == 0 || $result == -1) { - $this->error="No price found for this quantity. Quantity may be too low ?"; + $langs->load("errors"); + $this->error = "Ref " . $prod->ref . " " . $langs->trans("ErrorQtyTooLowForThisSupplier"); $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); return -1; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index eedee585cee..30941ec0cc2 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -137,7 +137,9 @@ if ($action == 'order' && isset($_POST['valid'])) { $id = $order->create($user); if ($id < 0) { $fail++; - setEventMessage($langs->trans('OrderFail'), 'errors'); + $msg = $langs->trans('OrderFail') . " : "; + $msg .= $order->error; + setEventMessage($msg, 'errors'); } $i++; }