dolibarr  9.0.0
Public Member Functions | List of all members
FormCompany Class Reference

Class to build HTML component for third parties management Only common components are here. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 typent_array ($mode=0, $filter='')
 Return list of labels (translated) of third parties type. More...
 
 effectif_array ($mode=0, $filter='')
 Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre) More...
 
 form_prospect_level ($page, $selected='', $htmlname='prospect_level_id', $empty=0)
 Affiche formulaire de selection des modes de reglement. More...
 
 select_departement ($selected='', $country_codeid=0, $htmlname='state_id')
 Retourne la liste deroulante des departements/province/cantons tout pays confondu ou pour un pays donne. More...
 
 select_state ($selected='', $country_codeid=0, $htmlname='state_id')
 Retourne la liste deroulante des departements/province/cantons tout pays confondu ou pour un pays donne. More...
 
 select_region ($selected='', $htmlname='region_id')
 Retourne la liste deroulante des regions actives dont le pays est actif La cle de la liste est le code (il peut y avoir plusieurs entree pour un code donnee mais dans ce cas, le champ pays et lang differe). More...
 
 select_civility ($selected='', $htmlname='civility_id', $morecss='maxwidth100')
 Return combo list with people title. More...
 
 select_forme_juridique ($selected='', $country_codeid=0, $filter='')
 Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. More...
 
 select_juridicalstatus ($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code')
 Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. More...
 
 selectCompaniesForNewContact ($object, $var_id, $selected='', $htmlname='newcompany', $limitto='', $forceid=0, $moreparam='', $morecss='')
 Output list of third parties. More...
 
 selectTypeContact ($object, $selected, $htmlname='type', $source='internal', $sortorder='position', $showempty=0, $morecss='')
 Return a select list with types of contacts. More...
 
 select_ziptown ($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='', $morecss='')
 Return a select list with zip codes and their town. More...
 
 get_input_id_prof ($idprof, $htmlname, $preselected, $country_code, $morecss='maxwidth100onsmartphone quatrevingtpercent')
 Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) More...
 
 select_localtax ($local, $selected, $htmlname)
 Return a HTML select with localtax values for thirdparties. More...
 

Detailed Description

Class to build HTML component for third parties management Only common components are here.

Definition at line 32 of file html.formcompany.class.php.

Constructor & Destructor Documentation

◆ __construct()

FormCompany::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 49 of file html.formcompany.class.php.

Member Function Documentation

◆ effectif_array()

FormCompany::effectif_array (   $mode = 0,
  $filter = '' 
)

Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre)

Parameters
int$mode0=renvoi id+libelle, 1=renvoi code+libelle
string$filterAdd a SQL filter to select
Returns
array Array of types d'effectifs

Definition at line 106 of file html.formcompany.class.php.

◆ form_prospect_level()

FormCompany::form_prospect_level (   $page,
  $selected = '',
  $htmlname = 'prospect_level_id',
  $empty = 0 
)

Affiche formulaire de selection des modes de reglement.

Parameters
int$pagePage
int$selectedId or code preselected
string$htmlnameNom du formulaire select
int$emptyAdd empty value in list
Returns
void

Definition at line 148 of file html.formcompany.class.php.

◆ get_input_id_prof()

FormCompany::get_input_id_prof (   $idprof,
  $htmlname,
  $preselected,
  $country_code,
  $morecss = 'maxwidth100onsmartphone quatrevingtpercent' 
)

Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...)

Parameters
int$idprof1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm)
string$htmlnameName of HTML select
string$preselectedDefault value to show
string$country_codeFR, IT, ...
string$morecssMore css
Returns
string HTML string with prof id

Definition at line 808 of file html.formcompany.class.php.

◆ select_civility()

FormCompany::select_civility (   $selected = '',
  $htmlname = 'civility_id',
  $morecss = 'maxwidth100' 
)

Return combo list with people title.

Parameters
string$selectedTitle preselected
string$htmlnameName of HTML select combo field
string$morecssAdd more css on SELECT element
Returns
string String with HTML select

Definition at line 401 of file html.formcompany.class.php.

◆ select_departement()

FormCompany::select_departement (   $selected = '',
  $country_codeid = 0,
  $htmlname = 'state_id' 
)

Retourne la liste deroulante des departements/province/cantons tout pays confondu ou pour un pays donne.

Dans le cas d'une liste tout pays confondus, l'affichage fait une rupture sur le pays. La cle de la liste est le code (il peut y avoir plusieurs entree pour un code donnee mais dans ce cas, le champ pays differe). Ainsi les liens avec les departements se font sur un departement independemment de son nom.

Parameters
string$selectedCode state preselected
int$country_codeid0=list for all countries, otherwise country code or country rowid to show
string$htmlnameId of department
Returns
void

Definition at line 202 of file html.formcompany.class.php.

◆ select_forme_juridique()

FormCompany::select_forme_juridique (   $selected = '',
  $country_codeid = 0,
  $filter = '' 
)

Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne.

Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays.

Parameters
string$selectedCode forme juridique a pre-selectionne
mixed$country_codeid0=liste tous pays confondus, sinon code du pays a afficher
string$filterAdd a SQL filter on list
Returns
void
Deprecated:
Use print xxx->select_juridicalstatus instead
See also
select_juridicalstatus()

Definition at line 462 of file html.formcompany.class.php.

◆ select_juridicalstatus()

FormCompany::select_juridicalstatus (   $selected = '',
  $country_codeid = 0,
  $filter = '',
  $htmlname = 'forme_juridique_code' 
)

Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne.

Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays

Parameters
string$selectedPreselected code of juridical type
int$country_codeid0=list for all countries, otherwise list only country requested
string$filterAdd a SQL filter on list
string$htmlnameHTML name of select
Returns
string String with HTML select

Definition at line 479 of file html.formcompany.class.php.

◆ select_localtax()

FormCompany::select_localtax (   $local,
  $selected,
  $htmlname 
)

Return a HTML select with localtax values for thirdparties.

Parameters
int$localLocalTax
int$selectedPreselected value
string$htmlnameHTML select name
Returns
void

Definition at line 858 of file html.formcompany.class.php.

◆ select_region()

FormCompany::select_region (   $selected = '',
  $htmlname = 'region_id' 
)

Retourne la liste deroulante des regions actives dont le pays est actif La cle de la liste est le code (il peut y avoir plusieurs entree pour un code donnee mais dans ce cas, le champ pays et lang differe).

Ainsi les liens avec les regions se font sur une region independemment de son name.

Parameters
string$selectedPreselected value
string$htmlnameName of HTML select field
Returns
void

Definition at line 335 of file html.formcompany.class.php.

◆ select_state()

FormCompany::select_state (   $selected = '',
  $country_codeid = 0,
  $htmlname = 'state_id' 
)

Retourne la liste deroulante des departements/province/cantons tout pays confondu ou pour un pays donne.

Dans le cas d'une liste tout pays confondus, l'affichage fait une rupture sur le pays. La cle de la liste est le code (il peut y avoir plusieurs entree pour un code donnee mais dans ce cas, le champ pays differe). Ainsi les liens avec les departements se font sur un departement independemment de son nom.

Parameters
string$selectedCode state preselected (mus be state id)
integer$country_codeidCountry code or id: 0=list for all countries, otherwise country code or country rowid to show
string$htmlnameId of department. If '', we want only the string with <option>
Returns
string String with HTML select
See also
select_country

Definition at line 222 of file html.formcompany.class.php.

◆ select_ziptown()

FormCompany::select_ziptown (   $selected = '',
  $htmlname = 'zipcode',
  $fields = '',
  $fieldsize = 0,
  $disableautocomplete = 0,
  $moreattrib = '',
  $morecss = '' 
)

Return a select list with zip codes and their town.

Parameters
string$selectedPreselected value
string$htmlnameHTML select name
string$fieldsFields
int$fieldsizeField size
int$disableautocomplete1 To disable ajax autocomplete features (browser autocomplete may still occurs)
string$moreattribAdd more attribute on HTML input field
string$morecssMore css
Returns
string

Definition at line 777 of file html.formcompany.class.php.

◆ selectCompaniesForNewContact()

FormCompany::selectCompaniesForNewContact (   $object,
  $var_id,
  $selected = '',
  $htmlname = 'newcompany',
  $limitto = '',
  $forceid = 0,
  $moreparam = '',
  $morecss = '' 
)

Output list of third parties.

Parameters
object$objectObject we try to find contacts
string$var_idName of id field
string$selectedPre-selected third party
string$htmlnameName of HTML form
array$limittoDisable answers that are not id in this array list
int$forceidThis is to force another object id than object->id
string$moreparamString with more param to add into url when noajax search is used.
string$morecssMore CSS on select component
Returns
int The selected third party ID

Definition at line 584 of file html.formcompany.class.php.

◆ selectTypeContact()

FormCompany::selectTypeContact (   $object,
  $selected,
  $htmlname = 'type',
  $source = 'internal',
  $sortorder = 'position',
  $showempty = 0,
  $morecss = '' 
)

Return a select list with types of contacts.

Parameters
object$objectObject to use to find type of contact
string$selectedDefault selected value
string$htmlnameHTML select name
string$sourceSource ('internal' or 'external')
string$sortorderSort criteria ('position', 'code', ...)
int$showempty1=Add en empty line
string$morecssAdd more css to select component
Returns
void

Definition at line 743 of file html.formcompany.class.php.

◆ typent_array()

FormCompany::typent_array (   $mode = 0,
  $filter = '' 
)

Return list of labels (translated) of third parties type.

Parameters
int$mode0=Return id+label, 1=Return code+label
string$filterAdd a SQL filter to select
Returns
array Array of types

Definition at line 63 of file html.formcompany.class.php.


The documentation for this class was generated from the following file: