From 7de522e68fcb30a0a561e5004e41c3fe59bc5f5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 11 Mar 2006 02:04:07 +0000 Subject: [PATCH] =?UTF-8?q?Uniformisation=20code=20liste=20des=20actions?= =?UTF-8?q?=20=E0=20faire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/fiche.php | 5 +- htdocs/comm/prospect/fiche.php | 522 ++++++++++++++++----------------- htdocs/compta/fiche.php | 103 ++++--- 3 files changed, 315 insertions(+), 315 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 3c38ab76be2..40acfebd47c 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -45,11 +45,12 @@ $langs->load("bills"); $langs->load("contracts"); if ($conf->fichinter->enabled) $langs->load("interventions"); -// Protection quand utilisateur externe -$socidp = isset($_GET["socid"])?$_GET["socid"]:''; +$user->getrights("commercial"); +$socidp = isset($_GET["socid"])?$_GET["socid"]:''; if ($socidp == '') accessforbidden(); +// Protection quand utilisateur externe if ($user->societe_id > 0) { $socidp = $user->societe_id; diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 4c7f7a4f651..5ce1125b6bd 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 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 @@ -39,12 +39,23 @@ $user->getrights('propale'); $user->getrights('fichinter'); $user->getrights('commande'); $user->getrights('projet'); - +$user->getrights("commercial"); $socid = isset($_GET["id"])?$_GET["id"]:$_GET["socid"]; // Fonctionne si on passe id ou socid - if ($socid == '') accessforbidden(); +// Protection quand utilisateur externe +if ($user->societe_id > 0) +{ + $socid = $user->societe_id; +} + + + +/* + * Actions + */ + if ($_GET["action"] == 'cstc') { $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm = ".$_GET["stcomm"]; @@ -52,14 +63,6 @@ if ($_GET["action"] == 'cstc') $db->query($sql); } -/* - * Sécurité si un client essaye d'accéder à une autre fiche que la sienne - */ -if ($user->societe_id > 0) -{ - $socid = $user->societe_id; -} - // Protection restriction commercial if (!$user->rights->commercial->client->voir && $socid && !$user->societe_id > 0) { @@ -73,7 +76,6 @@ if (!$user->rights->commercial->client->voir && $socid && !$user->societe_id > 0 } } -llxHeader(); /********************************************************************************* * @@ -81,6 +83,9 @@ llxHeader(); * * *********************************************************************************/ + +llxHeader(); + if ($socid > 0) { $societe = new Societe($db, $socid); @@ -186,57 +191,62 @@ if ($socid > 0) print ''; print ''; - print ''; - /* - * - */ print "\n"; print ''; - /* - * - * Propales - * - */ - $var = true; - 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"; + // Nbre max d'éléments des petites listes + $MAXLIST=5; + $tableaushown=0; - if ( $db->query($sql) ) + + /* + * Liste de propales + * + */ + print '
'; + $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.remise,"; + $sql.= " ".$db->pdate("p.datep")." as dp, ".$db->pdate("p.fin_validite")." as datelimite,"; + $sql.= " 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"; + $sql.= " WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; + $sql.= " AND s.idp = ".$societe->id; + $sql.= " ORDER BY p.datep DESC"; + + $resql=$db->query($sql); + if ($resql) { - $num = $db->num_rows(); - if ($num >0 ) + $var=true; + $i = 0; + $num = $db->num_rows($resql); + if ($num > 0) { - print "'; - $var=!$var; + $tableaushown=1; + print ''; + print ''; + print ''; } - $i = 0; $now = time(); $lim = 3600 * 24 * 15 ; - while ($i < $num && $i < 2) + + while ($i < $num && $i < $MAXLIST) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($resql); + $var=!$var; print ""; print "\n"; + if ($objp->datelimite < (time() - $conf->propale->warning_delay)) print img_warning($langs->trans("Late")); + print "\n"; print "\n"; - print "\n"; - $var=!$var; + print "\n"; $i++; } $db->free(); } + else + { + dolibarr_print_error($db); + } print "
"; - print ''; - print ''; - print '
'.$langs->trans("LastProposals").''.$langs->trans("AllPropals").' ('.$num.')
'; - print '
'.$langs->trans("LastPropals",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllPropals").' ('.$num.')
propalid\">"; print img_object($langs->trans("ShowPropal"),"propal"); print " $objp->ref\n"; - if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 ) - { - print " > 15 jours"; - } - print "".strftime("%d %B %Y",$objp->dp)."".dolibarr_print_date($objp->dp,"%d %B %Y")."".price($objp->price)."$objp->statut
".$objp->statut."
"; @@ -269,295 +279,277 @@ if ($socid > 0) print '
'; - /* - * - * Liste des contacts - * - */ - if (defined("MAIN_MODULE_CLICKTODIAL") && MAIN_MODULE_CLICKTODIAL==1) + + + if ($conf->clicktodial->enabled) { $user->fetch_clicktodial(); // lecture des infos de clicktodial } - 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"; - $sql.= " WHERE p.fk_soc = $societe->id ORDER by p.datec"; - $result = $db->query($sql); - $i = 0 ; $num = $db->num_rows(); $tag = True; - while ($i < $num) - { - $obj = $db->fetch_object($result); - $var = !$var; - print ""; - - print '"; - print ""; - - print '
'.$langs->trans("Firstname").' '.$langs->trans("Name").'Poste'.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").' 
'; - - print ''; - print img_object($langs->trans("ShowContact"),"contact").' '.$obj->firstname.' '. $obj->name.' '; - - if ($obj->note) - { - print "
".nl2br($obj->note); - } - print "
$obj->poste '; /* - * Lien click to dial - */ + * + * Liste des contacts + * + */ + print ''; + + print ''; + print ''; + print ''; + print ""; + print ''; + print ""; - if (strlen($obj->phone) && $user->clicktodial_enabled == 1) - { - print ''; - print img_phone_out("Appel émis") ; - } - 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"; + $sql.= " WHERE p.fk_soc = ".$societe->id; + $sql.= " ORDER by p.datec"; - print ''; - print ''; - print ''; - print "'; - print "\n"; - $i++; - $tag = !$tag; - } - print "
'.$langs->trans("Firstname").' '.$langs->trans("Lastname").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").'  
'; - - print ' '.dolibarr_print_phone($obj->phone).' '.$obj->fax.' '.$obj->email.' "; - print ''; - print img_edit(); - print '
"; - - /* - * Listes des actions a faire - */ - $var=true; - print '
'; - print ''; - print ''; - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid, a.note "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $societe->id "; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent < 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; - - $resql=$db->query($sql); - if ($resql) - { - $i = 0 ; $num = $db->num_rows($resql); + $result = $db->query($sql); + $i = 0 ; $num = $db->num_rows($result); + $var=1; while ($i < $num) { + $obj = $db->fetch_object($result); $var = !$var; - $obj = $db->fetch_object($resql); - print ""; - if ($oldyear == strftime("%Y",$obj->da) ) - { - //print ''; - print '\n"; - } - else - { - print '\n"; - $oldyear = strftime("%Y",$obj->da); - } + print '\n"; - } - else - { - print "\n"; - $oldmonth = strftime("%Y%b",$obj->da); - } - - print "\n"; - print "\n"; - - print ''; - - - print ''; + print ''; + print ''; + + print ''; + print ''; + + print ''; + + print ''; - /* - * Contact pour cette action - * - */ - print ''; - } - else - { - print ' '; - } - /* - * - */ - print ''; print "\n"; - - if ($obj->note) - { - print ""; - print ''; - } - $i++; + $tag = !$tag; } print "
'.$langs->trans("ActionsToDo").'
|' .strftime("%Y",$obj->da)."' .strftime("%Y",$obj->da)."'; + print ''.img_object($langs->trans("ShowContact"),"contact").' '.$obj->firstname.' '. $obj->name.' '; - if ($oldmonth == strftime("%Y%b",$obj->da) ) + if (trim($obj->note)) { - print '' .strftime("%b",$obj->da)."" .strftime("%b",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." '; - if ($obj->propalrowid) - { - print ''; - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ''; - } - else - { - print ''.img_object($langs->trans("ShowAction"),"task").' '; - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ''; + print '
'.nl2br(trim($obj->note)); } print '
'.$obj->poste.' '.$obj->phone; + + if (strlen($obj->phone) && $user->clicktodial_enabled == 1) + { + print ''; + print img_phone_out("Appel émis") ; + } + print ''.$obj->fax.' '.$obj->email.' '; + + if ($user->rights->societe->contact->creer) + { + print "idp\">"; + print img_edit(); + print ''; + } + else print ' '; + + print ''; + print img_object($langs->trans("Rendez-Vous"),"action"); + print ''; - if ($obj->fk_contact) - { - $contact = new Contact($db); - $contact->fetch($obj->fk_contact); - print ''.$contact->fullname.''; - print ''; - print $obj->code.'
 '.stripslashes($obj->note).'
