dolibarr  7.0.0-beta
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='')
 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

FormCompany::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

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 100 of file html.formcompany.class.php.

References $resql, and dol_syslog().

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 140 of file html.formcompany.class.php.

References $resql, dol_print_error(), dol_syslog(), print, and Form\selectarray().

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 770 of file html.formcompany.class.php.

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 373 of file html.formcompany.class.php.

References $resql, dol_print_error(), dol_syslog(), and info_admin().

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 192 of file html.formcompany.class.php.

References print, and select_state().

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 432 of file html.formcompany.class.php.

References print, and 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 447 of file html.formcompany.class.php.

References $resql, ajax_combobox(), dol_print_error(), dol_sort_array(), and dol_syslog().

Referenced by select_forme_juridique().

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 818 of file html.formcompany.class.php.

References get_localtax_by_third(), and print.

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 309 of file html.formcompany.class.php.

References $resql, dol_print_error(), dol_syslog(), and print.

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
Returns
string String with HTML select
See also
select_country

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

References ajax_combobox(), dol_print_error(), dol_syslog(), and if.

Referenced by select_departement().

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 741 of file html.formcompany.class.php.

References ajax_multiautocompleter().

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

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.
Returns
int The selected third party ID

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

References $resql, ajax_autocompleter(), dol_buildpath(), dol_print_error(), and print.

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 708 of file html.formcompany.class.php.

References if, and print.

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 59 of file html.formcompany.class.php.

References $resql, and dol_syslog().


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