From a265190a41af056d3f697fc673e3dc41abbf46b8 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 15 May 2003 19:31:47 +0000 Subject: [PATCH] Ajout liens sur les actions commerciales --- htdocs/comm/fiche.php3 | 156 +++++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 69 deletions(-) diff --git a/htdocs/comm/fiche.php3 b/htdocs/comm/fiche.php3 index 85c03a512e1..5dde7b57846 100644 --- a/htdocs/comm/fiche.php3 +++ b/htdocs/comm/fiche.php3 @@ -170,11 +170,14 @@ if ($socid > 0) { print "sirensiren\">$objsoc->siren "; print "prefix"; - if ($objsoc->prefix_comm) { - print $objsoc->prefix_comm; - } else { - print "[idp&action=attribute_prefix\">Attribuer]"; - } + if ($objsoc->prefix_comm) + { + print $objsoc->prefix_comm; + } + else + { + print "[idp&action=attribute_prefix\">Attribuer]"; + } print ""; @@ -303,9 +306,10 @@ if ($socid > 0) { //print ' '; print ''.$obj->firstname.' '. $obj->name.' '; - if ($obj->note) { - print "
".nl2br($obj->note); - } + if ($obj->note) + { + print "
".nl2br($obj->note); + } print ""; print "$obj->poste "; print ''.$obj->phone.' '; @@ -413,70 +417,84 @@ if ($socid > 0) { $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 "\n"; - - $i = 0 ; - $num = $db->num_rows(); - $oldyear=''; - $oldmonth=''; - while ($i < $num) { - $var = !$var; - - $obj = $db->fetch_object( $i); - 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); - } + if ( $db->query($sql) ) + { + print "
|" .strftime("%Y",$obj->da)."|" .strftime("%b",$obj->da)."
\n"; - print "\n"; - print "\n"; - - print ''; - - if ($obj->propalrowid) { - print ''; - } else { - 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++; + $i = 0 ; + $num = $db->num_rows(); + $oldyear=''; + $oldmonth=''; + while ($i < $num) + { + $var = !$var; + + $obj = $db->fetch_object( $i); + 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"; + + print ''; + + if ($obj->propalrowid) + { + print ''; + } + else + { + 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++; + } + print "
" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." '.$obj->libelle.''.$obj->libelle.''.$contact->fullname.' '.$obj->code.'
|" .strftime("%Y",$obj->da)."|" .strftime("%b",$obj->da)."" .strftime("%d",$obj->da)."" .strftime("%H:%M",$obj->da)." '.$obj->libelle.''.$obj->libelle.''.$contact->fullname.' '.$obj->code.'
"; + + $db->free(); + } + else + { + print $db->error(); } - print ""; - - $db->free(); - } else { - print $db->error(); - } print ""; - - - + /*