This commit is contained in:
Laurent Destailleur 2012-03-12 15:09:46 +01:00
parent c040abe574
commit 36db79c249
8 changed files with 233 additions and 234 deletions

View File

@ -51,8 +51,8 @@ class AntiVir
* Scan a file with antivirus.
* This function runs the command defined in setup. This antivirus command must return 0 if OK.
*
* @param file File to scan
* @return int <0 if KO (-98 if error, -99 if virus), 0 if OK
* @param string $file File to scan
* @return int <0 if KO (-98 if error, -99 if virus), 0 if OK
*/
function dol_avscan_file($file)
{
@ -126,9 +126,10 @@ class AntiVir
/**
* \brief get full Command Line to run
* \param file File to scan
* \return string Full command line to run
* Get full Command Line to run
*
* @param string $file File to scan
* @return string Full command line to run
*/
function getCliCommand($file)
{

View File

@ -24,8 +24,7 @@
/**
* \class Canvas
* \brief Class to manage canvas
* Class to manage canvas
*/
class Canvas
{
@ -126,6 +125,7 @@ class Canvas
/**
* Return the template to display canvas (if it exists)
*
* @param string $action Action code
* @return int 0=Canvas template file does not exist, 1=Canvas template file exists
*/
function displayCanvasExists($action)
@ -140,7 +140,8 @@ class Canvas
* Display a canvas page. This will include the template for output.
* Variables used by templates may have been defined or loaded before into the assign_values function.
*
* @return void
* @param string $action Action code
* @return void
*/
function display_canvas($action)
{

View File

@ -22,10 +22,9 @@
*/
/**
* \class DolEditor
* \brief Class to manage a WYSIWYG editor.
* Usage: $doleditor=new DolEditor('body',$message,320,'toolbar_mailing');
* $doleditor->Create();
* Class to manage a WYSIWYG editor.
* Usage: $doleditor=new DolEditor('body',$message,320,'toolbar_mailing');
* $doleditor->Create();
*/
class DolEditor
{
@ -136,11 +135,11 @@ class DolEditor
}
/**
* Output edit area inside the HTML stream.
* Output depends on this->tool (fckeditor, ckeditor, texatrea, ...)
* Output edit area inside the HTML stream.
* Output depends on this->tool (fckeditor, ckeditor, texatrea, ...)
*
* @param int $noprint 1=Return HTML string instead of printing it to output
* @return void
* @param int $noprint 1=Return HTML string instead of printing it to output
* @return void
*/
function Create($noprint=0)
{

View File

@ -38,8 +38,7 @@
/**
* \class DolGraph
* \brief Parent class of graph classes
* Parent class of graph classes
*/
class DolGraph
{

View File

@ -456,7 +456,7 @@ class Form
$sql.= " WHERE active = 1";
$sql.= " ORDER BY code ASC";
dol_syslog("Form::select_country sql=".$sql);
dol_syslog(get_class($this)."::select_country sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@ -716,13 +716,14 @@ class Form
/**
* Return HTML combo list of absolute discounts
*
* @param selected Id remise fixe pre-selectionnee
* @param htmlname Nom champ formulaire
* @param filter Criteres optionnels de filtre
* @param maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list
* @param string $selected Id remise fixe pre-selectionnee
* @param string $htmlname Nom champ formulaire
* @param string $filter Criteres optionnels de filtre
* @param int $socid Id of thirdparty
* @param int $maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list
*/
function select_remises($selected='',$htmlname='remise_id',$filter='',$socid, $maxvalue=0)
function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
{
global $langs,$conf;
@ -734,7 +735,7 @@ class Form
if ($filter) $sql.= " AND ".$filter;
$sql.= " ORDER BY re.description ASC";
dol_syslog("Form::select_remises sql=".$sql);
dol_syslog(get_class(this)."::select_remises sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@ -782,15 +783,15 @@ class Form
/**
* Return list of all contacts (for a third party or all)
*
* @param socid Id ot third party or 0 for all
* @param selected Id contact pre-selectionne
* @param htmlname Name of HTML field ('none' for a not editable field)
* @param show_empty 0=no empty value, 1=add an empty value
* @param exclude List of contacts id to exclude
* @param limitto Disable answers that are not id in this array list
* @param showfunction Add function into label
* @param moreclass Add more class to class style
* @return int <0 if KO, Nb of contact in list if OK
* @param int $socid Id ot third party or 0 for all
* @param string $selected Id contact pre-selectionne
* @param string $htmlname Name of HTML field ('none' for a not editable field)
* @param int $show_empty 0=no empty value, 1=add an empty value
* @param string $exclude List of contacts id to exclude
* @param string $limitto Disable answers that are not id in this array list
* @param string $showfunction Add function into label
* @param string $moreclass Add more class to class style
* @return int <0 if KO, Nb of contact in list if OK
*/
function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='')
{
@ -879,14 +880,15 @@ class Form
/**
* Return select list of users
*
* @param selected Id user preselected
* @param htmlname Field name in form
* @param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @param exclude Array list of users id to exclude
* @param disabled If select list must be disabled
* @param include Array list of users id to include
* @param enableonly Array list of users id to be enabled. All other must be disabled
* @param force_entity Possibility to force entity
* @param string $selected Id user preselected
* @param string $htmlname Field name in form
* @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @param array $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled
* @param array $include Array list of users id to include
* @param int $enableonly Array list of users id to be enabled. All other must be disabled
* @param int $force_entity Possibility to force entity
* @return void
*/
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
{
@ -896,14 +898,15 @@ class Form
/**
* Return select list of users
*
* @param selected User id or user object of user preselected. If -1, we use id of current user.
* @param htmlname Field name in form
* @param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @param exclude Array list of users id to exclude
* @param disabled If select list must be disabled
* @param include Array list of users id to include
* @param enableonly Array list of users id to be enabled. All other must be disabled
* @param force_entity Possibility to force entity
* @param string $selected User id or user object of user preselected. If -1, we use id of current user.
* @param string $htmlname Field name in form
* @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* @param array $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled
* @param array $include Array list of users id to include
* @param int $enableonly Array list of users id to be enabled. All other must be disabled
* @param int $force_entity Possibility to force entity
* @return string HTML select string
*/
function select_dolusers($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
{
@ -940,7 +943,7 @@ class Form
if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')";
$sql.= " ORDER BY u.name ASC";
dol_syslog("Form::select_dolusers sql=".$sql);
dol_syslog(get_class($this)."::select_dolusers sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@ -1116,7 +1119,7 @@ class Form
$outselect='';
$outjson=array();
dol_syslog("Form::select_produits_do search product sql=".$sql, LOG_DEBUG);
dol_syslog(get_class($this)."::select_produits_do search product sql=".$sql, LOG_DEBUG);
$result=$this->db->query($sql);
if ($result)
{
@ -1177,7 +1180,7 @@ class Form
$sql.= " ORDER BY date_price";
$sql.= " DESC LIMIT 1";
dol_syslog("Form::select_produits_do search price for level '.$price_level.' sql=".$sql);
dol_syslog(get_class($this)."::select_produits_do search price for level '.$price_level.' sql=".$sql);
$result2 = $this->db->query($sql);
if ($result2)
{
@ -1265,7 +1268,7 @@ class Form
}
/**
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_fournisseurs_do
* Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_do)
*
* @param int $socid Id third party
* @param string $selected Preselected product
@ -1293,7 +1296,7 @@ class Form
}
/**
* Retourne la liste des produits de fournisseurs
* Return list of suppliers products
*
* @param socid Id societe fournisseur (0 pour aucun filtre)
* @param selected Produit pre-selectionne
@ -1465,7 +1468,7 @@ class Form
$sql.= " AND p.rowid = ".$productid;
$sql.= " ORDER BY s.nom, pfp.ref_fourn DESC";
dol_syslog("Form::select_product_fourn_price sql=".$sql,LOG_DEBUG);
dol_syslog(get_class($this)."::select_product_fourn_price sql=".$sql,LOG_DEBUG);
$result=$this->db->query($sql);
if ($result)
@ -1546,7 +1549,7 @@ class Form
$sql .= " WHERE a.fk_soc = ".$socid;
$sql .= " ORDER BY a.label ASC";
dol_syslog("Form::select_address sql=".$sql);
dol_syslog(get_class($this)."::select_address sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@ -1596,7 +1599,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX.'c_payment_term';
$sql.= " WHERE active=1";
$sql.= " ORDER BY sortorder";
dol_syslog('Form::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_conditions_paiements sql='.$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -1635,7 +1638,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX.'c_availability';
$sql.= " WHERE active=1";
$sql.= " ORDER BY rowid";
dol_syslog('Form::load_cache_availability sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_availability sql='.$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -1662,10 +1665,11 @@ class Form
/**
* Retourne la liste des types de delais de livraison possibles
*
* @param selected Id du type de delais pre-selectionne
* @param htmlname Nom de la zone select
* @param filtertype To add a filter
* @param addempty Add empty entry
* @param int $selected Id du type de delais pre-selectionne
* @param string $htmlname Nom de la zone select
* @param string $filtertype To add a filter
* @param int $addempty Add empty entry
* @return void
*/
function select_availability($selected='',$htmlname='availid',$filtertype='',$addempty=0)
{
@ -1707,7 +1711,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_reason';
$sql.= " WHERE active=1";
$sql.= " ORDER BY rowid";
dol_syslog('Form::load_cache_demand_reason sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this)."::load_cache_demand_reason sql=".$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -1739,10 +1743,11 @@ class Form
/**
* Return list of events that triggered an object creation
*
* @param selected Id du type d'origine pre-selectionne
* @param htmlname Nom de la zone select
* @param exclude To exclude a code value (Example: SRC_PROP)
* @param addempty Add an empty entry
* @param int $selected Id du type d'origine pre-selectionne
* @param string $htmlname Nom de la zone select
* @param string $exclude To exclude a code value (Example: SRC_PROP)
* @param int $addempty Add an empty entry
* @return void
*/
function select_demand_reason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0)
{
@ -1786,7 +1791,7 @@ class Form
$sql.= " FROM ".MAIN_DB_PREFIX."c_paiement";
$sql.= " WHERE active > 0";
$sql.= " ORDER BY id";
dol_syslog('Form::load_cache_types_paiements sql='.$sql,LOG_DEBUG);
dol_syslog(get_class($this)."::load_cache_types_paiements sql=".$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -1816,10 +1821,11 @@ class Form
/**
* Retourne la liste des types de paiements possibles
*
* @param selected Id du type de paiement pre-selectionne
* @param htmlname Nom de la zone select
* @param filtertype Pour filtre
* @param addempty Ajoute entree vide
* @param string $selected Id du type de paiement pre-selectionne
* @param string $htmlname Nom de la zone select
* @param string $filtertype Pour filtre
* @param int $addempty Ajoute entree vide
* @return void
*/
function select_conditions_paiements($selected='',$htmlname='condid',$filtertype=-1,$addempty=0)
{
@ -1850,19 +1856,20 @@ class Form
/**
* Return list of payment methods
*
* @param selected Id du mode de paiement pre-selectionne
* @param htmlname Nom de la zone select
* @param filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
* @param format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
* @param empty 1=peut etre vide, 0 sinon
* @param noadmininfo 0=Add admin info, 1=Disable admin info
* @param maxlength Max length of label
* @param string $selected Id du mode de paiement pre-selectionne
* @param string $htmlname Nom de la zone select
* @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
* @param int $empty 1=peut etre vide, 0 sinon
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
* @param int $maxlength Max length of label
* @return void
*/
function select_types_paiements($selected='',$htmlname='paiementtype',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0)
{
global $langs,$user;
dol_syslog("Form::select_type_paiements $selected, $htmlname, $filtertype, $format",LOG_DEBUG);
dol_syslog(get_class($this)."::select_type_paiements ".$selected.", ".$htmlname.", ".$filtertype.", ".$format,LOG_DEBUG);
$filterarray=array();
if ($filtertype == 'CRDT') $filterarray=array(0,2);
@ -1904,8 +1911,9 @@ class Form
/**
* Selection HT or TTC
*
* @param selected Id pre-selectionne
* @param htmlname Nom de la zone select
* @param string $selected Id pre-selectionne
* @param string $htmlname Nom de la zone select
* @return void
*/
function select_PriceBaseType($selected='',$htmlname='price_base_type')
{
@ -1916,8 +1924,9 @@ class Form
/**
* Selection HT or TTC
*
* @param selected Id pre-selectionne
* @param htmlname Nom de la zone select
* @param string $selected Id pre-selectionne
* @param string $htmlname Nom de la zone select
* @return void
*/
function load_PriceBaseType($selected='',$htmlname='price_base_type')
{
@ -1927,8 +1936,8 @@ class Form
$return.= '<select class="flat" name="'.$htmlname.'">';
$options = array(
'HT'=>$langs->trans("HT"),
'TTC'=>$langs->trans("TTC")
'HT'=>$langs->trans("HT"),
'TTC'=>$langs->trans("TTC")
);
foreach($options as $id => $value)
{
@ -1948,14 +1957,15 @@ class Form
}
/**
* Return a HTML select list of bank accounts
* Return a HTML select list of bank accounts
*
* @param selected Id account pre-selected
* @param htmlname Name of select zone
* @param statut Status of searched accounts (0=open, 1=closed)
* @param filtre To filter list
* @param useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @param moreattrib To add more attribute on select
* @param string $selected Id account pre-selected
* @param string $htmlname Name of select zone
* @param int $statut Status of searched accounts (0=open, 1=closed)
* @param string $filtre To filter list
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @param string $moreattrib To add more attribute on select
* @return void
*/
function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='')
{
@ -1970,7 +1980,7 @@ class Form
if ($filtre) $sql.=" AND ".$filtre;
$sql.= " ORDER BY label";
dol_syslog("Form::select_comptes sql=".$sql);
dol_syslog(get_class($this)."::select_comptes sql=".$sql);
$result = $this->db->query($sql);
if ($result)
{
@ -2014,11 +2024,11 @@ class Form
/**
* Return list of categories having choosed type
*
* @param type Type de categories (0=product, 1=supplier, 2=customer, 3=member)
* @param selected Id of category preselected
* @param select_name HTML field name
* @param maxlength Maximum length for labels
* @param excludeafterid Exclude all categories after this leaf in category tree.
* @param int $type Type de categories (0=product, 1=supplier, 2=customer, 3=member)
* @param string $selected Id of category preselected
* @param string $select_name HTML field name
* @param int $maxlength Maximum length for labels
* @param int $excludeafterid Exclude all categories after this leaf in category tree.
*/
function select_all_categories($type, $selected='', $select_name="", $maxlength=64, $excludeafterid=0)
{
@ -2059,15 +2069,15 @@ class Form
/**
* Show a confirmation HTML form or AJAX popup
*
* @param page Url of page to call if confirmation is OK
* @param title title
* @param question question
* @param action action
* @param formquestion an array with forms complementary inputs
* @param selectedchoice "" or "no" or "yes"
* @param useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
* @param height Force height of box
* @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
* @param string $page Url of page to call if confirmation is OK
* @param string $title Title
* @param string $question Question
* @param string $action Action
* @param array $formquestion An array with forms complementary inputs
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
* @param int $height Force height of box
* @return void
*/
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{
@ -2077,15 +2087,15 @@ class Form
/**
* Show a confirmation HTML form or AJAX popup
*
* @param string $page Url of page to call if confirmation is OK
* @param string $title Title
* @param string $question Question
* @param string $action Action
* @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , ))
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box
* @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
* @param string $page Url of page to call if confirmation is OK
* @param string $title Title
* @param string $question Question
* @param string $action Action
* @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , ))
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box
* @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form
*/
function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{
@ -2326,13 +2336,13 @@ class Form
}
/**
* Show a form to select payment conditions
* Show a form to select payment conditions
*
* @param page Page
* @param selected Id condition pre-selectionne
* @param htmlname Name of select html field
* @param addempty Ajoute entree vide
* @return void
* @param int $page Page
* @param string $selected Id condition pre-selectionne
* @param string $htmlname Name of select html field
* @param int $addempty Ajoute entree vide
* @return void
*/
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
{
@ -2398,13 +2408,13 @@ class Form
}
/**
* Show a select form to select origin
* Show a select form to select origin
*
* @param page Page
* @param selected Id condition pre-selectionne
* @param htmlname Name of select html field
* @param addempty Add empty entry
* @return void
* @param string $page Page
* @param string $selected Id condition pre-selectionne
* @param string $htmlname Name of select html field
* @param int $addempty Add empty entry
* @return void
*/
function form_demand_reason($page, $selected='', $htmlname='demandreason', $addempty=0)
{
@ -2443,9 +2453,9 @@ class Form
/**
* Show a form to select a date
*
* @param page Page
* @param selected Date preselected
* @param htmlname Name of input html field
* @param string $page Page
* @param string $selected Date preselected
* @param string $htmlname Name of input html field
* @return void
*/
function form_date($page, $selected='', $htmlname)
@ -2478,14 +2488,14 @@ class Form
/**
* Show a select form to choose a user
* Show a select form to choose a user
*
* @param page Page
* @param selected Id of user preselected
* @param htmlname Name of input html field
* @param exclude List of users id to exclude
* @param include List of users id to include
* @return void
* @param string $page Page
* @param string $selected Id of user preselected
* @param string $htmlname Name of input html field
* @param array $exclude List of users id to exclude
* @param array $include List of users id to include
* @return void
*/
function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='')
{
@ -2523,9 +2533,9 @@ class Form
/**
* Affiche formulaire de selection des modes de reglement
*
* @param page Page
* @param selected Id mode pre-selectionne
* @param htmlname Name of select html field
* @param string $page Page
* @param int $selected Id mode pre-selectionne
* @param string $htmlname Name of select html field
* @return void
*/
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id')
@ -2621,9 +2631,9 @@ class Form
/**
* Affiche formulaire de selection des contacts
*
* @param page Page
* @param selected Id contact pre-selectionne
* @param htmlname Nom du formulaire select
* @param string $page Page
* @param int $selected Id contact pre-selectionne
* @param string $htmlname Nom du formulaire select
* @return void
*/
function form_contacts($page, $societe, $selected='', $htmlname='contactidp')
@ -2706,8 +2716,8 @@ class Form
/**
* Retourne la liste des devises, dans la langue de l'utilisateur
*
* @param selected code devise pre-selectionne
* @param htmlname nom de la liste deroulante
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @return void
*/
function select_currency($selected='',$htmlname='currency_id')
@ -2716,9 +2726,9 @@ class Form
}
/**
* Charge dans cache la liste des devises
* Load into the cache all currencies
*
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
*/
function load_cache_currencies()
{
@ -2733,7 +2743,7 @@ class Form
$sql.= " WHERE active = 1";
$sql.= " ORDER BY code_iso ASC";
dol_syslog('Form::load_cache_currencies sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::load_cache_currencies sql='.$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@ -2762,10 +2772,11 @@ class Form
}
/**
* Retourne la liste des devises, dans la langue de l'utilisateur
* Retourne la liste des devises, dans la langue de l'utilisateur
*
* @param selected code devise pre-selectionne
* @param htmlname nom de la liste deroulante
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @return void
*/
function selectcurrency($selected='',$htmlname='currency_id')
{
@ -2800,22 +2811,22 @@ class Form
}
/**
* Output an HTML select vat rate
* Output an HTML select vat rate
*
* @param htmlname Nom champ html
* @param selectedrate Forcage du taux tva pre-selectionne. Mettre '' pour aucun forcage.
* @param societe_vendeuse Objet societe vendeuse
* @param societe_acheteuse Objet societe acheteuse
* @param idprod Id product
* @param info_bits Miscellaneous information on line
* @param type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* @deprecated
* @return void
* @param string $htmlname Nom champ html
* @param float $selectedrate Forcage du taux tva pre-selectionne. Mettre '' pour aucun forcage.
* @param Societe $societe_vendeuse Object societe vendeuse
* @param Societe $societe_acheteuse Object societe acheteuse
* @param int $idprod Id product
* @param int $info_bits Miscellaneous information on line
* @param type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* @return void
* @deprecated
*/
function select_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='')
{
@ -2824,21 +2835,21 @@ class Form
/**
* Output an HTML select vat rate
* Output an HTML select vat rate
*
* @param htmlname Nom champ html
* @param selectedrate Forcage du taux tva pre-selectionne. Mettre '' pour aucun forcage.
* @param societe_vendeuse Objet societe vendeuse
* @param societe_acheteuse Objet societe acheteuse
* @param idprod Id product
* @param info_bits Miscellaneous information on line (1 for NPR)
* @param type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* @return void
* @param string $htmlname Nom champ html
* @param float $selectedrate Forcage du taux tva pre-selectionne. Mettre '' pour aucun forcage.
* @param Societe $societe_vendeuse Objet societe vendeuse
* @param Societe $societe_acheteuse Objet societe acheteuse
* @param int $idprod Id product
* @param int $info_bits Miscellaneous information on line (1 for NPR)
* @param int $type ''=Unknown, 0=Product, 1=Service (Used if idprod not defined)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon la TVA proposee par defaut=0. Fin de regle.
* @return void
*/
function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='')
{
@ -2986,24 +2997,24 @@ class Form
/**
* Show a HTML widget to input a date or combo list for day, month, years and optionnaly hours and minutes
* Fields are preselected with :
* Show a HTML widget to input a date or combo list for day, month, years and optionnaly hours and minutes
* Fields are preselected with :
* - set_time date (Local PHP server timestamps or date format YYYY-MM-DD or YYYY-MM-DD HH:MM)
* - local date of PHP server if set_time is ''
* - Empty (fields empty) if set_time is -1 (in this case, parameter empty must also have value 1)
*
* @param set_time Pre-selected date (must be a local PHP server timestamp)
* @param prefix Prefix for fields name
* @param h 1=Show also hours
* @param m 1=Show also minutes
* @param empty 0=Fields required, 1=Empty input is allowed
* @param form_name Form name. Used by popup dates.
* @param d 1=Show days, month, years
* @param addnowbutton Add a button "Now"
* @param nooutput Do not output html string but return it
* @param disabled Disable input fields
* @param fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
* @return nothing or string if nooutput is 1
* @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp)
* @param string $prefix Prefix for fields name
* @param int $h 1=Show also hours
* @param int $m 1=Show also minutes
* @param int $empty 0=Fields required, 1=Empty input is allowed
* @param string $form_name Form name. Used by popup dates.
* @param int $d 1=Show days, month, years
* @param int $addnowbutton Add a button "Now"
* @param int $nooutput Do not output html string but return it
* @param int $disabled Disable input fields
* @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
* @return mixed Nothing or string if nooutput is 1
*/
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowbutton=0, $nooutput=0, $disabled=0, $fullday='')
{
@ -3296,17 +3307,17 @@ class Form
/**
* Show a select form from an array
*
* @param htmlname Name of html select area
* @param array Array with key+value
* @param id Preselected key
* @param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
* @param key_in_label 1 pour afficher la key dans la valeur "[key] value"
* @param value_as_key 1 to use value as key
* @param option Valeur de l'option en fonction du type choisi
* @param translate Translate and encode value
* @param maxlen Length maximum for labels
* @param disabled Html select box is disabled
* @return string HTML select string
* @param string $htmlname Name of html select area
* @param array $array Array with key+value
* @param int $id Preselected key
* @param int $show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
* @param int $value_as_key 1 to use value as key
* @param string $option Valeur de l'option en fonction du type choisi
* @param int $translate Translate and encode value
* @param int $maxlen Length maximum for labels
* @param int $disabled Html select box is disabled
* @return string HTML select string
*/
function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0, $disabled=0)
{
@ -3355,17 +3366,6 @@ class Form
return $out;
}
/**
* Show a select form from an array
*
* @deprecated Use selectarray instead
* @return void
*/
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0)
{
print $this->selectarray($htmlname, $array, $id, $show_empty, $key_in_label, $value_as_key, $option, $translate, $maxlen);
}
/**
* Return an html string with a select combo box to choose yes or no
@ -3408,12 +3408,12 @@ class Form
/**
* Return list of export templates
* Return list of export templates
*
* @param selected Id modele pre-selectionne
* @param htmlname Nom de la zone select
* @param type Type des modeles recherches
* @param useempty Affiche valeur vide dans liste
* @param string $selected Id modele pre-selectionne
* @param string $htmlname Name of HTML select
* @param string $type Type of searched templates
* @param int $useempty Affiche valeur vide dans liste
* @return void
*/
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
@ -3673,7 +3673,7 @@ class Form
if (is_array($include) && $includeGroups) $sql.= " AND ug.rowid IN ('".$includeGroups."')";
$sql.= " ORDER BY ug.nom ASC";
dol_syslog("Form::select_dolgroups sql=".$sql);
dol_syslog(get_class($this)."::select_dolgroups sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@ -142,6 +142,7 @@ class Ldap
* false if failed. Takes an array of possible servers - if one doesn't work,
* it tries the next and so on.
*
* @return void
* @deprecated Utiliser connect_bind a la place
*/
function connect()
@ -184,7 +185,7 @@ class Ldap
* Use this->server, this->serverPort, this->ldapProtocolVersion, this->serverType, this->searchUser, this->searchPassword
* After return, this->connection and $this->bind are defined
*
* @return int <0 si KO, 1 si bind anonymous, 2 si bind auth
* @return int <0 if KO, 1 if bind anonymous, 2 if bind auth
*/
function connect_bind()
{

View File

@ -17,14 +17,13 @@
*/
/**
* \file htdocs/core/class/stats.class.php
* \ingroup core
* \brief Common class to manage statistics reports
* \file htdocs/core/class/stats.class.php
* \ingroup core
* \brief Common class to manage statistics reports
*/
/**
* \class Stats
* \brief Parent class of statistics class
* Parent class of statistics class
*/
abstract class Stats
{

View File

@ -85,8 +85,7 @@ function dol_quoted_printable_encode($input, $line_max=76)
/**
* \class vCard
* \brief Class to buld vCard files
* Class to buld vCard files
*/
class vCard
{