Qual: Uniformize code

This commit is contained in:
simnandez 2011-12-19 17:12:29 +01:00
parent 6498742d27
commit 136fba88ad
4 changed files with 211 additions and 178 deletions

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -101,11 +102,13 @@ class Fournisseur extends Societe
}
}
/**
* \brief Cree la commande au statut brouillon
* \param user Utilisateur qui cree
* \return int <0 si ko, id de la commande creee si ok
*/
/**
* Create the order from an existing
*
* @param User $user Creator user
* @param int $idc Id source
* @param int $comclientid Id thirdparty
*/
function updateFromCommandeClient($user, $idc, $comclientid)
{
$comm = new CommandeFournisseur($this->db);
@ -115,9 +118,10 @@ class Fournisseur extends Societe
}
/**
* \brief Cree la commande au statut brouillon
* \param user Utilisateur qui cree
* \return int <0 si ko, id de la commande creee si ok
* Create the order with draft status
* @param User $user Creator user
* @return int <0 if ko, id of order if ok
*/
function create_commande($user)
{
@ -183,9 +187,9 @@ class Fournisseur extends Societe
/**
* Create a supplier category
*
* @param user User asking creation
* @param name Nom categorie
* @return int <0 if KO, 0 if OK
* @param User $user User asking creation
* @param string $name Category name
* @return int <0 if KO, 0 if OK
*/
function CreateCategory($user, $name)
{
@ -209,7 +213,7 @@ class Fournisseur extends Societe
}
/**
* Retourne la liste des fournisseurs
* Return the suppliers list
*
* @return array Array of suppliers
*/

View File

@ -71,7 +71,7 @@ class CommandeFournisseur extends Commande
/** Constructeur
* @param DB Handler d'acces aux bases de donnees
* @param DoliDB $DB Handler d'acces aux bases de donnees
*/
function CommandeFournisseur($DB)
{
@ -239,11 +239,11 @@ class CommandeFournisseur extends Commande
/**
* Add a line in log table
* @param user User making action
* @param statut Status of order
* @param datelog Date of change
* @param comment Comment
* @return int <0 if KO, >0 if OK
* @param User $user User making action
* @param int $statut Status of order
* @param date $datelog Date of change
* @param string $comment Comment
* @return int <0 if KO, >0 if OK
*/
function log($user, $statut, $datelog, $comment='')
{
@ -269,7 +269,7 @@ class CommandeFournisseur extends Commande
/**
* Validate an order
*
* @param User $user Utilisateur qui valide
* @param User $user Validator User
* @return int <0 if KO, >0 if OK
*/
function valid($user)
@ -470,9 +470,10 @@ class CommandeFournisseur extends Commande
/**
* Return label of a status
* @param statut Id statut
* @param mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
* @return string Label of status
*
* @param int $statut Id statut
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
* @return string Label of status
*/
function LibStatut($statut,$mode=0)
{
@ -540,9 +541,10 @@ class CommandeFournisseur extends Commande
/**
* 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
* @return string Chaine avec URL
*
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @param string $option Sur quoi pointe le lien
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0,$option='')
{
@ -566,7 +568,8 @@ class CommandeFournisseur extends Commande
/**
* Renvoie la reference de commande suivante non utilisee en fonction du modele
* de numerotation actif defini dans COMMANDE_SUPPLIER_ADDON
* @param soc objet societe
*
* @param Societe $soc objet societe
* @return string reference libre pour la facture
*/
function getNextNumRef($soc)
@ -700,7 +703,9 @@ class CommandeFournisseur extends Commande
/**
* Refuse an order
* @param user User making action
*
* @param User $user User making action
* @return int 0 if Ok, <0 if Ko
*/
function refuse($user)
{
@ -746,7 +751,9 @@ class CommandeFournisseur extends Commande
/**
* Cancel an approved order.
* L'annulation se fait apres l'approbation
* @param user User making action
*
* @param User $user User making action
* @return int >0 if Ok, <0 if Ko
*/
function Cancel($user)
{
@ -807,10 +814,10 @@ class CommandeFournisseur extends Commande
/**
* Send a supplier order to supplier
* @param user User making change
* @param date Date
* @param methode Method
* @param comment Comment
* @param User $user User making change
* @param date $date Date
* @param int $methode Method
* @param string $comment Comment
* @return int <0 if KO, >0 if OK
*/
function commande($user, $date, $methode, $comment='')
@ -843,8 +850,8 @@ class CommandeFournisseur extends Commande
/**
* Create order with draft status
* @param user User making creation
* @return int <0 if KO, Id of supplier order if OK
* @param User $user User making creation
* @return int <0 if KO, Id of supplier order if OK
*/
function create($user)
{
@ -925,20 +932,20 @@ class CommandeFournisseur extends Commande
/**
* Add order line
*
* @param desc Description
* @param pu_ht Unit price
* @param qty Quantity
* @param txtva Taux tva
* @param txlocaltax1 Localtax1 tax
* @param txlocaltax2 Localtax2 tax
* @param fk_product Id produit
* @param fk_prod_fourn_price Id supplier price
* @param fourn_ref Supplier reference
* @param remise_percent Remise
* @param price_base_type HT or TTC
* @param pu_ttc Unit price TTC
* @param type Type of line (0=product, 1=service)
* @return int <=0 if KO, >0 if OK
* @param string $desc Description
* @param double $pu_ht Unit price
* @param double $qty Quantity
* @param double $txtva Taux tva
* @param double $txlocaltax1 Localtax1 tax
* @param double $txlocaltax2 Localtax2 tax
* @param int $fk_product Id produit
* @param int $fk_prod_fourn_price Id supplier price
* @param string $fourn_ref Supplier reference
* @param double $remise_percent Remise
* @param string $price_base_type HT or TTC
* @param double $pu_ttc Unit price TTC
* @param int $type Type of line (0=product, 1=service)
* @return int <=0 if KO, >0 if OK
*/
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0)
{
@ -1087,13 +1094,13 @@ class CommandeFournisseur extends Commande
/**
* Add a product into a stock warehouse.
*
* @param $user User object making change
* @param $product Id of product to dispatch
* @param $qty Qty to dispatch
* @param $entrepot Id of warehouse to add product
* @param $price Price for PMP value calculation
* @param $comment Comment for stock movement
* @return int <0 if KO, >0 if OK
* @param User $user User object making change
* @param int $product Id of product to dispatch
* @param double $qty Qty to dispatch
* @param int $entrepot Id of warehouse to add product
* @param double $price Price for PMP value calculation
* @param string $comment Comment for stock movement
* @return int <0 if KO, >0 if OK
*/
function DispatchProduct($user, $product, $qty, $entrepot, $price=0, $comment='')
{
@ -1164,6 +1171,7 @@ class CommandeFournisseur extends Commande
* Delete line
*
* @param int $idligne Id of line to delete
* @return 0 if Ok, <0 ik Ko
*/
function deleteline($idligne)
{
@ -1246,7 +1254,9 @@ class CommandeFournisseur extends Commande
}
/**
* Return list of order methods
* Get list of order methods
*
* @return 0 if Ok, <0 if Ko
*/
function get_methodes_commande()
{
@ -1278,8 +1288,9 @@ class CommandeFournisseur extends Commande
/**
* Change les conditions de reglement de la commande
* @param cond_reglement_id Id de la nouvelle condition de reglement
* @return int >0 si ok, <0 si ko
*
* @param int $cond_reglement_id Id de la nouvelle condition de reglement
* @return int >0 si ok, <0 si ko
*/
function cond_reglement($cond_reglement_id)
{
@ -1311,8 +1322,9 @@ class CommandeFournisseur extends Commande
/**
* Change le mode de reglement
* @param mode_reglement_id Id du nouveau mode
* @return int >0 if OK, <0 if KO
*
* @param int $mode_reglement_id Id du nouveau mode
* @return int >0 if OK, <0 if KO
*/
function mode_reglement($mode_reglement_id)
{
@ -1344,10 +1356,11 @@ class CommandeFournisseur extends Commande
/**
* Set a delivery in database for this supplier order
* @param user User that input data
* @param date Date of reception
* @param type Type of receipt
* @param comment Comment
*
* @param User $user User that input data
* @param date $date Date of reception
* @param string $type Type of receipt
* @param string $comment Comment
*/
function Livraison($user, $date, $type, $comment)
{
@ -1404,9 +1417,9 @@ class CommandeFournisseur extends Commande
/**
* Cree la commande depuis une propale existante
* @param user Utilisateur qui cree
* @param idc Id de la propale qui sert de modele
* @param comclientid Id thirdparty
* @param User $user Utilisateur qui cree
* @param int $idc Id de la propale qui sert de modele
* @param int $comclientid Id thirdparty
*/
function updateFromCommandeClient($user, $idc, $comclientid)
{
@ -1450,6 +1463,7 @@ class CommandeFournisseur extends Commande
* @param string $note Private note
* @param string $note_public Public note
* @return int <0 if KO, >=0 if OK
*
* TODO Use instead update_note_public and update_note
*/
function UpdateNote($user, $note, $note_public)
@ -1521,9 +1535,10 @@ class CommandeFournisseur extends Commande
/**
* Tag order with a particular status
* @param user Object user that change status
* @param status New status
* @return int <0 if KO, >0 if OK
*
* @param User $user Object user that change status
* @param int $status New status
* @return int <0 if KO, >0 if OK
*/
function setStatus($user,$status)
{
@ -1564,18 +1579,18 @@ class CommandeFournisseur extends Commande
/**
* Update line
*
* @param rowid Id de la ligne de facture
* @param desc Description de la ligne
* @param pu Prix unitaire
* @param qty Quantity
* @param remise_percent Pourcentage de remise de la ligne
* @param tva_tx Taux TVA
* @param localtax1 Localtax1 tax
* @param localtax2 Localtax2 tax
* @param price_base_type Type of price base
* @param info_bits Miscellanous informations
* @param type Type of line (0=product, 1=service)
* @return int < 0 if error, > 0 if ok
* @param int $rowid Id de la ligne de facture
* @param string $desc Description de la ligne
* @param double $pu Prix unitaire
* @param double $qty Quantity
* @param double $remise_percent Pourcentage de remise de la ligne
* @param double $tva_tx Taux TVA
* @param double $localtax1 Localtax1 tax
* @param double $localtax2 Localtax2 tax
* @param double $price_base_type Type of price base
* @param int $info_bits Miscellanous informations
* @param int $type Type of line (0=product, 1=service)
* @return int < 0 if error, > 0 if ok
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0)
{
@ -1765,10 +1780,10 @@ class CommandeFournisseur extends Commande
}
/**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @param user Objet user
* @return int <0 if KO, >0 if OK
* @param User $user Objet user
* @return int <0 if KO, >0 if OK
*/
function load_board($user)
{
@ -1904,6 +1919,7 @@ class CommandeFournisseurLigne extends OrderLine
/**
* Mise a jour de l'objet ligne de commande en base
*
* @return int <0 si ko, >0 si ok
*/
function update_total()

View File

@ -556,9 +556,10 @@ class FactureFournisseur extends Facture
/**
* Delete invoice from database
* @param rowid Id of invoice to delete
* @return int <0 if KO, >0 if OK
* Delete invoice from database
*
* @param int $rowid Id of invoice to delete
* @return int <0 if KO, >0 if OK
*/
function delete($rowid)
{
@ -606,10 +607,11 @@ class FactureFournisseur extends Facture
}
/**
* Set supplier ref
* @param user User that make change
* @param ref_supplier Supplier ref
* @return int <0 if KO, >0 if OK
* Set supplier ref
*
* @param User $user User that make change
* @param string $ref_supplier Supplier ref
* @return int <0 if KO, >0 if OK
*/
function set_ref_supplier($user, $ref_supplier)
{
@ -638,9 +640,10 @@ class FactureFournisseur extends Facture
}
/**
* Tag invoice as a payed invoice
* @param user Object user
* @return int <0 si ko, >0 si ok
* Tag invoice as a payed invoice
*
* @param User $user Object user
* @return int <0 si ko, >0 si ok
*/
function set_paid($user)
{
@ -685,11 +688,12 @@ class FactureFournisseur extends Facture
/**
* Tag la facture comme non payee completement + appel trigger BILL_UNPAYED
* Fonction utilisee quand un paiement prelevement est refuse,
* ou quand une facture annulee et reouverte.
* @param user Object user that change status
* @return int <0 si ok, >0 si ok
* Tag la facture comme non payee completement + appel trigger BILL_UNPAYED
* Fonction utilisee quand un paiement prelevement est refuse,
* ou quand une facture annulee et reouverte.
*
* @param User $user Object user that change status
* @return int <0 si ok, >0 si ok
*/
function set_unpaid($user)
{
@ -733,12 +737,12 @@ class FactureFournisseur extends Facture
}
/**
* Tag invoice as validated + call trigger BILL_VALIDATE
* Tag invoice as validated + call trigger BILL_VALIDATE
*
* @param User $user Object user that validate
* @param string $force_number Reference to force on invoice
* @param int $idwarehouse Id of warehouse for stock change
* @return int <0 if KO, =0 if nothing to do, >0 if OK
* @param User $user Object user that validate
* @param string $force_number Reference to force on invoice
* @param int $idwarehouse Id of warehouse for stock change
* @return int <0 if KO, =0 if nothing to do, >0 if OK
*/
function validate($user, $force_number='', $idwarehouse=0)
{
@ -906,23 +910,23 @@ class FactureFournisseur extends Facture
* de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,idprod)
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
*
* @param desc Description de la ligne
* @param pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note)
* @param txtva Taux de tva force, sinon -1
* @param txlocaltax1 LocalTax1 Rate
* @param txlocaltax2 LocalTax2 Rate
* @param qty Quantite
* @param fk_product Id du produit/service predefini
* @param remise_percent Pourcentage de remise de la ligne
* @param date_start Date de debut de validite du service
* @param date_end Date de fin de validite du service
* @param ventil Code de ventilation comptable
* @param info_bits Bits de type de lines
* @param price_base_type HT ou TTC
* @param type Type of line (0=product, 1=service)
* @param rang Position of line
* @return int >0 if OK, <0 if KO
* @param string $desc Description de la ligne
* @param double $pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note)
* @param double $txtva Taux de tva force, sinon -1
* @param double $txlocaltax1 LocalTax1 Rate
* @param double $txlocaltax2 LocalTax2 Rate
* @param double $qty Quantite
* @param int $fk_product Id du produit/service predefini
* @param double $remise_percent Pourcentage de remise de la ligne
* @param date $date_start Date de debut de validite du service
* @param date $date_end Date de fin de validite du service
* @param string $ventil Code de ventilation comptable
* @param int $ºinfo_bits Bits de type de lines
* @param string $price_base_type HT ou TTC
* @param int $type Type of line (0=product, 1=service)
* @param int $rang Position of line
* @return int >0 if OK, <0 if KO
*/
function addline($desc, $pu, $txtva, $txlocaltax1=0, $txlocaltax2=0, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1)
{
@ -984,19 +988,19 @@ class FactureFournisseur extends Facture
/**
* Update a line detail into database
* @param id Id of line invoice
* @param label Description of line
* @param pu Prix unitaire (HT ou TTC selon price_base_type)
* @param vatrate VAT Rate
* @param txlocaltax1 LocalTax1 Rate
* @param txlocaltax2 LocalTax2 Rate
* @param qty Quantity
* @param idproduct Id produit
* @param price_base_type HT or TTC
* @param info_bits Miscellanous informations of line
* @param type Type of line (0=product, 1=service)
* @param remise_percent Pourcentage de remise de la ligne
* @return int <0 if KO, >0 if OK
* @param int $id Id of line invoice
* @param string $label Description of line
* @param double $pu Prix unitaire (HT ou TTC selon price_base_type)
* @param double $vatrate VAT Rate
* @param double $txlocaltax1 LocalTax1 Rate
* @param double $txlocaltax2 LocalTax2 Rate
* @param double $qty Quantity
* @param int $idproduct Id produit
* @param double $price_base_type HT or TTC
* @param int $info_bits Miscellanous informations of line
* @param int $type Type of line (0=product, 1=service)
* @param double $remise_percent Pourcentage de remise de la ligne
* @return int <0 if KO, >0 if OK
*/
function updateline($id, $label, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0)
{
@ -1079,7 +1083,7 @@ class FactureFournisseur extends Facture
/**
* Delete a detail line from database
* @param rowid id of line to delete
* @param int $rowid id of line to delete
*/
function deleteline($rowid)
{
@ -1098,8 +1102,8 @@ class FactureFournisseur extends Facture
/**
* \brief Charge les informations d'ordre info dans l'objet facture
* \param id Id de la facture a charger
* Charge les informations d'ordre info dans l'objet facture
* @param int $id Id de la facture a charger
*/
function info($id)
{
@ -1141,9 +1145,9 @@ class FactureFournisseur extends Facture
/**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* @param user Objet user
* @return int <0 if KO, >0 if OK
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* @param User $user Objet user
* @return int <0 if KO, >0 if OK
*/
function load_board($user)
{
@ -1182,11 +1186,12 @@ class FactureFournisseur extends Facture
/**
* 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 max Max length of shown ref
* @return string Chaine avec URL
* Renvoie nom clicable (avec eventuellement le picto)
*
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @param string $option Sur quoi pointe le lien
* @param int $max Max length of shown ref
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0,$option='',$max=0)
{
@ -1306,10 +1311,11 @@ class FactureFournisseur extends Facture
}
/**
* Load an object from its id and create a new one in database
* @param fromid Id of object to clone
* @param invertdetail Reverse sign of amounts for lines
* @return int New id of clone
* Load an object from its id and create a new one in database
*
* @param int $fromid Id of object to clone
* @param int $invertdetail Reverse sign of amounts for lines
* @return int New id of clone
*/
function createFromClone($fromid,$invertdetail=0)
{

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
*
* 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
@ -65,9 +66,9 @@ class PaiementFourn extends Paiement
}
/**
* \brief Load payment object
* \param id id paiement to get
* \return int <0 si ko, >0 si ok
* Load payment object
* @param int $id id paiement to get
* @return int <0 if ko, >0 if ok
*/
function fetch($id)
{
@ -112,10 +113,11 @@ class PaiementFourn extends Paiement
}
/**
* Create payment in database
* @param user Object of creating user
* @param closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more
* @return int id of created payment, < 0 if error
* Create payment in database
*
* @param User $user Object of creating user
* @param int $closepaidinvoices 1=Also close payed invoices to paid, 0=Do nothing more
* @return int id of created payment, < 0 if error
*/
function create($user,$closepaidinvoices=0)
{
@ -233,10 +235,11 @@ class PaiementFourn extends Paiement
/**
* \brief Supprime un paiement ainsi que les lignes qu'il a genere dans comptes
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse
* \return int <0 si ko, >0 si ok
* Supprime un paiement ainsi que les lignes qu'il a genere dans comptes
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse
*
* @return int <0 si ko, >0 si ok
*/
function delete()
{
@ -316,9 +319,9 @@ class PaiementFourn extends Paiement
}
}
/*
* \brief Information sur l'objet
* \param id id du paiement dont il faut afficher les infos
/**
* Information sur l'objet
* @param int $id id du paiement dont il faut afficher les infos
*/
function info($id)
{
@ -358,9 +361,10 @@ class PaiementFourn extends Paiement
}
/**
* \brief Retourne la liste des factures sur lesquels porte le paiement
* \param filter Critere de filtre
* \return array Tableau des id de factures
* Retourne la liste des factures sur lesquels porte le paiement
*
* @param string $filter Critere de filtre
* @return array Tableau des id de factures
*/
function getBillsArray($filter='')
{
@ -393,9 +397,10 @@ class PaiementFourn extends Paiement
}
/**
* \brief Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee)
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* \return string Libelle
* Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee)
*
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle
*/
function getLibStatut($mode=0)
{
@ -403,10 +408,11 @@ class PaiementFourn extends Paiement
}
/**
* \brief Renvoi le libelle d'un statut donne
* \param status Statut
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* \return string Libelle du statut
* Renvoi le libelle d'un statut donne
*
* @param int $status Statut
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut
*/
function LibStatut($status,$mode=0)
{
@ -448,10 +454,11 @@ class PaiementFourn extends Paiement
/**
* \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
* \return string Chaine avec URL
* Renvoie nom clicable (avec eventuellement le picto)
*
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @param string $option Sur quoi pointe le lien
* @return string Chaine avec URL
*/
function getNomUrl($withpicto=0,$option='')
{