Ajout liens sur les actions commerciales

This commit is contained in:
Rodolphe Quiedeville 2003-05-15 19:31:47 +00:00
parent 08467fb2ef
commit a265190a41

View File

@ -170,9 +170,12 @@ if ($socid > 0) {
print "<tr><td>siren</td><td><a href=\"http://www.societe.com/cgi-bin/recherche?rncs=$objsoc->siren\">$objsoc->siren</a>&nbsp;</td>"; print "<tr><td>siren</td><td><a href=\"http://www.societe.com/cgi-bin/recherche?rncs=$objsoc->siren\">$objsoc->siren</a>&nbsp;</td>";
print "<td>prefix</td><td>"; print "<td>prefix</td><td>";
if ($objsoc->prefix_comm) { if ($objsoc->prefix_comm)
{
print $objsoc->prefix_comm; print $objsoc->prefix_comm;
} else { }
else
{
print "[<a href=\"$PHP_SELF?socid=$objsoc->idp&action=attribute_prefix\">Attribuer</a>]"; print "[<a href=\"$PHP_SELF?socid=$objsoc->idp&action=attribute_prefix\">Attribuer</a>]";
} }
@ -303,7 +306,8 @@ if ($socid > 0) {
//print '<img border="0" src="/theme/'.$conf->theme.'/img/filenew.png"></a>&nbsp;'; //print '<img border="0" src="/theme/'.$conf->theme.'/img/filenew.png"></a>&nbsp;';
print '<a href="action/fiche.php3?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->firstname.' '. $obj->name.'</a>&nbsp;'; print '<a href="action/fiche.php3?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->idp.'">'.$obj->firstname.' '. $obj->name.'</a>&nbsp;';
if ($obj->note) { if ($obj->note)
{
print "<br>".nl2br($obj->note); print "<br>".nl2br($obj->note);
} }
print "</td>"; print "</td>";
@ -413,29 +417,37 @@ if ($socid > 0) {
$sql .= " AND c.id=a.fk_action AND a.percent = 100"; $sql .= " AND c.id=a.fk_action AND a.percent = 100";
$sql .= " ORDER BY a.datea DESC, a.id DESC"; $sql .= " ORDER BY a.datea DESC, a.id DESC";
if ( $db->query($sql) ) { if ( $db->query($sql) )
{
print "<table width=\"100%\" cellspacing=0 border=0 cellpadding=2>\n"; print "<table width=\"100%\" cellspacing=0 border=0 cellpadding=2>\n";
$i = 0 ; $i = 0 ;
$num = $db->num_rows(); $num = $db->num_rows();
$oldyear=''; $oldyear='';
$oldmonth=''; $oldmonth='';
while ($i < $num) { while ($i < $num)
{
$var = !$var; $var = !$var;
$obj = $db->fetch_object( $i); $obj = $db->fetch_object( $i);
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
if ($oldyear == strftime("%Y",$obj->da) ) { if ($oldyear == strftime("%Y",$obj->da) )
{
print '<td align="center">|</td>'; print '<td align="center">|</td>';
} else { }
else
{
print "<TD align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n"; print "<TD align=\"center\">" .strftime("%Y",$obj->da)."</TD>\n";
$oldyear = strftime("%Y",$obj->da); $oldyear = strftime("%Y",$obj->da);
} }
if ($oldmonth == strftime("%Y%b",$obj->da) ) { if ($oldmonth == strftime("%Y%b",$obj->da) )
{
print '<td align="center">|</td>'; print '<td align="center">|</td>';
} else { }
else
{
print "<TD align=\"center\">" .strftime("%b",$obj->da)."</TD>\n"; print "<TD align=\"center\">" .strftime("%b",$obj->da)."</TD>\n";
$oldmonth = strftime("%Y%b",$obj->da); $oldmonth = strftime("%Y%b",$obj->da);
} }
@ -445,20 +457,26 @@ if ($socid > 0) {
print '<td width="10%">&nbsp;</td>'; print '<td width="10%">&nbsp;</td>';
if ($obj->propalrowid) { if ($obj->propalrowid)
{
print '<td width="40%"><a href="propal.php3?propalid='.$obj->propalrowid.'">'.$obj->libelle.'</a></td>'; print '<td width="40%"><a href="propal.php3?propalid='.$obj->propalrowid.'">'.$obj->libelle.'</a></td>';
} else { }
print '<td width="40%">'.$obj->libelle.'</td>'; else
{
print '<td width="40%"><a href="action/fiche.php3?id='.$obj->id.'">'.$obj->libelle.'</a></td>';
} }
/* /*
* Contact pour cette action * Contact pour cette action
* *
*/ */
if ($obj->fk_contact) { if ($obj->fk_contact)
{
$contact = new Contact($db); $contact = new Contact($db);
$contact->fetch($obj->fk_contact); $contact->fetch($obj->fk_contact);
print '<td width="40%"><a href="people.php3?socid='.$objsoc->idp.'&contactid='.$contact->id.'">'.$contact->fullname.'</a></td>'; print '<td width="40%"><a href="people.php3?socid='.$objsoc->idp.'&contactid='.$contact->id.'">'.$contact->fullname.'</a></td>';
} else { }
else
{
print '<td width="40%">&nbsp;</td>'; print '<td width="40%">&nbsp;</td>';
} }
/* /*
@ -470,15 +488,15 @@ if ($socid > 0) {
print "</table>"; print "</table>";
$db->free(); $db->free();
} else { }
else
{
print $db->error(); print $db->error();
} }
print "</td></tr></table>"; print "</td></tr></table>";
/* /*
* *
* Notes sur la societe * Notes sur la societe