From 97b4e23405e675be16508f5ba0dfdc7179ab6621 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 4 Jan 2005 09:37:53 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20de=20presentation=20des=20action?= =?UTF-8?q?s=20=E0=20faire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/prospect/fiche.php | 175 ++++++++++++++++++--------------- 1 file changed, 93 insertions(+), 82 deletions(-) diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 304bc17f078..85190cef591 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -224,6 +224,9 @@ if ($socid > 0) print '
'; + print ''.$langs->trans("AddAction").''; + + if ($conf->propal->enabled && defined("MAIN_MODULE_PROPALE") && MAIN_MODULE_PROPALE && $user->rights->propale->creer) { print 'Créer une proposition'; @@ -297,96 +300,105 @@ if ($socid > 0) * */ print ''; - print ''; - print ''; - print ''; + $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"; - if ( $db->query($sql) ) { - print "
'.$langs->trans("ActionsToDo").' ['.$langs->trans("AddAction").']
'; - - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + print '
'.$langs->trans("ActionsToDo").'
\n"; - - $i = 0 ; $num = $db->num_rows(); - while ($i < $num) { - $var = !$var; - - $obj = $db->fetch_object(); - - print ""; - - if ($oldyear == strftime("%Y",$obj->da) ) - { - //print ''; - print '\n"; - } - else - { - print '\n"; - $oldyear = strftime("%Y",$obj->da); - } - - if ($oldmonth == strftime("%Y%b",$obj->da) ) - { - // print ''; - print "\n"; - } - else - { - print "\n"; - $oldmonth = strftime("%Y%b",$obj->da); - } + if ( $db->query($sql) ) + { - print "\n"; - print "\n"; - - print ''; - - - print ''; + $var = !$var; + + $obj = $db->fetch_object(); + + print ""; + + if ($oldyear == strftime("%Y",$obj->da) ) + { + //print ''; + print '\n"; + } + else + { + print '\n"; + $oldyear = strftime("%Y",$obj->da); + } + + if ($oldmonth == strftime("%Y%b",$obj->da) ) + { + print '\n"; + } + else + { + print "\n"; + $oldmonth = strftime("%Y%b",$obj->da); + } + + print "\n"; + print "\n"; + + print ''; + + + print ''; + + /* + * Contact pour cette action + * + */ + print ''; + } + else + { + print ' '; + } + /* + * + */ + print ''; + print "\n"; - /* - * Contact pour cette action - * - */ - if ($obj->fk_contact) - { - $contact = new Contact($db); - $contact->fetch($obj->fk_contact); - print ''; + if ($obj->note) + { + print ""; + print ''; + } + + $i++; } - else - { - print ''; - } - /* - */ - print ''; - print "\n"; - $i++; + 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)." '; - if ($obj->propalrowid) + $i = 0 ; $num = $db->num_rows(); + while ($i < $num) { - print ''.$obj->libelle.''; - } - else - { - print ''.img_file().' '; - print ''.$obj->libelle.''; - } - 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)." '; + if ($obj->propalrowid) + { + print ''.$obj->libelle.''; + } + else + { + print ''.img_file().' '; + print ''.$obj->libelle.''; + } + print ''; + if ($obj->fk_contact) + { + $contact = new Contact($db); + $contact->fetch($obj->fk_contact); + print ''.$contact->fullname.''; + print ''; + print $obj->code.'
'.$contact->fullname.'
 '.stripslashes($obj->note).'
 '.$obj->code.'
"; + + $db->free(); } - print ""; - - $db->free(); - } else { - dolibarr_print_error($db); - } - print ""; - + else + { + dolibarr_print_error($db); + } + /* * * Listes des actions effectuees @@ -406,13 +418,12 @@ if ($socid > 0) if ($num) { - print ''; print ''; print ''; print '
'.$langs->trans("ActionsDone").'
'; - print ''; + print '
'; $oldyear=''; $oldmonth='';