| ".$langs->trans("Date")." | ";
$sel->select_date(time(),"p",'','','','fichinter');
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 899c32716ff..c2014df3e2d 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -382,7 +382,7 @@ else
print '';
print '| '.$langs->trans('Company').' | ';
- print ''.$societe->nom_url.' | ';
+ print ''.$societe->getNomUrl(1).' | ';
print ''.$langs->trans('Comments').' | ';
print '| '.$langs->trans('Ref').' | ';
diff --git a/htdocs/fourn/product/fourn.php b/htdocs/fourn/product/fourn.php
index 16868d9ee4e..e92a2c1932d 100644
--- a/htdocs/fourn/product/fourn.php
+++ b/htdocs/fourn/product/fourn.php
@@ -114,7 +114,7 @@ if ($_GET["id"])
print ' | ';
print "";
- print '| '.$langs->trans("Supplier").' | '.$product->fourn->nom_url.' | ';
+ print ''.$langs->trans("Supplier").' | '.$product->fourn->getNomUrl(1).' | ';
print ' ';
print '| '.$langs->trans("SupplierRef").' | '.$product->fourn_ref.' | ';
print ' ';
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 34f09de773c..7084683fdd4 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -72,8 +72,8 @@ Prospect=Prospect
CustomerCard=Customer Card
Customer=Customer
CustomerDiscount=Customer Discount
-CustomerRelativeDiscount=Relative global discount
-CustomerAbsoluteDiscount=Absolute discount
+CustomerRelativeDiscount=Relative customer discount
+CustomerAbsoluteDiscount=Absolute customer discount
CustomerRelativeDiscountShort=Relative discount
CustomerAbsoluteDiscountShort=Absolute discount
CompanyHasRelativeDiscount=This customer has a discount of %s%%
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index 5e6d7e9fcb9..105a3a13e33 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -135,8 +135,8 @@ NoteReason=Note/Motif
ReasonDiscount=Motif
AddGlobalDiscount=Ajouter remise fixe
DiscountOfferedBy=Accordé par
-DiscountStillRemaining=Remises absolues restant en cours
-DiscountAlreadyCounted=Remises absolues déjà appliquées
+DiscountStillRemaining=Remises fixes restant en cours
+DiscountAlreadyCounted=Remises fixes déjà appliquées
BillAddress=Adresse de facturation
# PaymentConditions
PaymentConditionShortRECEP=A réception
diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang
index 780a2d7a0fa..e117d557be6 100644
--- a/htdocs/langs/fr_FR/companies.lang
+++ b/htdocs/langs/fr_FR/companies.lang
@@ -72,16 +72,16 @@ Prospect=Prospect
CustomerCard=Fiche Client
Customer=Client
CustomerDiscount=Remise client
-CustomerRelativeDiscount=Remise globale relative
-CustomerAbsoluteDiscount=Remise globale fixe
+CustomerRelativeDiscount=Remise client relative
+CustomerAbsoluteDiscount=Remise client fixe
CustomerRelativeDiscountShort=Remise relative
CustomerAbsoluteDiscountShort=Remise fixe
CompanyHasRelativeDiscount=Ce client a une remise par défaut de %s%%
CompanyHasNoRelativeDiscount=Ce client n'a pas de remises par défaut
CompanyHasAbsoluteDiscount=Ce client a %s %s de remises fixes disponibles
CompanyHasNoAbsoluteDiscount=Ce client n'a pas ou plus de remises fixes disponibles
-CustomerAbsoluteDiscountAllUsers=Remises en cours (accordées par tout utilisateur)
-CustomerAbsoluteDiscountMy=Remises en cours (accordées personnellement)
+CustomerAbsoluteDiscountAllUsers=Remises fixes en cours (accordées par tout utilisateur)
+CustomerAbsoluteDiscountMy=Remises fixes en cours (accordées personnellement)
DefaultDiscount=Remise par défaut
DiscountNone=Aucune
Supplier=Fournisseur
diff --git a/htdocs/product/concert/fiche.php b/htdocs/product/concert/fiche.php
index ab98d465490..a30f297a3c3 100644
--- a/htdocs/product/concert/fiche.php
+++ b/htdocs/product/concert/fiche.php
@@ -114,9 +114,9 @@ else
print " ";
print "| Date | ".strftime("%A %d %B %Y",$concert->date)." | \n";
- print ' | Artiste/Groupe | '.$groupart->nom_url." | ";
+ print ' | Artiste/Groupe | '.$groupart->getNomUrl(0)." | ";
- print ' | Lieu | '.$lieuconcert->nom_url." | ";
+ print ' | Lieu | '.$lieuconcert->getNomUrl(0)." | ";
print ' | '.$langs->trans("Description").' | '.nl2br($concert->description)." | ";
diff --git a/htdocs/product/concert/lieuconcert.class.php b/htdocs/product/concert/lieuconcert.class.php
index 88b43133c89..872a7457b52 100644
--- a/htdocs/product/concert/lieuconcert.class.php
+++ b/htdocs/product/concert/lieuconcert.class.php
@@ -80,31 +80,46 @@ class LieuConcert {
print $this->db->error() . ' in ' . $sql;
}
}
- /*
- *
- *
- *
- */
- function fetch ($id) {
-
- $sql = "SELECT rowid, nom, ville, description FROM ".MAIN_DB_PREFIX."lieu_concert WHERE rowid = $id";
+
+
+ /*
+ *
+ *
+ *
+ */
+ function fetch ($id)
+ {
+ $sql = "SELECT rowid, nom, ville, description FROM ".MAIN_DB_PREFIX."lieu_concert WHERE rowid = $id";
+
+ $result = $this->db->query($sql) ;
+
+ if ( $result )
+ {
+ $result = $this->db->fetch_array();
+
+ $this->id = $result["rowid"];
+ $this->nom = $result["nom"];
+ $this->ville = $result["ville"];
+ $this->description = $result["description"];
+ }
+ $this->db->free();
+
+ return $result;
+ }
- $result = $this->db->query($sql) ;
- if ( $result ) {
- $result = $this->db->fetch_array();
-
- $this->id = $result["rowid"];
- $this->nom = $result["nom"];
- $this->ville = $result["ville"];
- $this->description = $result["description"];
-
- $this->nom_url = ''.$result["nom"].'';
- }
- $this->db->free();
-
- return $result;
- }
+ /**
+ * \brief Renvoie le nom clicable
+ * \param withpicto Inclut le picto dans le lien
+ * \return string Chaine avec URL
+ */
+ function getNomUrl($withpicto=0)
+ {
+ global $langs;
+
+ $result='';
+ return ''.$this->nom.'';
+ }
/*
diff --git a/htdocs/product/groupart/groupart.class.php b/htdocs/product/groupart/groupart.class.php
index 8ee915c4193..a08de6b487c 100644
--- a/htdocs/product/groupart/groupart.class.php
+++ b/htdocs/product/groupart/groupart.class.php
@@ -79,32 +79,48 @@ class Groupart {
print $this->db->error() . ' in ' . $sql;
}
}
- /*
- *
- *
- *
- */
- function fetch ($id) {
-
- $sql = "SELECT rowid, nom, groupart, description FROM ".MAIN_DB_PREFIX."groupart WHERE rowid = $id";
+
+
+ /*
+ *
+ *
+ *
+ */
+ function fetch ($id)
+ {
+ $sql = "SELECT rowid, nom, groupart, description FROM ".MAIN_DB_PREFIX."groupart WHERE rowid = $id";
+
+ $result = $this->db->query($sql) ;
+
+ if ( $result )
+ {
+ $result = $this->db->fetch_array();
+
+ $this->id = $result["rowid"];
+ $this->nom = $result["nom"];
+ $this->desc = $result["description"];
+ $this->grar = $result["groupart"];
+ }
+ $this->db->free();
+
+ return $result;
+ }
- $result = $this->db->query($sql) ;
- if ( $result ) {
- $result = $this->db->fetch_array();
+ /**
+ * \brief Renvoie le nom clicable
+ * \param withpicto Inclut le picto dans le lien
+ * \return string Chaine avec URL
+ */
+ function getNomUrl($withpicto=0)
+ {
+ global $langs;
+
+ $result='';
+ return ''.$this->nom.'';
+ }
+
- $this->id = $result["rowid"];
- $this->nom = $result["nom"];
- $this->desc = $result["description"];
- $this->grar = $result["groupart"];
-
- $this->nom_url = ''.$result["nom"].'';
-
- }
- $this->db->free();
-
- return $result;
- }
/*
*
*
diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php
index 5ecad811215..1eacc3ef138 100644
--- a/htdocs/projet/fiche.php
+++ b/htdocs/projet/fiche.php
@@ -137,18 +137,18 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print '';
print '';
@@ -214,12 +214,12 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print '';
print '';
- print '';
- print '| '.$langs->trans("Company").' | '.$projet->societe->nom_url.' | ';
-
+ print '';
print '';
}
@@ -227,10 +227,10 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
{
print '';
- print '| '.$langs->trans("Company").' | '.$projet->societe->nom_url.' | ';
-
print '| '.$langs->trans("Ref").' | '.$projet->ref.' | ';
print '| '.$langs->trans("Label").' | '.$projet->title.' | ';
+
+ print '| '.$langs->trans("Company").' | '.$projet->societe->getNomUrl(1).' | ';
print ' ';
}
diff --git a/htdocs/projet/tasks/fiche.php b/htdocs/projet/tasks/fiche.php
index fcda60f4908..48ec8bc8d7a 100644
--- a/htdocs/projet/tasks/fiche.php
+++ b/htdocs/projet/tasks/fiche.php
@@ -199,18 +199,18 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print '';
print '';
@@ -266,7 +266,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print '';
print '';
print '| '.$langs->trans("Project").' | '.$projet->title.' | ';
- print ''.$langs->trans("Company").' | '.$projet->societe->nom_url.' | ';
+ print ''.$langs->trans("Company").' | '.$projet->societe->getNomUrl(1).' | ';
/* Liste des acteurs */
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index 1908e1ae41b..1348c9a85ea 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -88,7 +88,7 @@ if ($_GET["id"] > 0)
print '';
print '';
print '| '.$langs->trans("Project").' | '.$projet->title.' | ';
- print ''.$langs->trans("Company").' | '.$projet->societe->nom_url.' | ';
+ print ''.$langs->trans("Company").' | '.$projet->societe->getNomUrl(1).' | ';
print '| '.$langs->trans("Task").' | '.$task->title.' | ';
/* Liste des tâches */
diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php
index 9cadfb80421..6bc5b8fc84c 100644
--- a/htdocs/societe.class.php
+++ b/htdocs/societe.class.php
@@ -538,19 +538,6 @@ class Societe
$this->client = $obj->client;
$this->fournisseur = $obj->fournisseur;
- if ($this->client == 1)
- {
- $this->nom_url = ''.$obj->nom.'';
- }
- elseif($this->client == 2)
- {
- $this->nom_url = ''.$obj->nom.'';
- }
- else
- {
- $this->nom_url = ''.$obj->nom.'';
- }
-
$this->rubrique = $obj->rubrique;
$this->note = $obj->note;
// multiprix
@@ -1087,10 +1074,44 @@ class Societe
}
}
+
+ /**
+ * \brief Renvoie nom clicable (avec eventuellement le picto)
+ * \param withpicto Inclut le picto dans le lien
+ * \return string Chaine avec URL
+ */
+ function getNomUrl($withpicto=0)
+ {
+ global $langs;
+
+ $result='';
+
+ if ($this->client == 1)
+ {
+ $lien = '';
+ $lienfin='';
+ }
+ elseif($this->client == 2)
+ {
+ $lien= '';
+ $lienfin='';
+ }
+ else
+ {
+ $lien = '';
+ $lienfin='';
+ }
+
+ if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany"),'company').$lienfin.' ');
+ $result.=$lien.$this->nom.$lienfin;
+ return $result;
+ }
+
+
/**
* \brief Renvoie le nom d'une societe a partir d'un id
- * \param id id de la société recherchée
- *
+ * \param id id de la société recherchée
+ * \return string Nom de la société
*/
function get_nom($id)
{
|