diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php
index e8fbffe3249..b9a6ab1bc12 100644
--- a/htdocs/compta/fiche.php
+++ b/htdocs/compta/fiche.php
@@ -95,11 +95,17 @@ if ($mode == 'search')
}
-llxHeader();
/*
* Mode fiche
*/
+
+llxHeader();
+
+$actionstatic=new ActionComm($db);
+$facturestatic=new Facture($db);
+$contactstatic = new Contact($db);
+
if ($socid > 0)
{
$societe = new Societe($db);
@@ -433,8 +439,6 @@ if ($socid > 0)
print "
";
- $actionstatic=new ActionComm($db);
-
/*
* Listes des actions a faire
*
@@ -509,21 +513,23 @@ if ($socid > 0)
}
else
{
- print '
'.img_object($langs->trans("ShowAction"),"task");
- $transcode=$langs->trans("Action".$obj->acode);
- $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
- print $libelle;
- print ' | ';
+ $actionstatic->code=$obj->acode;
+ $actionstatic->libelle=$obj->libelle;
+ $actionstatic->id=$obj->id;
+ print ''.$actionstatic->getNomUrl(1,16).' | ';
}
print ''.$obj->label.' | ';
// Contact pour cette action
- if ($obj->fk_contact) {
- $contact = new Contact($db);
- $contact->fetch($obj->fk_contact);
- print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' | ';
- } else {
+ if ($obj->fk_contact > 0)
+ {
+ $contact = new Contact($db);
+ $contact->fetch($obj->fk_contact);
+ print ''.$contact->getNomUrl(1).' | ';
+ }
+ else
+ {
print ' | ';
}
@@ -602,11 +608,10 @@ if ($socid > 0)
// Action
print '';
- print ''.img_object($langs->trans("ShowTask"),"task");
- $transcode=$langs->trans("Action".$obj->acode);
- $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle);
- print $libelle;
- print '';
+ $actionstatic->code=$obj->acode;
+ $actionstatic->libelle=$obj->libelle;
+ $actionstatic->id=$obj->id;
+ print $actionstatic->getNomUrl(1,16);
print ' | ';
// Objet lié
@@ -619,9 +624,10 @@ if ($socid > 0)
}
if ($obj->fk_facture)
{
- print ''.img_object($langs->trans("ShowBill"),"bill");
- print $langs->trans("Invoice");
- print '';
+ $facturestatic->ref=$langs->trans("Invoice");
+ $facturestatic->id=$obj->rowid;
+ $facturestatic->type=$obj->type;
+ print $facturestatic->getNomUrl(1,'compta');
}
else print ' ';
print '';
@@ -630,11 +636,11 @@ if ($socid > 0)
print "$obj->label | ";
// Contact pour cette action
- if ($obj->fk_contact)
+ if ($obj->fk_contact > 0)
{
$contact = new Contact($db);
$contact->fetch($obj->fk_contact);
- print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' | ';
+ print ''.$contact->getNomUrl(1).' | ';
}
else
{
@@ -656,7 +662,7 @@ if ($socid > 0)
{
dolibarr_print_error($db);
}
- print "";
+ print "
";
}
else
{