Can't delete a project
This commit is contained in:
parent
ee986b1a2b
commit
3fac108af2
@ -80,8 +80,9 @@ llxHeader("",$langs->trans("Contact"), $helpurl);
|
|||||||
if ($object->id)
|
if ($object->id)
|
||||||
{
|
{
|
||||||
$head = contact_prepare_head($object);
|
$head = contact_prepare_head($object);
|
||||||
|
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("Contact"), 0, 'contact');
|
dol_fiche_head($head, 'documents', $title, 0, 'contact');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
|
|||||||
@ -311,7 +311,7 @@ if (empty($reshook))
|
|||||||
$result = $object->setValid($user);
|
$result = $object->setValid($user);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ if (empty($reshook))
|
|||||||
$result = $object->setClose($user);
|
$result = $object->setClose($user);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@ if (empty($reshook))
|
|||||||
$result = $object->setValid($user);
|
$result = $object->setValid($user);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,14 +339,14 @@ if (empty($reshook))
|
|||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
setEventMessage($langs->trans("RecordDeleted"), 'info');
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog($object->error,LOG_DEBUG);
|
dol_syslog($object->error,LOG_DEBUG);
|
||||||
setEventMessage($object->error,'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
setEventMessage($object->errors,'errors');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -515,7 +515,7 @@ class Project extends CommonObject
|
|||||||
// Set fk_projet into elements to null
|
// Set fk_projet into elements to null
|
||||||
$listoftables=array(
|
$listoftables=array(
|
||||||
'facture'=>'fk_projet','propal'=>'fk_projet','commande'=>'fk_projet','facture_fourn'=>'fk_projet','commande_fournisseur'=>'fk_projet',
|
'facture'=>'fk_projet','propal'=>'fk_projet','commande'=>'fk_projet','facture_fourn'=>'fk_projet','commande_fournisseur'=>'fk_projet',
|
||||||
'expensereport_det'=>'fk_projet','contrat'=>'fk_projet','fichinter'=>'fk_projet','don'=>'fk_project'
|
'expensereport_det'=>'fk_projet','contrat'=>'fk_projet','fichinter'=>'fk_projet','don'=>'fk_projet'
|
||||||
);
|
);
|
||||||
foreach($listoftables as $key => $value)
|
foreach($listoftables as $key => $value)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user