From dd60c432d4a052d7b67d8f76a5b0e12f4aaacfba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Jun 2006 14:59:59 +0000 Subject: [PATCH] =?UTF-8?q?Qual:=20Suppression=20des=20propri=E9t=E9s=20no?= =?UTF-8?q?m=5Furl=20au=20profit=20de=20la=20methode=20getNomUrl.=20Ce=20q?= =?UTF-8?q?ui=20permet=20de=20passer=20en=20parametre=20si=20on=20veut=20e?= =?UTF-8?q?n=20plus=20le=20picto=20ou=20non=20dans=20le=20lien?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/contact.php | 7 +++---- htdocs/commande/fiche.php | 7 +++---- htdocs/commande/info.php | 3 +-- htdocs/commande/note.php | 3 +-- htdocs/compta/commande/fiche.php | 5 ++--- htdocs/expedition/commande.php | 16 ++++++++++++++-- htdocs/societe.class.php | 9 ++++++++- 7 files changed, 32 insertions(+), 18 deletions(-) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index ffafbd24204..7d6e3d6f78f 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Destailleur Laurent +/* Copyright (C) 2005 Patrick Rouillon + * Copyright (C) 2005-2006 Destailleur Laurent * * 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 @@ -251,8 +251,7 @@ if ($id > 0) // Customer print "".$langs->trans("Company").""; - print ''; - print ''.$soc->nom.''; + print ''.$soc->getNomUrl(1).''; print ""; print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 5f0cf5f2c4e..8e7f1e46dea 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -531,7 +531,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; // Ligne info remises tiers - print ''.$langs->trans('Info').''; + print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$soc->getCurrentDiscount(); @@ -865,12 +865,11 @@ else // Société print ''.$langs->trans('Company').''; - print ''; - print ''.$soc->nom.''; + print ''.$soc->getNomUrl(1).''; print ''; // Ligne info remises tiers - print ''.$langs->trans('Info').''; + print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$soc->getCurrentDiscount(); diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 7b08c45e258..a590d5b25eb 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2006 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 304268dc2ee..25761251ccc 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -128,8 +128,7 @@ if ($_GET["id"]) // Customer print "".$langs->trans("Company").""; - print ''; - print ''.$soc->nom.''; + print ''.$soc->getNomUrl(1).''; // Note publique print ''.$langs->trans("NotePublic").' :'; diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index fa429d2ec59..136f690299d 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -127,12 +127,11 @@ if ($_GET["id"] > 0) // Société print ''.$langs->trans('Company').''; - print ''; - print ''.$soc->nom.''; + print ''.$soc->getNomUrl(1,'compta').''; print ''; // Ligne info remises tiers - print ''.$langs->trans('Info').''; + print ''.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$soc->getCurrentDiscount(); diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 99f8e0d6387..b4f98bb35fe 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -36,6 +36,7 @@ require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php"); +$langs->load("companies"); $langs->load("bills"); $langs->load('deliveries'); @@ -139,10 +140,21 @@ if ($_GET["id"] > 0) // Société print ''.$langs->trans('Company').''; - print ''; - print ''.$soc->nom.''; + print ''.$soc->getNomUrl(1).''; print ''; + // Ligne info remises tiers + print ''.$langs->trans('Discounts').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $absolute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie)); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print ''; + + // Date print ''.$langs->trans('Date').''; print ''.dolibarr_print_date($commande->date,'%A %d %B %Y').''; print ''.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 6bc5b8fc84c..4f8f2c8a396 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -1078,9 +1078,10 @@ class Societe /** * \brief Renvoie nom clicable (avec eventuellement le picto) * \param withpicto Inclut le picto dans le lien + * \param option Sur quoi pointe le lien * \return string Chaine avec URL */ - function getNomUrl($withpicto=0) + function getNomUrl($withpicto=0,$option='') { global $langs; @@ -1102,6 +1103,12 @@ class Societe $lienfin=''; } + if ($option == 'compta') + { + $lien = ''; + $lienfin=''; + } + if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany"),'company').$lienfin.' '); $result.=$lien.$this->nom.$lienfin; return $result;