diff --git a/htdocs/soc.php3 b/htdocs/soc.php3 index 2416d4a7cd7..fa91fe30e7e 100644 --- a/htdocs/soc.php3 +++ b/htdocs/soc.php3 @@ -107,42 +107,45 @@ elseif ($action == 'edit') { print_titre("Edition de la société"); - $soc = new Societe($db); - $soc->id = $socid; - $soc->fetch($socid); + if ($socid) + { - print '
'; - print ''; + $soc = new Societe($db); + $soc->id = $socid; + $soc->fetch($socid); - print ''; - print ''; - print ''; - - print ''; - - print ''; - print ''; - print ''; - - print ''; - - print ''; - - print ''; - print '
Nom
Adresse
CP '; - print 'Ville 
Tel
Fax
Webhttp://
Siren
Client'; - - print '
Fournisseur'; - - print '
'; - print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + + print ''; + + print ''; + print ''; + print ''; + + print ''; + + print ''; + + print ''; + print '
Nom
Adresse
CP '; + print 'Ville 
Tel
Fax
Webhttp://
Siren
Client'; + + print '
Fournisseur'; + + print '
'; + print '
'; + } } else { print_titre("Fiche société"); @@ -151,8 +154,8 @@ elseif ($action == 'edit') $soc->id = $socid; $soc->fetch($socid); - print ''; - print ''; + print '
Nom'.$soc->nom.'
'; + print ''; print ''; print ''; @@ -164,7 +167,7 @@ elseif ($action == 'edit') if ($soc->client) { - print ''; + print ''; } else { @@ -173,7 +176,7 @@ elseif ($action == 'edit') if ($soc->fournisseur) { - print ''; + print ''; } else {
Nom'.$soc->nom.'
Adresse'.nl2br($soc->adresse).' 
CP'.$soc->cp.' '.$soc->ville.'
Clientoui
Clientoui Fiche
Fournisseuroui
Fournisseuroui Fiche