Fix: dol_htmloutput_events() already loaded in footer

This commit is contained in:
Regis Houssin 2012-08-07 11:48:28 +02:00
parent edbfd7d4f8
commit 71a4a2b7f9

View File

@ -48,8 +48,6 @@ $fieldid = isset($_GET["ref"])?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldid); $result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldid);
$mesg = '';
/* /*
* Actions * Actions
@ -65,9 +63,7 @@ if ($action == 'setstocklimit')
$product->seuil_stock_alerte=$stocklimit; $product->seuil_stock_alerte=$stocklimit;
$result=$product->update($product->id,$user,1,0,1); $result=$product->update($product->id,$user,1,0,1);
if ($result < 0) if ($result < 0)
{ setEventMessage($product->errors, 'errors');
$mesg=join(',',$product->errors);
}
$action=''; $action='';
} }
@ -177,7 +173,7 @@ if ($action == "transfert_stock" && ! $cancel)
} }
else else
{ {
$mesg=$product->error; setEventMessage($product->error, 'errors');
$db->rollback(); $db->rollback();
} }
} }
@ -211,9 +207,6 @@ if ($id > 0 || $ref)
$form = new Form($db); $form = new Form($db);
if ($mesg) print($mesg);
dol_htmloutput_events();
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref