Fix syntax error
This commit is contained in:
parent
546da0ceda
commit
c34bfc229b
@ -1080,18 +1080,18 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm ==
|
||||
if ($result > 0)
|
||||
{
|
||||
// Refuse deletion for some objects/status
|
||||
if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>';
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>';
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1);
|
||||
else $result = $objecttmp->delete($user);
|
||||
|
||||
if ($result <= 0)
|
||||
if ($result <= 0)
|
||||
{
|
||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||
$error++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user