Skip to content

Commit

Permalink
Merge pull request #10211 from atm-john/fix_error_message_details
Browse files Browse the repository at this point in the history
Add détails to error message
  • Loading branch information
eldy committed Dec 14, 2018
2 parents 7be2097 + 6a4df05 commit 78cdade
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions htdocs/product/stock/class/mouvementstock.class.php
Expand Up @@ -322,8 +322,8 @@ function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label
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;
}
Expand All @@ -333,8 +333,8 @@ function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label
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;
}
Expand Down

0 comments on commit 78cdade

Please sign in to comment.