Look: Uniformisation des fiches et modifications esthtiques mineures, New: Tous les onglets qui proposent des contacts utilisent les nouveaux ecrans d'ajout/modif de contact

This commit is contained in:
Laurent Destailleur 2004-06-08 22:46:48 +00:00
parent 25d269dbbe
commit c8f18cc231
8 changed files with 177 additions and 140 deletions

View File

@ -371,10 +371,15 @@ if ($socid > 0)
print '<a class="tabAction" href="../fichinter/fiche.php?socidp='.$objsoc->id.'&amp;action=create">Intervention</a>';
}
// if ($user->societe_id == 0)
// {
// if ($user->rights->facture->creer) {
// print "<a class=\"tabAction\" href=\"facture.php?action=create&socidp=$objsoc->idp\">".translate("Créer Facture")."</a>";
// }
// }
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>';
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$socid.'">Notifications</a>';
print '</div>';
print '<br>';

View File

@ -1017,7 +1017,7 @@ else
print '</tr>';
print "</form>";
}
print "</table>\n";
print "</table><br>\n";
/*
* Fin Ajout ligne

View File

@ -207,16 +207,15 @@ if ($socid > 0)
/*
*
*/
print "<table width=\"100%\" border=\"0\" cellspacing=\"1\">\n";
print "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">\n";
print '<tr><td valign="top" width="50%">';
/*
*
*
*/
print '<table width="100%" border="0"><tr>';
print '<tr><td valign="top">';
print '<table class="border" cellspacing="0" width="100%">';
print '<table class="border" cellpadding="2" cellspacing="0" width="100%">';
print '<tr><td width="20%">Nom</td><td width="80%" colspan="3">'.$objsoc->nom.'</td></tr>';
print '<tr><td valign="top">Adresse</td><td colspan="3">'.nl2br($objsoc->adresse)."<br>$objsoc->cp $objsoc->ville</td></tr>";
print '<tr><td>Tel</td><td>'.$objsoc->tel.'&nbsp;</td><td>Fax</td><td>'.$objsoc->fax.'&nbsp;</td></tr>';
@ -273,21 +272,21 @@ if ($socid > 0)
{
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<TD><a href=\"../compta/facture.php?facid=$objp->facid\">$objp->facnumber</a></TD>\n";
print "<tr $bc[$var]>";
print "<td><a href=\"../compta/facture.php?facid=$objp->facid\">$objp->facnumber</a></td>\n";
if ($objp->df > 0 )
{
print "<TD align=\"right\">".strftime("%d %B %Y",$objp->df)."</TD>\n";
print "<td align=\"right\">".dolibarr_print_date($objp->df)."</td>\n";
}
else
{
print "<TD align=\"right\"><b>!!!</b></TD>\n";
print "<td align=\"right\"><b>!!!</b></td>\n";
}
print "<TD align=\"right\">".number_format($objp->amount, 2, ',', ' ')."</TD>\n";
print "<td align=\"right\">".number_format($objp->amount, 2, ',', ' ')."</td>\n";
$fac = new Facture($db);
print "<TD align=\"center\">".($fac->LibStatut($objp->paye,$objp->statut))."</TD>\n";
print "</TR>\n";
print "<td align=\"center\">".($fac->LibStatut($objp->paye,$objp->statut))."</td>\n";
print "</tr>\n";
$i++;
}
$db->free();
@ -345,17 +344,16 @@ if ($socid > 0)
if ($user->societe_id == 0)
{
if ($user->rights->facture->creer)
print "<a class=\"tabAction\" href=\"facture.php?action=create&socidp=$objsoc->idp\">".translate("Facturer")."</a>";
if ($user->rights->facture->creer) {
print "<a class=\"tabAction\" href=\"facture.php?action=create&socidp=$objsoc->idp\">".translate("Créer Facture")."</a>";
}
print "<a class=\"tabAction\" href=\"deplacement/fiche.php?socid=$objsoc->idp&action=create\">Créer Déplacement</a>";
}
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>';
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$socid.'">Notifications</a>';
print '</div>';
print '<br>';
print "<br>\n";
/*
*
@ -381,7 +379,7 @@ if ($socid > 0)
* Liste des contacts
*
*/
print '<table width="100%" cellspacing="1" border="0" cellpadding="2">';
print '<table class="noborder" width="100%" cellspacing="1" cellpadding="2">';
print '<tr class="liste_titre"><td><b>Pr&eacute;nom Nom</b></td>';
print '<td><b>Poste</b></td><td><b>T&eacute;l</b></td>';
@ -402,18 +400,17 @@ if ($socid > 0)
print '<td>';
//print '<a href="action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">';
//print '<img border="0" src="/theme/'.$conf->theme.'/img/filenew.png"></a>&nbsp;';
print '<a href="../comm/action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->firstname.' '. $obj->name.'</a>&nbsp;</td>';
print '<a href="../comm/action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->firstname.' '. $obj->name.'</a>';
if ($obj->note)
{
print "<br><b>".nl2br($obj->note);
print "<br>".nl2br($obj->note);
}
print "</td>";
print "<td>$obj->poste&nbsp;</td>";
print '<td><a href="../comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->phone.'</a>&nbsp;</td>';
print '<td><a href="../comm/action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->fax.'</a>&nbsp;</td>';
print '<td><a href="../comm/action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->email.'</a>&nbsp;</td>';
print "<td align=\"center\"><a href=\"../comm/people.php?socid=$objsoc->idp&action=editcontact&contactid=$obj->idp\">".img_edit()."</a></td>";
print "<td align=\"center\"><a href=\"../contact/fiche.php?action=edit&amp;id=$obj->idp\">".img_edit()."</a></td>";
print "</tr>\n";
$i++;
$tag = !$tag;