"; - $db->free($resql); - } - else - { - dolibarr_print_error($db); - } + print "
"; - /* - * Listes des actions effectuees - */ - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid, a.note "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $societe->id "; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent = 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; - $resql=$db->query($sql); - if ($resql) - { - $i = 0 ; - $num = $db->num_rows($resql); + /* + * Listes des actions a faire + * + */ + print ''; + print ''; - if ($num) + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql .= " WHERE a.fk_soc = ".$societe->id; + $sql .= " AND u.rowid = a.fk_user_author"; + $sql .= " AND c.id=a.fk_action AND a.percent < 100"; + $sql .= " ORDER BY a.datea DESC, a.id DESC"; + + $result=$db->query($sql); + if ($result) { - print '
'; - - print '
'.$langs->trans("ActionsToDo").' 
'; - print ''; - print ''; - print '
'.$langs->trans("ActionsDone").'
'; - - print ''; - - $oldyear=''; - $oldmonth=''; + $i = 0 ; + $num = $db->num_rows($result); + $var=true; + while ($i < $num) { $var = !$var; - $obj = $db->fetch_object($resql); + $obj = $db->fetch_object($result); print ""; if ($oldyear == strftime("%Y",$obj->da) ) { - print ''; + print ''; } else { - print "\n"; + print '\n"; $oldyear = strftime("%Y",$obj->da); } if ($oldmonth == strftime("%Y%b",$obj->da) ) { - print ''; + print ''; } else { - print "\n"; + print '\n"; $oldmonth = strftime("%Y%b",$obj->da); } - print "\n"; - print "\n"; + print '\n"; + print '\n"; + if (date("U",$obj->da) < time()) + { + print ""; + } + else + { + print ''; + } - print ''; + // Status/Percent + print ''; - print ''; } else { - print ''.img_object($langs->trans("ShowTask"),"task").' '.$obj->libelle.''; + print ''; } - print ''; - /* - * Contact pour cette action - * - */ + print ""; + + // Contact pour cette action + if ($obj->fk_contact) { + $contact = new Contact($db); + $contact->fetch($obj->fk_contact); + print ''; + } else { + print ''; + } + + print ''; + print "\n"; + $i++; + } + + $db->free($result); + } else { + dolibarr_print_error($db); + } + print "
||" .strftime("%Y",$obj->da)."'.strftime("%Y",$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)."".img_warning("Late")."   '; if ($obj->propalrowid) { - print ''.img_file().' '.$obj->libelle.''; + print ''.img_object($langs->trans("ShowAction"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print ''.img_object($langs->trans("ShowAction"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print '$obj->label'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' '.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'

"; + + /* + * Listes des actions effectuées + */ + print ''; + print ''; + + $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql .= " WHERE a.fk_soc = ".$societe->id; + $sql .= " AND u.rowid = a.fk_user_author"; + $sql .= " AND c.id=a.fk_action AND a.percent = 100"; + $sql .= " ORDER BY a.datea DESC, a.id DESC"; + + $result=$db->query($sql); + if ($result) + { + $i = 0 ; + $num = $db->num_rows($result); + $var=true; + + while ($i < $num) + { + $var = !$var; + + $obj = $db->fetch_object($result); + print ""; + + if ($oldyear == strftime("%Y",$obj->da) ) { + print ''; + } else { + print '\n"; + $oldyear = strftime("%Y",$obj->da); + } + + if ($oldmonth == strftime("%Y%b",$obj->da) ) { + print ''; + } else { + print '\n"; + $oldmonth = strftime("%Y%b",$obj->da); + } + + print '\n"; + print '\n"; + + // Espace + print ''; + + // Action + print ''; + + print ''; + + // Contact pour cette action if ($obj->fk_contact) { $contact = new Contact($db); $contact->fetch($obj->fk_contact); - print ''; + print ''; } else { - print ''; + print ''; } - /* - */ - print ''; + + print ''; print "\n"; - - if ($i < 2 && strlen($obj->note)) - { - print ""; - print ''; - } - $i++; } - print "
'.$langs->trans("ActionsDone").'
|'.strftime("%Y",$obj->da)."|'.strftime("%b",$obj->da)."'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)." '; + print ''.img_object($langs->trans("ShowTask"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print ''; + print ''; + if ($obj->propalrowid) + { + print ''.img_object($langs->trans("ShowPropal"),"propal"); + print $langs->trans("Propal"); + print ''; + } + else print ' '; + print ''.$contact->fullname.''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'  '.$obj->code.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'
 '; - print stripslashes(nl2br($obj->note)); - print '
"; - print "
"; + $db->free(); } - $db->free(); - } - else - { - dolibarr_print_error($db); - } - + else + { + dolibarr_print_error($db); + } + print "
"; } $db->close(); diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 176f395ff69..ef68508eb9e 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -36,32 +36,33 @@ $langs->load("companies"); if ($conf->facture->enabled) $langs->load("bills"); if ($conf->projet->enabled) $langs->load("projects"); -// Sécurité accés client -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$user->getrights("commercial"); +$socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($socid == '') accessforbidden(); +// Protection quand utilisateur externe if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; } + // Protection restriction commercial if (!$user->rights->commercial->client->voir && $socid && !$user->societe_id > 0) { - $sql = "SELECT sc.fk_soc, s.client"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."societe as s"; - $sql .= " WHERE fk_soc = ".$socid." AND fk_user = ".$user->id." AND s.client = 1"; - - if ( $db->query($sql) ) - { - if ( $db->num_rows() == 0) accessforbidden(); - } + //print "eeeee".$socid."rr".$user->societe_id."oo".$user->rights->commercial->client->voir; + $sql = "SELECT sc.fk_soc, s.client"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."societe as s"; + $sql .= " WHERE fk_soc = ".$socid." AND fk_user = ".$user->id." AND s.client = 1"; + + if ( $db->query($sql) ) + { + if ( $db->num_rows() == 0) accessforbidden(); + } } -$user->getrights('facture'); - if ($action == 'recontact') { @@ -221,7 +222,8 @@ if ($socid > 0) print ''.$langs->trans("Name").''.$societe->nom.''; - print ''.$langs->trans("Prefix").''; + // Prefix + print ''.$langs->trans("Prefix").''; print ($societe->prefix_comm?$societe->prefix_comm:' '); print ''; @@ -340,7 +342,7 @@ if ($socid > 0) { $tableaushown=1; print ''; - print '
'.$langs->trans("LastBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' ('.$num.')
'; + print '
'.$langs->trans("LastBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' ('.$num.')
'; print ''; } @@ -350,7 +352,7 @@ if ($socid > 0) $var=!$var; print ""; print "facid\">".img_object($langs->trans("ShowBill"),"bill")." ".$objp->facnumber."\n"; - if ($objp->df > 0 ) + if ($objp->df > 0) { print "".dolibarr_print_date($objp->df)."\n"; } @@ -405,7 +407,7 @@ if ($socid > 0) print ""; print ''.img_object($langs->trans("ShowProject"),"project")." ".$obj->title.''; - print "".strftime("%d %b %Y", $obj->do) .""; + print "".dolibarr_print_date($obj->do,"%d %b %Y") .""; $i++; } $db->free(); @@ -421,7 +423,7 @@ if ($socid > 0) if ($tableaushown) print '
'; print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("Summary").''.$langs->trans("ShowLog").'
'.$langs->trans("Summary").''.$langs->trans("ShowLog").'
'; @@ -484,14 +486,14 @@ if ($socid > 0) * Liste des contacts * */ - print ''; - - print ''; - print ''; - print ''; - print ""; - print ''; - print ""; + print '
'.$langs->trans("Firstname").' '.$langs->trans("Lastname").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").'  
'; + + 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"; @@ -638,7 +640,6 @@ if ($socid > 0) print "\n"; $i++; } - print "
'.$langs->trans("Firstname").' '.$langs->trans("Lastname").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").'  
"; $db->free($result); } else { @@ -650,7 +651,7 @@ if ($socid > 0) * Listes des actions effectuées */ print ''; - print ''; + print ''; $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; @@ -690,42 +691,48 @@ if ($socid > 0) print '\n"; print '\n"; + // Espace print ''; + // Action print ''; - } - else - { - print ''.img_object($langs->trans("ShowTask"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ''; - } + print ''.img_object($langs->trans("ShowTask"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print ''; + print ''; + + print ''; // Contact pour cette action - if ($obj->fk_contact) { + if ($obj->fk_contact) + { $contact = new Contact($db); $contact->fetch($obj->fk_contact); print ''; - } else { + } + else + { print ''; } - print ''; + print ''; print "\n"; $i++; } - $db->free(); - } else { + } + else + { dolibarr_print_error($db); } print "
'.$langs->trans("ActionsDone").'
'.$langs->trans("ActionsDone").'
'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)." '; - if ($obj->propalrowid) - { - print ''.img_object($langs->trans("ShowTask"),"task"); - $transcode=$langs->trans("Action".$obj->acode); - $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); - print $libelle; - print ''; + if ($obj->propalrowid) + { + print ''.img_object($langs->trans("ShowPropal"),"propal"); + print $langs->trans("Propal"); + print ''; + } + else print ' '; + print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' '.$obj->code.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'
";