Fix : if there is no stock there is an exception instead of a warning
This commit is contained in:
parent
1b166ea8cb
commit
59ddb6e97f
1 changed files with 3 additions and 3 deletions
|
|
@ -74,10 +74,10 @@ class Stock_Goods extends Stock_Goods_Sql
|
|||
$motif->size = 80;
|
||||
$idepo = HtmlInput::select_stock($cn, "p_depot", "W");
|
||||
$idepo->setReadOnly($p_readonly);
|
||||
if (count($idepo->value) == 0)
|
||||
if (empty($idepo->value) )
|
||||
{
|
||||
NoAccess();
|
||||
die();
|
||||
echo_warning(_("Aucun stock disponible"));
|
||||
return;
|
||||
}
|
||||
$idepo->selected = $p_depot;
|
||||
if ($p_readonly ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue