diff --git a/htdocs/docsoc.php b/htdocs/docsoc.php index c82cc7f59e4..0c85017111a 100644 --- a/htdocs/docsoc.php +++ b/htdocs/docsoc.php @@ -71,13 +71,15 @@ if ($action=='delete') * * */ +$socid=$_GET["socid"]; + if ($socid > 0) { $societe = new Societe($db); if ($societe->fetch($socid)) { - $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$_GET["socid"]; + $head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id; $head[0][1] = "Fiche société"; $h = 1; @@ -94,7 +96,6 @@ if ($socid > 0) $head[$h][1] = 'Prospect'; $h++; } - if ($societe->fournisseur) { $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id; @@ -109,44 +110,46 @@ if ($socid > 0) } $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; - $head[$h][1] = 'Note'; + $head[$h][1] = 'Note'; $h++; if ($user->societe_id == 0) { $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; $head[$h][1] = 'Documents'; - $a = $h; + $hselected = $h; $h++; } $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; $head[$h][1] = 'Notifications'; - dolibarr_fiche_head($head, $a); + dolibarr_fiche_head($head, $hselected, $societe->nom); + + /* * */ - print_titre("Documents associés à l'entreprise : $societe->nom"); + print_titre("Documents associés"); /* * * */ if (defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1) { - echo '
'; + echo ''; print ''; print ''; - print '
'; - print ''; - print '
'; - print '
'; + print '
'; + print ''; + print '
'; + print ''; } else { print "La gestion des fichiers associés est désactivée sur ce serveur"; } - print ''; + print '
'; print $mesg; @@ -185,13 +188,14 @@ if ($socid > 0) } else { - print $db->error() . "
" . $sql; + dolibarr_print_error($db); } } else { - print "Erreur"; + dolibarr_print_error(); } + $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$");