diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 5da244658fa..438e88af15a 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -87,7 +87,7 @@ if ($action == 'stcomm') { } } -/* +/** * Recherche * * @@ -112,7 +112,8 @@ if ($mode == 'search') { * * */ -if ($socid > 0) { +if ($socid > 0) +{ $societe = new Societe($db, $socid); $sql = "SELECT s.idp, s.nom, ".$db->pdate("s.datec")." as dc, s.tel, s.fax, st.libelle as stcomm, s.fk_stcomm, s.url,s.address,s.cp,s.ville, s.note, t.libelle as typent, e.libelle as effectif, s.siren, s.prefix_comm, s.services,s.parent, s.description"; @@ -146,64 +147,34 @@ if ($socid > 0) { /* * */ - print "\n"; + print '
'; print ""; print ''; print ""; - - + print ''; print "
Fiche fournisseur : $objsoc->nom
Nouvelle Facture Nouvelle facture[idp&action=edit\">Editer]Produits
"; /* * * */ - ?> - - '; - print ''; - print ''; + print '
'; + print '\n"; - print ''; /* * */ - print ""; - print ''; - - print ""; - $i++; + else + { + print $db->error(); } - $db->free(); - print "
'; + /* + * + */ + print ''; print ''; - print ""; + print ''; - print ""; - print ""; - - print ""; - - print "
Tél'.$objsoc->tel.' fax'.$objsoc->fax.' 
Adresse".nl2br($objsoc->address)."
$objsoc->cp $objsoc->ville
Adresse'.nl2br($objsoc->address).'
'.$objsoc->cp.' '.$objsoc->ville.'
sirensiren\">$objsoc->siren prefix"; - if ($objsoc->prefix_comm) { - print $objsoc->prefix_comm; - } else { - print "[idp&action=attribute_prefix\">Attribuer]"; - } - - print "
Siteurl\">$objsoc->url 
"; - - /* - * - */ - print "
'; - print ''; - print ""; - /* - * - */ print '
Créée le" . strftime("%d %b %Y %H:%M", $objsoc->dc) . "
'; - print '
"; - - print ""; + print ''; /* * * Liste des projets associés @@ -211,60 +182,48 @@ if ($socid > 0) { */ $sql = "SELECT p.rowid,p.title,p.ref,".$db->pdate("p.dateo")." as do"; $sql .= " FROM llx_projet as p WHERE p.fk_soc = $objsoc->idp"; - if ( $db->query($sql) ) { - print ""; - $i = 0 ; - $num = $db->num_rows(); - if ($num > 0) { - $tag = !$tag; print ""; - print ""; + if ( $db->query($sql) ) + { + print '
idp\">liste des projets ($num)
'; + $i = 0 ; + $num = $db->num_rows(); + if ($num > 0) + { + $tag = !$tag; + print ""; + print ""; + } + while ($i < $num && $i < 5) + { + $obj = $db->fetch_object( $i); + $tag = !$tag; + print ""; + print ''; + print ""; + $i++; + } + $db->free(); + print "
idp\">liste des projets ($num)
'.$obj->title.'".strftime("%d %b %Y", $obj->do) ."
"; } - while ($i < $num && $i < 5) { - $obj = $db->fetch_object( $i); - $tag = !$tag; - print "
'.$obj->title.'".strftime("%d %b %Y", $obj->do) ."
"; - } else { - print $db->error(); - } /* * * */ - print ""; - print "\n"; - /* - * - * - * - */ - if ($action == 'changevalue') { + print ''; + print '' . "
\n"; + - print "
"; - print "
idp\" method=\"post\">"; - print ""; - print "Cette société est un cabinet de recrutement : "; - print ""; - print ""; - print "
\n"; - } else { /* * * Liste des contacts * */ - print ""; + print '
'; print ""; print ''; @@ -275,30 +234,35 @@ if ($socid > 0) { $sql .= " FROM llx_socpeople as p WHERE p.fk_soc = $objsoc->idp ORDER by p.datec"; $result = $db->query($sql); $i = 0 ; $num = $db->num_rows(); $tag = True; - while ($i < $num) { - $obj = $db->fetch_object( $i); - if ($tag) { - print ""; - } else { - print ""; + while ($i < $num) + { + $obj = $db->fetch_object( $i); + if ($tag) + { + print ""; + } + else + { + print ""; + } + print ""; + print ""; + print ''; + print ''; + print ''; + print ""; + print "\n"; + $i++; + $tag = !$tag; } - print ""; - print ""; - print ''; - print ''; - print ''; - print ""; - print "\n"; - $i++; - $tag = !$tag; - } print "
Prénom NomPosteTél
$obj->firstname $obj->name"; + if ($obj->note) + { + print "
".nl2br($obj->note); + } + print "
$obj->poste '.$obj->phone.' '.$obj->fax.' '.$obj->email.' idp&action=editcontact&contactid=$obj->idp\">Modifier
$obj->firstname $obj->name"; - if ($obj->note) { - print "
".nl2br($obj->note); - } - print "
$obj->poste '.$obj->phone.' '.$obj->fax.' '.$obj->email.' idp&action=editcontact&contactid=$obj->idp\">Modifier
"; - - print "\n
\n"; + + /* * */ @@ -393,7 +357,7 @@ if ($socid > 0) { print ''; print ""; print "
".nl2br($objsoc->note)."
"; - } + } else { print $db->error() . "
" . $sql;