From b21470b6f0b62b2eef2a6bb9b488ed413dda4e47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 30 Oct 2004 12:15:59 +0000 Subject: [PATCH] Trad: Traductions sur le module prospect --- htdocs/comm/fiche.php | 6 +-- htdocs/comm/index.php | 59 ++++++++++++++++--------- htdocs/comm/prospect/fiche.php | 81 +++++++++++++++++++--------------- 3 files changed, 86 insertions(+), 60 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index e73d1b41dad..16f9dbf74df 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -38,9 +38,9 @@ $user->getrights('fichinter'); $user->getrights('commande'); $user->getrights('projet'); - $langs->load("orders"); $langs->load("companies"); +$langs->load("contracts"); llxHeader(); @@ -656,7 +656,7 @@ if ($_socid > 0) */ if ($objsoc->note) { - print ''; + print '
'; print ""; print "
".nl2br($objsoc->note)."
"; } @@ -668,7 +668,7 @@ if ($_socid > 0) } } else { - print $db->error() . "
" . $sql; + dolibarr_print_error($db); } $db->close(); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index e6ced2b262d..0c655d0ecd3 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -20,7 +20,21 @@ * $Source$ * */ + +/*! + \file htdocs/comm/index.php + \ingroup commercial + \brief Page acceuil de la zone commercial + \version $Revision$ +*/ + require("./pre.inc.php"); +if ($conf->contrat->enabled) { + require_once("../contrat/contrat.class.php"); +} + +$langs->load("commercial"); +$langs->load("orders"); $user->getrights('propale'); $user->getrights('fichinter'); @@ -76,7 +90,7 @@ if ($_GET["action"] == 'del_bookmark') print_titre("Espace commercial"); -print ''; +print '
'; print '
'; @@ -87,7 +101,7 @@ print '
'; */ if ($conf->propal->enabled) { print '
'; - print ''; + print '
'; print ''; print "'; @@ -103,7 +117,7 @@ if ($conf->propal->enabled) { $i = 0; if ($num > 0 ) { - print '
Rechercher une proposition
"; print $langs->trans("Ref").' :  
'; + print '
'; print ""; print ""; @@ -137,7 +151,7 @@ if ($conf->commande->enabled) $num = $db->num_rows(); if ($num) { - print '
Propositions commerciales brouillons
'; + print '
'; print ''; print ''; $i = 0; @@ -177,9 +191,9 @@ if ( $db->query($sql) ) $i = 0; - print '
'.$langs->trans("OrdersToValid").'
'; + print '
'; print ""; - print ""; + print ""; print "\n"; while ($i < $num) @@ -197,9 +211,9 @@ if ( $db->query($sql) ) } } - print '"; print "
Bookmark".$langs->trans("Bookmark")."
'; + /* * Dernières actions commerciales effectuées * @@ -218,7 +232,7 @@ if ( $db->query($sql) ) { $num = $db->num_rows(); - print ''; + print '
'; print ''; $var = true; $i = 0; @@ -243,9 +257,10 @@ if ( $db->query($sql) ) } else { - print $db->error(); + dolibarr_print_error($db); } + /* * Actions commerciales a faire * @@ -265,8 +280,8 @@ if ( $db->query($sql) ) $num = $db->num_rows(); if ($num > 0) { - print '
Dernières actions effectuées
'; - print ''; + print '
Actions à faire
'; + print ''; $var = true; $i = 0; @@ -306,9 +321,7 @@ else */ if ($conf->contrat->enabled) { - $labelservice[0]="Hors service"; - $labelservice[1]="En service"; - $labelservice[2]="Cloturé"; + $langs->load("contracts"); $sql = "SELECT s.nom, s.idp, c.enservice, c.rowid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p WHERE c.fk_soc = s.idp and c.fk_product = p.rowid"; @@ -325,10 +338,12 @@ if ($conf->contrat->enabled) if ($num > 0) { - print '
'.$langs->trans("ActionsToDo").'
'; - print ''; + print '
Les 5 derniers contrats
'; + print ''; $i = 0; + $contrat=new Contrat($db); + $var=false; while ($i < $num) { @@ -336,7 +351,7 @@ if ($conf->contrat->enabled) print ""; print "\n"; - print "\n"; + print "\n"; $var=!$var; $i++; } @@ -345,7 +360,7 @@ if ($conf->contrat->enabled) } else { - print $db->error(); + dolibarr_print_error($db); } } @@ -370,7 +385,7 @@ if ($conf->propal->enabled) { $i = 0; if ($num > 0) { - print '
'.$langs->trans("LastContracts",5).'
rowid."\">".img_file()." "; print "rowid."\">".$obj->ref."idp\">$obj->nom".$labelservice[$obj->enservice]."
".$contrat->LibStatut($obj->enservice)."
'; + print '
'; print ''; $var=false; while ($i < $num) @@ -412,7 +427,7 @@ if ($conf->propal->enabled) { $num = $db->num_rows(); $i = 0; - print '
Les 5 dernières propositions commerciales ouvertes
'; + print '
'; print ''; $var=False; while ($i < $num) @@ -438,8 +453,8 @@ if ($conf->propal->enabled) { print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; print "\n"; $i++; $var=!$var; diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index e6364ccacf6..bd066228fc4 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -20,18 +20,28 @@ * $Source$ * */ + +/*! + \file htdocs/comm/prospect/fiche.php + \ingroup prospect + \brief Page de la fiche prospect + \version $Revision$ +*/ + require("./pre.inc.php"); require("../../contact.class.php"); require("../../cactioncomm.class.php"); require("../../actioncomm.class.php"); +$langs->load('companies'); + $user->getrights('propale'); $user->getrights('fichinter'); $user->getrights('commande'); $user->getrights('projet'); -$langs->load('companies'); +$socid = isset($_GET["id"])?$_GET["id"]:$_GET["socid"]; // Fonctionne si on passe id ou socid if ($_GET["action"] == 'cstc') { @@ -42,10 +52,7 @@ if ($_GET["action"] == 'cstc') llxHeader(); -/* - * - */ -$socid = isset($_GET["id"])?$_GET["id"]:$_GET["socid"]; // Fonctionne si on passe id ou socid + /* * Sécurité si un client essaye d'accéder à une autre fiche que la sienne */ @@ -53,6 +60,8 @@ if ($user->societe_id > 0) { $socid = $user->societe_id; } + + /********************************************************************************* * * Mode fiche @@ -81,6 +90,7 @@ if ($socid > 0) $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id; $head[$h][1] = 'Prospect'; + $hselected=$h; $h++; if (file_exists(DOL_DOCUMENT_ROOT.'/sl/')) @@ -97,19 +107,20 @@ if ($socid > 0) $h++; } $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; - $head[$h][1] = 'Note'; + $head[$h][1] = $langs->trans("Note"); $h++; if ($user->societe_id == 0) { $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; - $head[$h][1] = 'Documents'; + $head[$h][1] = $langs->trans("Documents"); $h++; } $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; - $head[$h][1] = 'Notifications'; + $head[$h][1] = $langs->trans("Notifications"); - dolibarr_fiche_head($head, 1, $societe->nom); + + dolibarr_fiche_head($head, $hselected, $societe->nom); /* * @@ -117,10 +128,10 @@ if ($socid > 0) */ print '
Les 5 dernières propositions commerciales fermées
"; print strftime("%e %b %Y",$objp->dp)."".price($objp->price)."$objp->statut".price($objp->price)."$objp->statut
'; print '
'; - print ''; + print '
'; - print ""; - print '"; + print ""; + print '"; print ''; print ''; @@ -153,7 +164,7 @@ if ($socid > 0) print ''; print ''; - print "
Téléphone".dolibarr_print_phone($societe->tel)." fax".dolibarr_print_phone($societe->fax)." 
Adresse'.nl2br($societe->address)."
$societe->cp $societe->ville
".$langs->trans("Phone")."".dolibarr_print_phone($societe->tel)." fax".dolibarr_print_phone($societe->fax)." 
'.$langs->trans("Address").''.nl2br($societe->address)."
$societe->cp $societe->ville
Siret'.$societe->siret.'Capital'.$societe->capital.'
"; + print "

"; /* * @@ -167,7 +178,7 @@ if ($socid > 0) * */ $var = true; - print ''; + print '
'; $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.remise, ".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; $sql .= " AND s.idp = $societe->id ORDER BY p.datep DESC"; @@ -202,12 +213,11 @@ if ($socid > 0) } print "
"; - /* - * - * - */ + print "
\n\n"; + + /* * Barre d'action * @@ -233,7 +243,7 @@ if ($socid > 0) * Liste des contacts * */ - print ''; + print '
'; print ''; print ''; @@ -287,8 +297,8 @@ if ($socid > 0) * Listes des actions a faire * */ - print '
'.$langs->trans("Firstname").' '.$langs->trans("Name").'Poste'.$langs->trans("Tel").'
'; - print ''; + print '
Actions à faire [Nouvelle action]
'; + print ''; print ''; print '
'.$langs->trans("ActionsToDo").' ['.$langs->trans("AddAction").']
'; @@ -300,7 +310,7 @@ if ($socid > 0) $sql .= " ORDER BY a.datea DESC, a.id DESC"; if ( $db->query($sql) ) { - print "\n"; + print "
\n"; $i = 0 ; $num = $db->num_rows(); while ($i < $num) { @@ -313,27 +323,27 @@ if ($socid > 0) if ($oldyear == strftime("%Y",$obj->da) ) { //print ''; - print '\n"; + print '\n"; } else { - print '\n"; + print '\n"; $oldyear = strftime("%Y",$obj->da); } if ($oldmonth == strftime("%Y%b",$obj->da) ) { // print ''; - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; $oldmonth = strftime("%Y%b",$obj->da); } - print "\n"; - print "\n"; + print "\n"; + print "\n"; print ''; @@ -349,6 +359,7 @@ if ($socid > 0) print ''.$obj->libelle.''; } print ''; + /* * Contact pour cette action * @@ -374,7 +385,7 @@ if ($socid > 0) $db->free(); } else { - print $db->error(); + dolibarr_print_error($db); } print "
|' .strftime("%Y",$obj->da)."' .strftime("%Y",$obj->da)."' .strftime("%Y",$obj->da)."' .strftime("%Y",$obj->da)."|" .strftime("%b",$obj->da)."" .strftime("%b",$obj->da)."" .strftime("%b",$obj->da)."" .strftime("%b",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." 
"; @@ -399,7 +410,7 @@ if ($socid > 0) { print ''; - print ''; + print ''; print ''; print '\n"; + print "\n"; $oldyear = strftime("%Y",$obj->da); } @@ -430,7 +441,7 @@ if ($socid > 0) } else { - print "\n"; + print "\n"; $oldmonth = strftime("%Y%b",$obj->da); } @@ -486,7 +497,7 @@ if ($socid > 0) } else { - print $db->error(); + dolibarr_print_error($db); } /* @@ -496,7 +507,7 @@ if ($socid > 0) */ if (strlen(trim($societe->note))) { - print '
Actions effectuées
'.$langs->trans("ActionsDone").'
'; @@ -420,7 +431,7 @@ if ($socid > 0) } else { - print "" .strftime("%Y",$obj->da)."" .strftime("%Y",$obj->da)."" .strftime("%b",$obj->da)."" .strftime("%b",$obj->da)."
'; + print '
'; print ""; print "
".nl2br($societe->note)."
"; } @@ -510,7 +521,7 @@ if ($socid > 0) } else { - print $db->error() . "
" . $sql; + dolibarr_print_error($db); } } else