View File

@ -92,14 +92,15 @@ print "<br>\n";
// print "<br>\n";
//}
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<tr class=\"liste_titre\">";
print '<td>';
print_liste_field_titre("Num",$PHP_SELF,"id");
print '</td>';
print '<td>';
print_liste_field_titre("Echéance",$PHP_SELF,"de");
print '</td><td>';
print_liste_field_titre("Echéance/Date",$PHP_SELF,"de");
print '</td><td>';
print_liste_field_titre("Période",$PHP_SELF,"periode");
print '&nbsp;';
print '</td><td align="left">';
print_liste_field_titre("Type",$PHP_SELF,"type");
print '</td><td align="left">';
@ -150,7 +151,7 @@ if ( $db->query($sql) )
$var = !$var;
print "<tr $bc[$var]>";
print '<td width="80"><a href="charges.php?id='.$obj->id.'">'.$obj->id.'</a></td>';
print '<td>'.strftime("%d %b %y",$obj->de).'</td>';
print '<td width="110">'.dolibarr_print_date($obj->de).'</td>';
print '<td>';
if ($obj->periode) {
print '<a href="index.php?year='.strftime("%Y",$obj->periode).'">'.strftime("%Y",$obj->periode).'</a>';
@ -159,11 +160,11 @@ if ( $db->query($sql) )
}
print '</td>';
print '<td>'.$obj->type_lib.'</td><td>'.$obj->libelle.'</td>';
print '<td align="right">'.price($obj->amount).'</td>';
print '<td align="right" width="100">'.price($obj->amount).'</td>';
if ($obj->paye)
{
print '<td align="center" class="normal">'.strftime("%d/%m/%y",$obj->dp).'</td>';
print '<td align="center" class="normal" width="100"><a class="payee" href="'.$PHP_SELF.'?filtre=paye:1">Oui</a></td>';
print '<td>&nbsp;</td>';
} else {
print '<td align="center"><a class="impayee" href="'.$PHP_SELF.'?filtre=paye:0">Non</a></td>';
@ -208,7 +209,7 @@ if ( $db->query($sql) )
}
print '</select>';
print '</td>';
print '<td align="left"><input type="text" size="20" name="libelle"></td>';
print '<td align="left"><input type="text" size="24" name="libelle"></td>';
print '<td align="right"><input type="text" size="6" name="amount"></td>';
print '<td>&nbsp;</td>';

