fix error message details

This commit is contained in:
ATM John BOTELLA 2018-12-08 17:29:07 +01:00
parent 25f66bd024
commit 6a4df05fd0

View File

@ -322,8 +322,8 @@ class MouvementStock extends CommonObject
if (! $foundforbatch || $qtyisnotenough)
{
$langs->load("stocks");
$this->error = $langs->trans('qtyToTranferLotIsNotEnough');
$this->errors[] = $langs->trans('qtyToTranferLotIsNotEnough');
$this->error = $langs->trans('qtyToTranferLotIsNotEnough').' : '.$product->ref;
$this->errors[] = $langs->trans('qtyToTranferLotIsNotEnough').' : '.$product->ref;
$this->db->rollback();
return -8;
}
@ -333,8 +333,8 @@ class MouvementStock extends CommonObject
if (empty($product->stock_warehouse[$entrepot_id]->real) || $product->stock_warehouse[$entrepot_id]->real < abs($qty))
{
$langs->load("stocks");
$this->error = $langs->trans('qtyToTranferIsNotEnough');
$this->errors[] = $langs->trans('qtyToTranferIsNotEnough');
$this->error = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref;
$this->errors[] = $langs->trans('qtyToTranferIsNotEnough').' : '.$product->ref;
$this->db->rollback();
return -8;
}