Qual: Removed duplicate code
This commit is contained in:
parent
24b7587cff
commit
f3a178d050
@ -126,7 +126,6 @@ if ($mode == 'search') {
|
||||
|
||||
llxHeader('',$langs->trans('CustomerCard'));
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$form = new Form($db);
|
||||
@ -633,98 +632,10 @@ if ($socid > 0)
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
*
|
||||
/*
|
||||
* Liste des contacts
|
||||
*
|
||||
*/
|
||||
if ($conf->clicktodial->enabled)
|
||||
{
|
||||
$user->fetch_clicktodial(); // lecture des infos de clicktodial
|
||||
}
|
||||
|
||||
print_titre($langs->trans("ContactsForCompany"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, 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 = ".$objsoc->id;
|
||||
$sql .= " ORDER by p.datec";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>';
|
||||
$contactstatic->id = $obj->rowid;
|
||||
$contactstatic->name = $obj->name;
|
||||
$contactstatic->firstname = $obj->firstname;
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
// Lien click to dial
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print dolibarr_print_phone($obj->phone);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
if ($obj->phone) print dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print dolibarr_print_phone($obj->fax);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print $obj->email;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print "<a href=\"../contact/fiche.php?action=edit&id=".$obj->rowid."\">";
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td align="center"><a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "<br>";
|
||||
|
||||
show_contacts($conf,$langs,$db,$objsoc);
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
|
||||
@ -247,118 +247,20 @@ if ($socid > 0)
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
||||
if ($conf->clicktodial->enabled)
|
||||
{
|
||||
$user->fetch_clicktodial(); // lecture des infos de clicktodial
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Liste des contacts
|
||||
*
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Firstname").' '.$langs->trans("Lastname").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td align=\"center\"> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, 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";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$i = 0 ; $num = $db->num_rows($result);
|
||||
$var=1;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$obj->firstname.' '. $obj->name.'</a> ';
|
||||
|
||||
if (trim($obj->note))
|
||||
{
|
||||
print '<br>'.nl2br(trim($obj->note));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
|
||||
// Phone
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print dolibarr_print_phone($obj->phone,'');
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
if ($obj->phone) print dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
|
||||
// Fax
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print dolibarr_print_phone($obj->fax);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->email;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print "<a href=\"".DOL_URL_ROOT."/contact/fiche.php?action=edit&id=".$obj->rowid."\">";
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
else print ' ';
|
||||
|
||||
print '</td>';
|
||||
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "<br>";
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
*/
|
||||
show_actions_todo($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions effectuees
|
||||
*/
|
||||
show_actions_done($conf,$langs,$db,$societe);
|
||||
/*
|
||||
* Liste des contacts
|
||||
*/
|
||||
show_contacts($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
*/
|
||||
show_actions_todo($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions effectuees
|
||||
*/
|
||||
show_actions_done($conf,$langs,$db,$societe);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -358,96 +358,11 @@ if ($socid > 0)
|
||||
print '</div>';
|
||||
print "<br>\n";
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
/*
|
||||
* Liste des contacts
|
||||
*
|
||||
*/
|
||||
print_titre($langs->trans("ContactsForCompany"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td align=\"center\"> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, 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";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$i = 0 ; $num = $db->num_rows($result);
|
||||
$var=1;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$obj->firstname.' '. $obj->name.'</a> ';
|
||||
|
||||
if (trim($obj->note))
|
||||
{
|
||||
print '<br>'.nl2br(trim($obj->note));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->phone;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
if ($obj->phone) print dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->fax;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->email;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
print '<td align="center">';
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print "<a href=\"../contact/fiche.php?action=edit&id=".$obj->rowid."\">";
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
else print ' ';
|
||||
|
||||
print '</td>';
|
||||
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$tag = !$tag;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print "<br>";
|
||||
|
||||
show_contacts($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
|
||||
@ -277,76 +277,12 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
*
|
||||
* Liste des contacts
|
||||
*
|
||||
*/
|
||||
$langs->load("companies");
|
||||
|
||||
print '<br>';
|
||||
|
||||
print_titre($langs->trans("ContactsForCompany"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print "<td>".$langs->trans("Fax")."</td><td>".$langs->trans("EMail")."</td>";
|
||||
print "<td align=\"center\"> </td>";
|
||||
print '<td> </td>';
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, 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";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowContact"),"contact");
|
||||
print ' '.$obj->firstname.' '. $obj->name.'</a> ';
|
||||
|
||||
if ($obj->note)
|
||||
{
|
||||
print "<br>".nl2br($obj->note);
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->phone.'</a>';
|
||||
if ($obj->phone) print dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->fax.'</a></td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->email.'</a></td>';
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print "<td align=\"center\"><a href=\"../contact/fiche.php?action=edit&id=".$obj->rowid."\">".img_edit()."</a></td>";
|
||||
}
|
||||
|
||||
print '<td align="center"><a href="../comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
* Liste des contacts
|
||||
*/
|
||||
show_contacts($conf,$langs,$db,$societe);
|
||||
|
||||
/*
|
||||
* Listes des actions a faire
|
||||
|
||||
@ -251,8 +251,8 @@ ActionsDone=Actions done
|
||||
ActionsToDoShort=To do
|
||||
ActionsDoneShort=Done
|
||||
CompanyFundation=Company/Fundation
|
||||
ContactsForCompany=Contacts for company
|
||||
ActionsOnCompany=Actions about company
|
||||
ContactsForCompany=Contacts for this third party
|
||||
ActionsOnCompany=Actions about this third party
|
||||
NActions=%s actions
|
||||
NActionsLate=%s late
|
||||
Filter=Filter
|
||||
|
||||
@ -208,8 +208,8 @@ ActionsDone=Actions effectu
|
||||
ActionsToDoShort=À faire
|
||||
ActionsDoneShort=Effectué
|
||||
CompanyFundation=Entreprise/Fondation
|
||||
ContactsForCompany=Contacts pour l'entreprise
|
||||
ActionsOnCompany=Actions à propos de l'entreprise
|
||||
ContactsForCompany=Contacts de ce tiers
|
||||
ActionsOnCompany=Actions vis à vis de ce tiers
|
||||
NActions=%s actions
|
||||
NActionsLate=%s en retard
|
||||
Filter=Filtre
|
||||
|
||||
@ -252,8 +252,8 @@ ActionsDone=Actions effectu
|
||||
ActionsToDoShort=À faire
|
||||
ActionsDoneShort=Effectuées
|
||||
CompanyFundation=Société ou institution
|
||||
ContactsForCompany=Contacts de cette société
|
||||
ActionsOnCompany=Actions vis à vis de cette société
|
||||
ContactsForCompany=Contacts de ce tiers
|
||||
ActionsOnCompany=Actions vis à vis de ce tiers
|
||||
NActions=%s actions
|
||||
NActionsLate=%s en retard
|
||||
Filter=Filtre
|
||||
|
||||
@ -225,6 +225,116 @@ function getFormeJuridiqueLabel($code)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show html area for list of contacts
|
||||
*/
|
||||
function show_contacts($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
global $user;
|
||||
global $bc;
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
if ($conf->clicktodial->enabled)
|
||||
{
|
||||
$user->fetch_clicktodial(); // lecture des infos de clicktodial
|
||||
}
|
||||
|
||||
print_titre($langs->trans("ContactsForCompany"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, 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 = ".$objsoc->id;
|
||||
$sql .= " ORDER by p.datec";
|
||||
|
||||
$result = $db->query($sql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td>';
|
||||
$contactstatic->id = $obj->rowid;
|
||||
$contactstatic->name = $obj->name;
|
||||
$contactstatic->firstname = $obj->firstname;
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
// Lien click to dial
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print dolibarr_print_phone($obj->phone);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
if ($obj->phone) print dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print dolibarr_print_phone($obj->fax);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print $obj->email;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
// \TODO
|
||||
//if ($obj->email) print dol_email_link($obj->email);
|
||||
print ' </td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print "<a href=\"../contact/fiche.php?action=edit&id=".$obj->rowid."\">";
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td align="center"><a href="action/fiche.php?action=create&backtopage=1&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action");
|
||||
print '</a></td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//print "<tr ".$bc[$var].">";
|
||||
//print '<td>'.$langs->trans("NoContactsYetDefined").'</td>';
|
||||
//print "</tr>\n";
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show html area with actions to do
|
||||
*/
|
||||
@ -349,9 +459,9 @@ function show_actions_todo($conf,$langs,$db,$objsoc)
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print "</table>\n";
|
||||
|
||||
print "<br>";
|
||||
print "<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,7 +559,7 @@ function show_actions_done($conf,$langs,$db,$objsoc)
|
||||
print '</td>';
|
||||
|
||||
// Libelle
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
|
||||
// Contact pour cette action
|
||||
if ($obj->fk_contact > 0)
|
||||
@ -472,7 +582,7 @@ function show_actions_done($conf,$langs,$db,$objsoc)
|
||||
print '</td>';
|
||||
|
||||
// Statut
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
print '<td nowrap="nowrap" width="20">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
@ -485,7 +595,8 @@ function show_actions_done($conf,$langs,$db,$objsoc)
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
print "</table><br>";
|
||||
print "</table>\n";
|
||||
print "<br>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1201,8 +1201,9 @@ else
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print "</div>\n";
|
||||
|
||||
/*
|
||||
*
|
||||
* Actions
|
||||
*/
|
||||
if ($_GET["action"] == '')
|
||||
{
|
||||
@ -1240,12 +1241,16 @@ else
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
/*
|
||||
* Liste des contacts
|
||||
*/
|
||||
show_contacts($conf,$langs,$db,$soc);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user