View File

@ -1,5 +1,6 @@
<?PHP
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,25 +26,25 @@ require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php");
$error = array();
if ($HTTP_POST_VARS["action"] == 'add')
if ($_POST["action"] == 'add')
{
$contact = new Contact($db);
$contact->socid = $HTTP_POST_VARS["socid"];
$contact->socid = $_POST["socid"];
$contact->name = $HTTP_POST_VARS["name"];
$contact->firstname = $HTTP_POST_VARS["firstname"];
$contact->poste = $HTTP_POST_VARS["poste"];
$contact->address = $HTTP_POST_VARS["adresse"];
$contact->cp = $HTTP_POST_VARS["cp"];
$contact->ville = $HTTP_POST_VARS["ville"];
$contact->fax = $HTTP_POST_VARS["fax"];
$contact->note = $HTTP_POST_VARS["note"];
$contact->email = $HTTP_POST_VARS["email"];
$contact->phone_pro = $HTTP_POST_VARS["phone_pro"];
$contact->phone_perso = $HTTP_POST_VARS["phone_perso"];
$contact->phone_mobile = $HTTP_POST_VARS["phone_mobile"];
$contact->jabberid = $HTTP_POST_VARS["jabberid"];
$contact->name = $_POST["name"];
$contact->firstname = $_POST["firstname"];
$contact->poste = $_POST["poste"];
$contact->address = $_POST["adresse"];
$contact->cp = $_POST["cp"];
$contact->ville = $_POST["ville"];
$contact->fax = $_POST["fax"];
$contact->note = $_POST["note"];
$contact->email = $_POST["email"];
$contact->phone_pro = $_POST["phone_pro"];
$contact->phone_perso = $_POST["phone_perso"];
$contact->phone_mobile = $_POST["phone_mobile"];
$contact->jabberid = $_POST["jabberid"];
$_GET["id"] = $contact->create($user);
}
@ -52,8 +53,8 @@ if ($_GET["action"] == 'delete')
{
$contact = new Contact($db);
$contact->old_name = $HTTP_POST_VARS["old_name"];
$contact->old_firstname = $HTTP_POST_VARS["old_firstname"];
$contact->old_name = $_POST["old_name"];
$contact->old_firstname = $_POST["old_firstname"];
$result = $contact->delete($_GET["id"]);
@ -65,27 +66,27 @@ if ($action == 'update')
{
$contact = new Contact($db);
$contact->old_name = $HTTP_POST_VARS["old_name"];
$contact->old_firstname = $HTTP_POST_VARS["old_firstname"];
$contact->old_name = $_POST["old_name"];
$contact->old_firstname = $_POST["old_firstname"];
$contact->socid = $HTTP_POST_VARS["socid"];
$contact->name = $HTTP_POST_VARS["name"];
$contact->firstname = $HTTP_POST_VARS["firstname"];
$contact->poste = $HTTP_POST_VARS["poste"];
$contact->socid = $_POST["socid"];
$contact->name = $_POST["name"];
$contact->firstname = $_POST["firstname"];
$contact->poste = $_POST["poste"];
$contact->address = $HTTP_POST_VARS["adresse"];
$contact->cp = $HTTP_POST_VARS["cp"];
$contact->ville = $HTTP_POST_VARS["ville"];
$contact->address = $_POST["adresse"];
$contact->cp = $_POST["cp"];
$contact->ville = $_POST["ville"];
$contact->phone_pro = $HTTP_POST_VARS["phone_pro"];
$contact->phone_perso = $HTTP_POST_VARS["phone_perso"];
$contact->phone_mobile = $HTTP_POST_VARS["phone_mobile"];
$contact->fax = $HTTP_POST_VARS["fax"];
$contact->note = $HTTP_POST_VARS["note"];
$contact->email = $HTTP_POST_VARS["email"];
$contact->jabberid = $HTTP_POST_VARS["jabberid"];
$contact->phone_pro = $_POST["phone_pro"];
$contact->phone_perso = $_POST["phone_perso"];
$contact->phone_mobile = $_POST["phone_mobile"];
$contact->fax = $_POST["fax"];
$contact->note = $_POST["note"];
$contact->email = $_POST["email"];
$contact->jabberid = $_POST["jabberid"];
$result = $contact->update($HTTP_POST_VARS["contactid"], $user);
$result = $contact->update($_POST["contactid"], $user);
$error = $contact->error;
}
@ -107,11 +108,21 @@ if ($action == 'create_user')
llxHeader();
/*
* Onglets
*/
print '<div class="tabs">';
print '<a href="fiche.php?id='.$_GET["id"].'" id="active" class="tab">Général</a>';
print '<a href="perso.php?id='.$_GET["id"].'" class="tab">Informations personnelles</a>';
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
print '<a class="tab" href="info.php?id='.$_GET["id"].'">Info</a>';
if ($_GET["id"] > 0)
{
# Si edition contact deja existant
print '<a href="fiche.php?id='.$_GET["id"].'" id="active" class="tab">Général</a>';
print '<a href="perso.php?id='.$_GET["id"].'" class="tab">Informations personnelles</a>';
print '<a class="tab" href="vcard.php?id='.$_GET["id"].'">VCard</a>';
print '<a class="tab" href="info.php?id='.$_GET["id"].'">Info</a>';
}
else {
print '<a href="'.$PHP_SELF.'?socid='.$_GET["socid"].'&amp;action=create" id="active" class="tab">Général</a>';
}
print '</div>';
if ($mesg)
@ -135,7 +146,7 @@ if ($_GET["action"] == 'create')
print "<form method=\"post\" action=\"fiche.php\">";
print '<input type="hidden" name="action" value="add">';
print '<table class="border" border="0" width="100%">';
print '<table class="border" width="100%">';
if ($_GET["socid"] > 0)
{
@ -146,21 +157,24 @@ if ($_GET["action"] == 'create')
print '<tr><td>Nom</td><td><input name="name" type="text" size="20" maxlength="80"></td>';
print '<td>Prenom</td><td><input name="firstname" type="text" size="15" maxlength="80"></td>';
print '<td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80"></td></tr>';
print '<td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.$contact->phone_pro.'"></td></tr>';
print '<tr><td>Poste</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80"></td>';
print '<tr><td>Poste</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.$contact->poste.'"></td>';
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80"></td></tr>';
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
print '<tr><td>Adresse</td><td colspan="3"><input name="adresse" type="text" size="18" maxlength="80"></td>';
print '<tr><td>Adresse</td><td colspan="3"><input name="adresse" type="text" size="50" maxlength="80"></td>';
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80"></td></tr>';
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
print '<tr><td>CP Ville</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80">&nbsp;<input name="ville" type="text" size="20" maxlength="80"></td>';
print '<tr><td>CP Ville</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80">&nbsp;<input name="cp" type="text" size="20" maxlength="80"></td>';
print '<td>Fax</td><td><input name="fax" type="text" size="18" maxlength="80"></td></tr>';
print '<tr><td>Email</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80"></td></tr>';
print '<tr><td>Note</td><td colspan="5"><textarea name="note"></textarea></td></tr>';
print '<tr><td>Email</td><td colspan="5"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
print '<tr><td>Jabberid</td><td colspan="5"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
print '<tr><td>Note</td><td colspan="5"><textarea name="note" cols="60" rows="3"></textarea></td></tr>';
print '<tr><td align="center" colspan="6"><input type="submit" value="Ajouter"></td></tr>';
print "</table>";
print "</form>";
@ -174,15 +188,15 @@ elseif ($_GET["action"] == 'edit')
print '<form method="post" action="fiche.php?id='.$_GET["id"].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="socid" value="'.$contact->socid.'">';
print '<input type="hidden" name="contactid" value="'.$contact->id.'">';
print '<input type="hidden" name="old_name" value="'.$contact->name.'">';
print '<input type="hidden" name="old_firstname" value="'.$contact->firstname.'">';
print '<table class="border" cellpadding="3" celspacing="0" border="0" width="100%">';
print '<table class="border" width="100%">';
if ($_GET["socid"] > 0)
{
print '<tr><td>Société</td><td colspan="5">'.$objsoc->nom.'</td>';
print '<input type="hidden" name="socid" value="'.$objsoc->id.'">';
}
print '<tr><td>Nom</td><td><input name="name" type="text" size="20" maxlength="80" value="'.$contact->name.'"></td>';
@ -194,7 +208,7 @@ elseif ($_GET["action"] == 'edit')
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
print '<tr><td>Adresse</td><td colspan="3"><input name="adresse" type="text" size="18" maxlength="80"></td>';
print '<tr><td>Adresse</td><td colspan="3"><input name="adresse" type="text" size="50" maxlength="80"></td>';
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
@ -205,12 +219,10 @@ elseif ($_GET["action"] == 'edit')
print '<tr><td>Jabberid</td><td colspan="5"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
print '<tr><td>Note</td><td colspan="5"><textarea name="note"></textarea></td></tr>';
print '<tr><td>Note</td><td colspan="5"><textarea name="note" cols="60" rows="3"></textarea></td></tr>';
print '<tr><td align="center" colspan="6"><input type="submit" value="Enregistrer"></td></tr>';
print "</table>";
print '<div class="FicheSubmit"><input type="submit" value="Enregistrer">';
print "</form>";
}
else

View File

@ -47,14 +47,11 @@ if ($page < 0) { $page = 0 ; }
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if ($_GET["view"] == 'phone')
{
$titre = "Liste des contacts (Vue téléphone)";
}
else
{
$titre = "Liste des contacts";
}
if ($_GET["view"] == 'phone') { $text="(Vue Téléphones)"; }
if ($_GET["view"] == 'mail') { $text="(Vue EMail)"; }
if ($_GET["view"] == 'recent') { $text="(Récents)"; }
$titre = "Liste des contacts $text";
/*
*

View File

@ -1,6 +1,7 @@
<?PHP
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -43,35 +44,56 @@ $societe = new Societe($db);
if ( $societe->fetch($socid) )
{
$head[0][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id;
$head[0][1] = "Fiche société";
$h = 1;
/*
* Affichage onglets
*/
$h = 0;
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
$head[$h][1] = 'Fiche Fournisseur';
$a = $h;
$h++;
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$socid;
$head[$h][1] = "Fiche société";
$h++;
$head[$h][0] = DOL_URL_ROOT.'/product/liste.php?type=0&fourn_id='.$societe->id;
$head[$h][1] = 'Produits';
$h++;
dolibarr_fiche_head($head, $a);
print_titre($societe->nom);
if ($societe->client==1)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$socid;
$head[$h][1] = 'Fiche client';
$h++;
}
if ($societe->client==2)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$socid;
$head[$h][1] = 'Fiche prospect';
$h++;
}
if ($societe->fournisseur)
{
$hselected=$h;
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$socid;
$head[$h][1] = 'Fiche fournisseur';
$h++;
}
if ($conf->produit->enabled) {
$head[$h][0] = DOL_URL_ROOT.'/product/liste.php?type=0&fourn_id='.$societe->id;
$head[$h][1] = 'Produits';
$h++;
}
dolibarr_fiche_head($head, $hselected);
/*
*
*
*/
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="1">';
print '<table width="100%" cellspacing="0" cellpadding="2">';
print '<tr><td valign="top" width="50%">';
/*
*
*/
print '<table class="border" cellpadding="3" cellspacing="0" width="100%">';
print '<tr><td>Tél</td><td>'.dolibarr_print_phone($societe->tel).'&nbsp;</td><td>fax</td><td>'.dolibarr_print_phone($societe->fax).'&nbsp;</td></tr>';
print '<table class="border" cellpadding="2" cellspacing="0" width="100%">';
print '<tr><td width="20%">Nom</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
print '<tr><td valign="top">Adresse</td><td colspan="3">'.nl2br($societe->adresse).'<br>'.$societe->cp.' '.$societe->ville.'</td></tr>';
print '<tr><td>Tél</td><td>'.dolibarr_print_phone($societe->tel).'&nbsp;</td><td>Fax</td><td>'.dolibarr_print_phone($societe->fax).'&nbsp;</td></tr>';
print "<tr><td>Web</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a>&nbsp;</td></tr>";
print '</table>';
/*
@ -99,13 +121,14 @@ if ( $societe->fetch($socid) )
while ($i < $num && $i < 5)
{
$obj = $db->fetch_object( $i);
$tag = !$tag;
print "<tr $bc[$tag]>";
$var=!$var;
print "<tr $bc[$var]>";
print '<td>';
print '<a href="facture/fiche.php?facid='.$obj->rowid.'">';
print img_file();
print $obj->facnumber.'</a> '.$obj->libelle.'</td>';
print "<td align=\"right\">".strftime("%d %b %Y", $obj->df) ."</td></tr>";
print "<td align=\"right\" width=\"100\">".dolibarr_print_date($obj->df)."</td></tr>";
$i++;
}
$db->free();
@ -122,58 +145,61 @@ if ( $societe->fetch($socid) )
*/
print '</td></tr>';
print '</table>' . "<br>\n";
print '</div>';
/*
* Boutons Actions
*/
print '<div class="tabsAction">';
print '<a class="tabAction" href="facture/fiche.php?action=create&socid='.$societe->id.'">'.translate("Créer Facture").'</a>';
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>';
print '</div>';
/*
*
* Liste des contacts
*
*/
print '<table class="border" cellspacing="0" cellpadding="2" width="100%">';
print '<br><table class="noborder" cellspacing="0" cellpadding="2" width="100%">';
print "<tr><td><b>Pr&eacute;nom Nom</b></td>";
print "<tr class=\"liste_titre\"><td><b>Pr&eacute;nom Nom</b></td>";
print '<td><b>Poste</b></td><td><b>T&eacute;l</b></td>';
print "<td><b>Fax</b></td><td><b>Email</b></td>";
print "<td><a href=\"people.php?socid=$societe->id&action=addcontact\">Ajouter</a></td></tr>";
print "<td align=\"center\"><a href=\"".DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid."&amp;action=create\">Ajouter</a></td></tr>";
$sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p WHERE p.fk_soc = $societe->id ORDER by p.datec";
$result = $db->query($sql);
$i = 0 ; $num = $db->num_rows(); $tag = True;
$i = 0 ; $num = $db->num_rows();
$var=1;
while ($i < $num)
{
$obj = $db->fetch_object( $i);
if ($tag)
{
print "<tr bgcolor=\"e0e0e0\">";
}
else
{
print "<tr>";
}
$var = !$var;
print "<tr $bc[$var]>";
print "<td>$obj->firstname $obj->name";
if ($obj->note)
{
print "<br><b>".nl2br($obj->note);
print "<br>".nl2br($obj->note);
}
print "</td>";
print "<td>$obj->poste&nbsp;</td>";
print '<td><a href="actioncomm.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a>&nbsp;</td>';
print '<td><a href="actioncomm.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a>&nbsp;</td>';
print '<td><a href="actioncomm.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a>&nbsp;</td>';
print "<td><a href=\"people.php?socid=$societe->id&action=editcontact&contactid=$obj->idp\">Modifier</a></td>";
print "<td align=\"center\"><a href=\"../contact/fiche.php?action=edit&amp;id=$obj->idp\">".img_edit()."</a></td>";
print "</tr>\n";
$i++;
$tag = !$tag;
}
print "</table></div>";
/*
*
*/
print '<div class="tabsAction">';
print '<a class="tabAction" href="facture/fiche.php?action=create&socid='.$societe->id.'">Nouvelle Facture</a>';
print '</div>';
print "</table>";
}
else
{

View File

@ -319,7 +319,6 @@ else
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid.'&amp;action=create">Ajouter un contact</a>';
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$socid.'">Notifications</a>';
print '</div>';
/*
*