From e8b586a51cab280ec9384da72a0b1a7c7903ca76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Nov 2010 19:32:54 +0000 Subject: [PATCH] A better way to fix link. This avoid making a SQL request by a fetch for each line. --- htdocs/compta/index.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index d52b16fd8c0..2554d5028b9 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -711,7 +711,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman while ($i < $num) { $obj = $db->fetch_object($resql); - $societestatic->fetch($obj->socid) ; + print ""; print ''; @@ -734,8 +734,11 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman print ''; - print '' ; - print $societestatic->getNomUrl(1) ; + print ''; + $societestatic->id=$obj->socid; + $societestatic->nom=$obj->nom; + $societestatic->client=1; + print $societestatic->getNomUrl(1,'customer',44); print ''; if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; @@ -809,7 +812,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); $societestatic->fetch($obj->socid) ; - + print ''; print ''; @@ -913,7 +916,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) { $obj = $db->fetch_object($resql); $societestatic->fetch($obj->socid) ; - + print ''; $facstatic->ref=$obj->facnumber; $facstatic->id=$obj->rowid;