Error management

This commit is contained in:
Laurent Destailleur 2018-02-08 14:25:44 +01:00
parent e2cabd9be7
commit 9c954de081
2 changed files with 4 additions and 4 deletions

View File

@ -176,7 +176,7 @@ if (empty($reshook))
$result=$object->update($object->id, $user);
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
// update order min amount
if ($action == 'setorder_min_amount')
{
@ -412,7 +412,7 @@ if ($object->id > 0)
print '</td>';
print '</tr>';
print '<tr class="nowrap">';
print '<td>';
print $form->editfieldkey("OrderMinAmount",'order_min_amount',$object->order_min_amount,$object,$user->rights->societe->creer);
@ -422,7 +422,7 @@ if ($object->id > 0)
print '</td>';
print '</tr>';
}
// Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES))

View File

@ -1091,7 +1091,7 @@ class ExpenseReport extends CommonObject
{
$num = $this->ref;
}
if (empty($num)) return -1;
if (empty($num) || $num < 0) return -1;
$this->newref = $num;