New: Ajout d'un visuel spcifique pour les liens "contacts" et "socits".

This commit is contained in:
Laurent Destailleur 2005-01-30 17:53:51 +00:00
parent 85996e73c5
commit f6364f2d8f
4 changed files with 32 additions and 35 deletions

View File

@ -181,12 +181,12 @@ if ($result)
$var=!$var;
print "<tr $bc[$var]>";
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->idp.'">'.img_file();
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->idp.'">'.img_object($langs->trans("ShowContact"),"contact");
print '</a>&nbsp;<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->name.'</a></td>';
print "<td>$obj->firstname</TD>";
print '<td><a href="contact.php?type='.$type.'&socid='.$obj->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filter.png" border="0" alt="filtrer"></a>&nbsp;';
print "<a href=\"".$urlfiche."?socid=$obj->idp\">$obj->nom</A></td>\n";
print '<td><a href="contact.php?type='.$type.'&socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").'</a>&nbsp;';
print "<a href=\"".$urlfiche."?socid=$obj->idp\">$obj->nom</a></td>\n";
print '<td><a href="action/fiche.php?action=create&actionid=4&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.$obj->email.'</a>&nbsp;</td>';

View File

@ -224,7 +224,7 @@ if ($_socid > 0)
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($objsoc->tel).'&nbsp;</td><td>Fax</td><td>'.dolibarr_print_phone($objsoc->fax).'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$objsoc->url\">$objsoc->url</a>&nbsp;</td></tr>";
print "<tr><td>".$langs->trans("ProfIdSiren")."</td><td><a href=\"http://www.societe.com/cgi-bin/recherche?rncs=$objsoc->siren\">$objsoc->siren</a>&nbsp;</td>";
print "<tr><td nowrap>".$langs->trans("ProfIdSiren")."</td><td><a href=\"http://www.societe.com/cgi-bin/recherche?rncs=$objsoc->siren\">$objsoc->siren</a>&nbsp;</td>";
print '<td>'.$langs->trans("Prefix").'</td><td>';
if ($objsoc->prefix_comm)
{
@ -238,7 +238,7 @@ if ($_socid > 0)
print "</td></tr>";
print "<tr><td>".$langs->trans("Type")."</td><td> $objsoc->typent</td><td>Effectif</td><td>$objsoc->effectif</td></tr>";
print '<tr><td>';
print '<tr><td nowrap>';
print $langs->trans("CustomerDiscount").'</td><td>'.$objsoc->remise_client."&nbsp;%</td>";
print '<td colspan="2"><a href="remise.php?id='.$objsoc->id.'">';
print img_edit($langs->trans("Modify"));
@ -498,7 +498,7 @@ if ($_socid > 0)
print '<td>';
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->idp.'">';
print img_file();
print img_object($langs->trans("Show"),"contact");
print '&nbsp;'.$obj->firstname.' '. $obj->name.'</a>&nbsp;';
if ($obj->note)
@ -529,7 +529,7 @@ if ($_socid > 0)
print '</a></td>';
print '<td align="center"><a href="action/fiche.php?action=create&actionid=5&contactid='.$obj->idp.'&socid='.$objsoc->id.'">';
print img_actions();
print img_object($langs->trans("Rendez-Vous"),"action");
print '</a></td>';
print "</tr>\n";

View File

@ -84,7 +84,7 @@ if ($_socid > 0)
$dac = strftime("%Y-%m-%d %H:%M", time());
if ($errmesg)
{
print "<b>$errmesg</b><br>";
print '<div class="error">'.$errmesg.'</div><br>';
}
/*
@ -136,14 +136,8 @@ if ($_socid > 0)
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id;
$head[$h][1] = $langs->trans("Notifications");
if (file_exists(DOL_DOCUMENT_ROOT.'/sl/'))
{
$head[$h][0] = DOL_URL_ROOT.'/sl/fiche.php?id='.$objsoc->id;
$head[$h][1] = 'Fiche catalogue';
$h++;
}
$h++;
if ($user->societe_id == 0)
{
$head[$h][0] = DOL_URL_ROOT."/comm/index.php?socidp=$objsoc->id&action=add_bookmark";
@ -161,15 +155,17 @@ if ($_socid > 0)
print '<input type="hidden" name="action" value="setremise">';
print '<table width="100%" border="0">';
print '<tr><td valign="top">';
print '<table class="border" cellpadding="3" cellspacing="0" width="100%">';
print '<table class="border" width="100%">';
print '<tr><td colspan="2">';
print $langs->trans("CustomerDiscount").'</td><td colspan="2">'.$objsoc->remise_client."&nbsp;%</td></tr>";
print '<tr><td colspan="2">';
print $langs->trans("Modify").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.$objsoc->remise_client.'">&nbsp;%<input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
print $langs->trans("NewValue").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.$objsoc->remise_client.'">&nbsp;%</td></tr>';
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
print "</table></form>";
print "</table>";
print "</form>";
print "<br>";
@ -205,21 +201,24 @@ if ($_socid > 0)
/*
*
* Liste des projets associés
* Liste de l'historique des remises
*
*/
$sql = "SELECT rc.rowid,rc.remise_client,".$db->pdate("rc.datec")." as dc, u.code";
$sql .= " FROM ".MAIN_DB_PREFIX."societe_remise as rc";
$sql .= " , ".MAIN_DB_PREFIX."user as u";
$sql .= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE rc.fk_soc =". $objsoc->id;
$sql .= " AND u.rowid = rc.fk_user_author";
$sql .= " ORDER BY rc.datec DESC";
if ( $db->query($sql) )
{
print '<table class="border" cellspacing="0" width="100%" cellpadding="1">';
print '<table class="noborder" width="100%">';
$tag = !$tag;
print "<tr $bc[$tag]>";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>';
print '<td>'.$langs->trans("Discount").'</td>';
print '<td>'.$langs->trans("User").'</td>';
print '</tr>';
$i = 0 ;
$num = $db->num_rows();
@ -227,12 +226,11 @@ if ($_socid > 0)
{
$obj = $db->fetch_object( $i);
$tag = !$tag;
print "<tr $bc[$tag]>";
print '<td>'.strftime("%d %B %Y",$obj->dc).'</td>';
print '<tr '.$bc[$tag].'>';
print '<td>'.dolibarr_print_date($obj->dc,"%d %B %Y %H:%M").'</td>';
print '<td>'.$obj->remise_client.' %</td>';
print '<td>'.$obj->code.'</td>';
print "<td align=\"right\">".$obj->ref ."</td></tr>";
print '</tr>';
$i++;
}
$db->free();
@ -240,12 +238,9 @@ if ($_socid > 0)
}
else
{
print $db->error();
dolibarr_print_error($db);
}
}
$db->close();

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -239,10 +239,12 @@ if ($result)
print '<td valign="center">';
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'">';
print img_file();
print img_object($langs->trans("ShowContact"),"contact");
print '</a>&nbsp;<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'">'.$obj->name.'</a></td>';
print '<td>'.$obj->firstname.'</td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">';
print img_object($langs->trans("ShowCompany"),"company");
print '</a>&nbsp;<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;actionid=1&amp;contactid='.$obj->cidp.'&amp;socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a>&nbsp;</td>';
if ($_GET["view"] == 'phone')