From 9b9613b4869727c813eacab29445add4e7b8947f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 22 Dec 2007 08:56:51 +0000 Subject: [PATCH] Fix: le lien vers la fiche commande change en fonction de son statut --- htdocs/commande/commande.class.php | 9 ++++++--- htdocs/commande/liste.php | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 04cc27df026..49c363384c1 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -2138,16 +2138,19 @@ class Commande extends CommonObject /** \brief Renvoie nom clicable (avec eventuellement le picto) \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - \param option Sur quoi pointe le lien + \param option Sur quoi pointe le lien: 0,1,2,4,-1 fiche commande, 3 fiche compta commande \return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0,$option=0) { global $langs; $result=''; + $urlOption=''; - $lien = ''; + if ($option == 3) $urlOption = '/compta'; + + $lien = ''; $lienfin=''; $picto='order'; diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index faa3cbf7f4e..47528933ed5 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2007 Regis Houssin * * 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 @@ -18,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -188,7 +188,7 @@ if ($resql) print ''; print ''; print '
'; - print $generic_commande->getNomUrl(1); + print $generic_commande->getNomUrl(1,$objp->fk_statut); print '';