diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index 3d8d4f37303..bc9586480d2 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -114,6 +114,7 @@ function societe_prepare_head($object) $head[$h][2] = 'notify'; $h++; } + // Log if ($user->societe_id == 0) { diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index c0119154dd2..a5e3815ea7b 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -487,8 +487,12 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto print ''; } - // Affichage onglets - for ($i = 0 ; $i < sizeof($links) ; $i++) + // Define max of key (max may be higher than sizeof becaus of hole due to module disabling some tabs). + $keys=array_keys($links); + $maxkey=max($keys); + + // Show tabs + for ($i = 0 ; $i <= $maxkey ; $i++) { if ($links[$i][2] == 'image') { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f327f0f2063..ce5e279c463 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -183,6 +183,7 @@ else { $soc->typent_id = $_POST["typent_id"]; } + $soc->client = $_POST["client"]; $soc->fournisseur = $_POST["fournisseur"]; $soc->fournisseur_categorie = $_POST["fournisseur_categorie"];