diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index bd222a499c6..f582c6c9048 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -371,10 +371,15 @@ if ($socid > 0) print 'Intervention'; } +// if ($user->societe_id == 0) +// { +// if ($user->rights->facture->creer) { +// print "idp\">".translate("Créer Facture").""; +// } +// } + print 'Ajouter un contact'; - print 'Notifications'; - print ''; print '
'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 3e01d8efb78..0ba90bc3536 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1017,7 +1017,7 @@ else print ''; print ""; } - print "\n"; + print "
\n"; /* * Fin Ajout ligne diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 4faccd7ddcb..651bad43c9c 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -207,16 +207,15 @@ if ($socid > 0) /* * */ - print "\n"; - + print "
\n"; + print '
'; + /* * * */ - print ''; - print '
'; - print ''; + print '
'; print ''; print '"; print ''; @@ -273,21 +272,21 @@ if ($socid > 0) { $objp = $db->fetch_object( $i); $var=!$var; - print ""; - print "\n"; + print ""; + print "\n"; if ($objp->df > 0 ) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } - print "\n"; + print "\n"; $fac = new Facture($db); - print "\n"; - print "\n"; + print "\n"; + print "\n"; $i++; } $db->free(); @@ -345,17 +344,16 @@ if ($socid > 0) if ($user->societe_id == 0) { - if ($user->rights->facture->creer) - print "idp\">".translate("Facturer").""; + if ($user->rights->facture->creer) { + print "idp\">".translate("Créer Facture").""; + } print "idp&action=create\">Créer Déplacement"; } print 'Ajouter un contact'; - print 'Notifications'; - print ''; - print '
'; + print "
\n"; /* * @@ -381,7 +379,7 @@ if ($socid > 0) * Liste des contacts * */ - print '
Nom'.$objsoc->nom.'
Adresse'.nl2br($objsoc->adresse)."
$objsoc->cp $objsoc->ville
Tel'.$objsoc->tel.' Fax'.$objsoc->fax.' 
facid\">$objp->facnumber
facid\">$objp->facnumber".strftime("%d %B %Y",$objp->df)."".dolibarr_print_date($objp->df)."!!!!!!".number_format($objp->amount, 2, ',', ' ')."".number_format($objp->amount, 2, ',', ' ')."".($fac->LibStatut($objp->paye,$objp->statut))."
".($fac->LibStatut($objp->paye,$objp->statut))."
'; + print '
'; print ''; print ''; @@ -402,18 +400,17 @@ if ($socid > 0) print ''; - + print ''.$obj->firstname.' '. $obj->name.''; if ($obj->note) { - print "
".nl2br($obj->note); + print "
".nl2br($obj->note); } print ""; print "
"; print ''; print ''; print ''; - print ""; + print ""; print "\n"; $i++; $tag = !$tag; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 60b2b426da8..15ef9dec937 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -92,14 +92,15 @@ print "
\n"; // print "
\n"; //} -print "
Prénom NomPosteTél'; //print ''; //print ' '; - print ''.$obj->firstname.' '. $obj->name.' $obj->poste '.$obj->phone.' '.$obj->fax.' '.$obj->email.' idp&action=editcontact&contactid=$obj->idp\">".img_edit()."idp\">".img_edit()."
"; +print "
"; print ""; print ''; +print '"; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; if ($obj->paye) { - print ''; + print ''; print ''; } else { print ''; @@ -208,7 +209,7 @@ if ( $db->query($sql) ) } print ''; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 64c2cc5b6ba..82aa05d2173 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 '
'; -print 'Général'; -print 'Informations personnelles'; -print 'VCard'; -print 'Info'; +if ($_GET["id"] > 0) +{ + # Si edition contact deja existant + print 'Général'; + print 'Informations personnelles'; + print 'VCard'; + print 'Info'; +} +else { + print 'Général'; +} print '
'; if ($mesg) @@ -135,7 +146,7 @@ if ($_GET["action"] == 'create') print "
"; print ''; - print '
'; print_liste_field_titre("Num",$PHP_SELF,"id"); +print ''; +print_liste_field_titre("Echéance",$PHP_SELF,"de"); print ''; -print_liste_field_titre("Echéance/Date",$PHP_SELF,"de"); -print ''; -print_liste_field_titre("Période",$PHP_SELF,"periode"); +print ' '; print ''; print_liste_field_titre("Type",$PHP_SELF,"type"); print ''; @@ -150,7 +151,7 @@ if ( $db->query($sql) ) $var = !$var; print "
'.$obj->id.''.strftime("%d %b %y",$obj->de).''.dolibarr_print_date($obj->de).''; if ($obj->periode) { print 'periode).'">'.strftime("%Y",$obj->periode).''; @@ -159,11 +160,11 @@ if ( $db->query($sql) ) } print ''.$obj->type_lib.''.$obj->libelle.''.price($obj->amount).''.price($obj->amount).''.strftime("%d/%m/%y",$obj->dp).'Oui Non 
'; + print '
'; if ($_GET["socid"] > 0) { @@ -146,21 +157,24 @@ if ($_GET["action"] == 'create') print ''; print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; print ''; - print ''; - print ''; + print ''; + + print ''; + + print ''; print ''; print "
NomPrenomTel Pro
Tel Pro
Poste
PosteTel Perso
Tel Perso
Adresse
AdressePortable
Portable
CP Ville 
CP Ville Fax
Email
Note
Email
Jabberid
Note
"; print ""; @@ -174,15 +188,15 @@ elseif ($_GET["action"] == 'edit') print '
'; print ''; - print ''; print ''; print ''; print ''; - print ''; + print '
'; if ($_GET["socid"] > 0) { print ''; + print ''; } print ''; @@ -194,7 +208,7 @@ elseif ($_GET["action"] == 'edit') print ''; - print ''; + print ''; print ''; @@ -205,12 +219,10 @@ elseif ($_GET["action"] == 'edit') print ''; - print ''; + print ''; + print ''; print "
Société'.$objsoc->nom.'
NomTel Perso
Adresse
AdressePortable
Jabberid
Note
Note
"; - print '
'; - - print ""; } else diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 0587de18915..1a69a3c7441 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -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"; /* * diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 6f03864e272..0bafd9c6882 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -1,6 +1,7 @@ - * Copyright (C) 2003 Éric Seigne + * Copyright (C) 2003 Éric Seigne + * Copyright (C) 2004 Laurent Destailleur * * 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 ''; + print '
'; print '"; + $var=!$var; + + print ""; print ''; - print ""; + print ""; $i++; } $db->free(); @@ -122,58 +145,61 @@ if ( $societe->fetch($socid) ) */ print ''; print '
'; /* * */ - print ''; - print ''; + print '
Tél'.dolibarr_print_phone($societe->tel).' fax'.dolibarr_print_phone($societe->fax).' 
'; + print ''; print ''; + print ''; + print ""; print '
Nom'.$societe->nom.'
Adresse'.nl2br($societe->adresse).'
'.$societe->cp.' '.$societe->ville.'
Tél'.dolibarr_print_phone($societe->tel).' Fax'.dolibarr_print_phone($societe->fax).' 
Weburl\">$societe->url 
'; /* @@ -99,13 +121,14 @@ if ( $societe->fetch($socid) ) while ($i < $num && $i < 5) { $obj = $db->fetch_object( $i); - $tag = !$tag; - print "
'; print ''; print img_file(); print $obj->facnumber.' '.$obj->libelle.'".strftime("%d %b %Y", $obj->df) ."
".dolibarr_print_date($obj->df)."
' . "
\n"; + print '
'; + /* + * Boutons Actions + */ + print '
'; + + print ''.translate("Créer Facture").''; + + print 'Ajouter un contact'; + + + print '
'; + /* * * Liste des contacts * */ - print ''; + print '
'; - print ""; + print ""; print ''; print ""; - print ""; + print ""; $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 ""; - } - else - { - print ""; - } + $var = !$var; + + print ""; + print ""; print ""; print ''; print ''; print ''; - print ""; + print ""; print "\n"; $i++; - $tag = !$tag; } - print "
Prénom Nom
Prénom NomPosteTélFaxEmailid&action=addcontact\">Ajouter
Ajouter
$obj->firstname $obj->name"; if ($obj->note) { - print "
".nl2br($obj->note); + print "
".nl2br($obj->note); } print "
$obj->poste '.$obj->phone.' '.$obj->fax.' '.$obj->email.' id&action=editcontact&contactid=$obj->idp\">Modifieridp\">".img_edit()."
"; - /* - * - */ - print '
'; - print 'Nouvelle Facture'; - print '
'; - + print "
"; + } else { diff --git a/htdocs/soc.php b/htdocs/soc.php index 6d60c9ac2ed..791eb2adc25 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -319,7 +319,6 @@ else print 'Ajouter un contact'; - print 'Notifications'; print ''; /* *