FormFiscalYear
class FormFiscalYear extends Form (View source)
Class to manage generation of HTML components for accounting management
Properties
| DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | from Form | |
| array<string, int> | $result | from Form | |
| int | $num | from Form | |
| array<string, array{id: int, code: string, label: string, type: int, entity: int, active: int}> | $cache_types_paiements | from Form | |
| array<string, array{code: string, label: string, deposit_percent: string, entity: int}> | $cache_conditions_paiements | from Form | |
| array<int, array{rowid: int, code: string, label: string, active: int}> | $cache_transport_mode | from Form | |
| array<int, array{code: string, label: string, position: int}> | $cache_availability | from Form | |
| array<int, array{id: int, code: string, label: string}> | $cache_demand_reason | from Form | |
| array<string, string> | $cache_types_fees | from Form | |
| array<int, array{rowid: int, type_vat: int, code: string, txtva: string, nprtva: int, localtax1: string|float|null, localtax1_type: string, localtax2: string|float|null, localtax2_type: string, label: string, labelallrates: string, labelpositiverates: string}> | $cache_vatrates | from Form | |
| array<int, array{rowid: int, code: string, label: string}> | $cache_invoice_subtype | from Form | |
| array<string, string> | $cache_rule_for_lines_dates | from Form |
Methods
Return an array of Duration Types
Output key field for an editable field
Output value of a field for an editable field
Output edit in place form
Output edit in place form
Show a text and picto with tooltip on text or picto.
Show a text with a picto and a tooltip on picto
Generate select HTML to choose massaction
Return combo list of activated countries, into language of user
Return select list of incoterms
Return list of types of lines (product or service) Example: 0=product, 1=service, 9=other (for external module)
Return list of types of notes
Output html form to select a third party This call select_thirdparty_list() or ajax depending on setup. This component is not able to support multiple select.
Output html form to select a contact This call select_contacts() or ajax depending on setup. This component is not able to support multiple select.
Output html form to select a third party.
Return HTML code of the SELECT of list of all contacts (for a third party or all).
Return HTML combo list of absolute discounts
Return the HTML select list of users
Return select list of users
Return select list of users. Selected users are stored into session.
Return select list of resources. Selected resources are stored into session.
Return list of products.
Return list of BOM for customer in Ajax if Ajax activated or go to select_produits_list
Return list of products for a customer.
Function to forge the string with OPTIONs of SELECT.
Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
Return list of suppliers products
Return list of suppliers prices for a product
Loads into a cache property the list of possible rules for line dates
Load int a cache property the list of possible delivery delays.
Return the list of type of delay available.
Return list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason
Charge dans cache la liste des types de paiements possibles
print list of payment modes.
Return list of payment modes.
Returns select with rule for lines dates
Return list of payment methods Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want.
Selection HT or TTC
Return list of transport mode for intracomm report
Return a HTML select list of shipping mode
Display form to select shipping mode
Creates HTML last in cycle situation invoices selector
Creates HTML units selector (code => label)
Return a HTML select list of bank accounts
Return a HTML select list of bank accounts customer
Return a HTML select list of establishment
Display form to select bank account
Display form to select bank customer account
Return HTML component to select a category
Return list of categories having chosen type
Show a confirmation HTML form or AJAX popup
Show a confirmation HTML form or AJAX popup.
Show a form to select a project
Show a form to select payment conditions
Form select for rule for lines dates
Show a form to select a delivery delay
Output HTML form to select list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason
Show a form + html select a date
Show a select form to choose a user
Show form with payment mode
Show form with transport mode
Show form with multicurrency code
Show form with multicurrency rate
Show a select box with available absolute discounts
Show forms to select a contact
Output html select to select thirdparty
Retourne la liste des devises, dans la langue de l'utilisateur
Retourne la liste des devises, dans la langue de l'utilisateur
Return array of currencies in user language
Load into the cache ->cache_vatrates, all the vat rates of a country
Output an HTML select vat rate.
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Show 2 HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
selectTypeDuration
Function to show a form to select a duration on a page
Return list of tickets in Ajax if Ajax activated or go to selectTicketsList
Return list of tickets.
constructTicketListOption.
Return list of projects in Ajax if Ajax activated or go to selectTicketsList
Return list of projects.
constructProjectListOption.
Return list of members in Ajax if Ajax activated or go to selectTicketsList
Return list of adherents.
constructMemberListOption.
Generic method to select a component from a combo list.
Output html form to select an object.
Generates a set of HTML radio inputs from an array of key-value items.
Return a HTML select string, built from an array of key+value.
Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL.
Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter.
Show a multiselect form from an array. WARNING: Use this only for short lists.
Show a multiselect dropbox from an array.
Render list of categories linked to object with id $id and type $type
Show linked object block.
Show block with links "to link to" other objects.
Return an html string with a select combo box to choose yes or no
Return list of export templates
Return a HTML area with the reference of object and a navigation bar for a business object Note: To complete search with a particular filter on select, you can set $object->next_prev_filter set to define SQL criteria.
Return HTML code to output a barcode
Return HTML code to output a photo
Return select list of user groups
Return HTML to show the search and clear search button
Return HTML to show the search and clear search button
Return HTML to show the search and clear search button
Return HTML to show the select of expense categories
Return HTML to show the select ranges of expense range
Return HTML to show a select of expense
Output a combo list with invoices for a project
Output a combo list with invoices qualified for a third party TODO Bad method. This is used by viewcat.php. We must use a generic method in viewcat to use an ajax search ad remove this one that download all the database.
Output the component to make advanced search criteria
selectModelMail
Output the buttons to submit a creation/edit form
Return list of invoice subtypes.
No description
Html for input with label
Html for select with get options by AJAX
Html for HTML area
Html for HTML area
Html for input radio
Html for input stars
Html for input icon
Html for input geo point
Return link of object
Return list of fiscal year
Details
__construct(DoliDB $db)
Constructor
in
Form at line 119
array{y: string, m: string, w: string, d: string, h: string, i: string, s: string}
getDurationTypes(Translate $langs, bool $plurial = true, bool $reverse = false)
Return an array of Duration Types
in
Form at line 165
string
editfieldkey(string $text, string $htmlname, string $preselected, ?object $object, int<0, 1>|bool $perm, string $typeofdata = 'string', string $moreparam = '', int<0, 1> $fieldrequired = 0, int<0, 3> $notabletag = 0, "id"|"socid"|"projectid" $paramid = 'id', string $help = '')
Output key field for an editable field
in
Form at line 274
string
editfieldval(string $text, string $htmlname, string|int $value, CommonObject|ActionsCardProduct|ActionsCardService $object, bool|int<0, 1> $perm, string $typeofdata = 'string', ?string $editvalue = '', CommonObject $extObject = null, string|array<string, string>|null $custommsg = null, string $moreparam = '', int<0, 1> $notabletag = 1, string $formatfunc = '', string $paramid = 'id', string $gm = 'auto', array<string, int> $moreoptions = array(), string $editaction = '')
Output value of a field for an editable field
in
Form at line 472
string
widgetForTranslation(string $fieldname, CommonObject $object, bool|int<0, 1> $perm, string $typeofdata = 'string', string $check = '', string $morecss = '')
Output edit in place form
in
Form at line 546
protected string
editInPlace(CommonObject $object, string $value, string $htmlname, int $condition, string $inputType = 'textarea', ?string $editvalue = null, CommonObject $extObject = null, string|array<string, string>|null $custommsg = null)
Output edit in place form
in
Form at line 691
textwithtooltip(string $text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
Show a text and picto with tooltip on text or picto.
Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip
in
Form at line 807
string
textwithpicto(string $text, string $htmltooltip, int<-1, 1> $direction = 1, string $type = 'help', string $extracss = 'valignmiddle', int<0, 1> $noencodehtmltext = 0, int<0, 3> $notabs = 3, string $tooltiptrigger = '', int<0, 1> $forcenowrap = 0)
Show a text with a picto and a tooltip on picto
in
Form at line 885
string|void
selectMassAction(string $selected, array<string, string> $arrayofaction, int $alwaysvisible = 0, string $name = 'massaction', string $cssclass = 'checkforselect')
Generate select HTML to choose massaction
in
Form at line 995
string
select_country(int|string $selected = '', string $htmlname = 'country_id', string $htmloption = '', int $maxlength = 0, string $morecss = 'minwidth300', string $usecodeaskey = '', int<0, 1>|string $showempty = 1, int<0, 1> $disablefavorites = 0, int<0, 1> $addspecialentries = 0, string[] $exclude_country_code = array(), int<0, 1> $hideflags = 0, int<0, 1> $forcecombo = 0)
Return combo list of activated countries, into language of user
in
Form at line 1137
string
select_incoterms(string $selected = '', string $location_incoterms = '', string $page = '', string $htmlname = 'incoterm_id', string $htmloption = '', int<0, 1> $forcecombo = 1, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), int<0, 1> $disableautocomplete = 0)
Return select list of incoterms
in
Form at line 1227
void
select_type_of_lines(string $selected = '', string $htmlname = 'type', int<0, 1>|string $showempty = 0, int $hidetext = 0, int $forceall = 0, string $morecss = "", int $useajaxcombo = 1)
Return list of types of lines (product or service) Example: 0=product, 1=service, 9=other (for external module)
in
Form at line 1295
int
load_cache_types_fees()
Load into cache cache_types_fees, array of types of fees
in
Form at line 1346
void
select_type_fees(string $selected = '', string $htmlname = 'type', int $showempty = 0)
Return list of types of notes
in
Form at line 1405
string
select_company(int|string $selected = '', string $htmlname = 'socid', string $filter = '', string|int<1, 1> $showempty = '', int<0, 1> $showtype = 0, int<0, 1> $forcecombo = 0, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), int $limit = 0, string $morecss = 'minwidth100', string $moreparam = '', string $selected_input_value = '', int<0, 3> $hidelabel = 1, array<string, string|string[]> $ajaxoptions = array(), bool $multiple = false, string[] $excludeids = array(), int<0, 1> $showcode = 0)
Output html form to select a third party This call select_thirdparty_list() or ajax depending on setup. This component is not able to support multiple select.
in
Form at line 1487
int|string
select_contact(int $socid, int|string $selected = '', string $htmlname = 'contactid', int<0, 3>|string $showempty = 0, string $exclude = '', string $limitto = '', int<0, 1> $showfunction = 0, string $morecss = '', bool $nokeyifsocid = true, int $showsoc = 0, int<0, 1> $forcecombo = 0, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), string $moreparam = '', string $htmlid = '', string $selected_input_value = '', string $filter = '')
Output html form to select a contact This call select_contacts() or ajax depending on setup. This component is not able to support multiple select.
Return HTML code of the SELECT of list of all contacts (for a third party or all). This also set the number of contacts found into $this->num
in
Form at line 1573
array<int, array{key: int, value: string, label: string, labelhtml: string}>|string
select_thirdparty_list(string $selected = '', string $htmlname = 'socid', string $filter = '', string|int<0, 1> $showempty = '', int<0, 1> $showtype = 0, int $forcecombo = 0, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), string $filterkey = '', int<0, 1> $outputmode = 0, int $limit = 0, string $morecss = 'minwidth100', string $moreparam = '', bool $multiple = false, string[] $excludeids = array(), int<0, 1> $showcode = 0)
Output html form to select a third party.
Note: you must use the select_company() to get the component to select a third party. This function must only be called by select_company.
in
Form at line 1829
int|string|array<int, array{key: int, value: string, label: string, labelhtml: string}>
selectcontacts(int $socid, string[]|int|string $selected = array(), string $htmlname = 'contactid', int<0, 3>|string $showempty = 0, string $exclude = '', string $limitto = '', int<0, 1> $showfunction = 0, string $morecss = '', int $options_only = 0, int<0, 1> $showsoc = 0, int $forcecombo = 0, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), string $moreparam = '', string $htmlid = '', bool $multiple = false, int $disableifempty = 0, string $filter = '')
Return HTML code of the SELECT of list of all contacts (for a third party or all).
This also set the number of contacts found into $this->num Note: you must use the select_contact() to get the component to select a contact. This function must only be called by select_contact.
in
Form at line 2101
int
select_remises(string $selected, string $htmlname, string $filter, int $socid, int $maxvalue = 0)
Return HTML combo list of absolute discounts
in
Form at line 2194
void
select_users(string $selected = '', string $htmlname = 'userid', int<0, 1> $show_empty = 0, int[] $exclude = null, int<0, 1> $disabled = 0, int[]|""|"hierarchy"|"hierarchyme" $include = '', int[]|int $enableonly = array(), string $force_entity = '0')
deprecated
deprecated
Return the HTML select list of users
in
Form at line 2226
string|array<int, string|array{id: int, label: string, labelhtml: string, color: string, picto: string}>
select_dolusers(string|int|User $selected = '', string $htmlname = 'userid', int<0, 1>|string $show_empty = 0, int[]|null $exclude = null, int $disabled = 0, int[]|""|"hierarchy"|"hierarchyme" $include = '', int[]|"" $enableonly = '', string $force_entity = '', int $maxlength = 0, int<-1, 1> $showstatus = 0, string $morefilter = '', int<0, 3> $showalso = 0, string $enableonlytext = '', string $morecss = '', int<0, 1> $notdisabled = 0, int<0, 2> $outputmode = 0, bool $multiple = false, int<0, 1> $forcecombo = 0)
Return select list of users
in
Form at line 2583
string
select_dolusers_forevent(string $action = '', string $htmlname = 'userid', int<0, 1> $show_empty = 0, int[] $exclude = null, int<0, 1> $disabled = 0, int[]|""|"hierarchy"|"hierarchyme" $include = array(), int[]|int $enableonly = array(), string $force_entity = '0', int $maxlength = 0, int<0, 1> $showstatus = 0, string $morefilter = '', int $showproperties = 0, int[] $listofuserid = array(), int[] $listofcontactid = array(), int[] $listofotherid = array(), int $canremoveowner = 1)
Return select list of users. Selected users are stored into session.
List of users are provided into $_SESSION['assignedtouser'].
in
Form at line 2704
string
select_dolresources_forevent(string $action = '', string $htmlname = 'userid', int<0, 1> $show_empty = 0, int[] $exclude = null, int<0, 1> $disabled = 0, int[]|string $include = array(), int[] $enableonly = array(), string $force_entity = '0', int $maxlength = 0, int<-1, 1> $showstatus = 0, string $morefilter = '', int<0, 1> $showproperties = 0, array<int, array{transparency: bool|int<0, 1>}> $listofresourceid = array())
Return select list of resources. Selected resources are stored into session.
List of resources are provided into $_SESSION['assignedtoresource'].
in
Form at line 2816
select_produits(int $selected = 0, $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = null, $nooutput = 0, $status_purchase = -1, $warehouseId = 0)
Return list of products.
Use Ajax if Ajax activated or go to select_produits_list
in
Form at line 3060
void|string
select_bom(string $selected = '', string $htmlname = 'bom_id', int $limit = 0, int $status = 1, int $type = 0, string|int<0, 1> $showempty = '1', string $morecss = '', string $nooutput = '', int $forcecombo = 0, string[] $TProducts = [])
Return list of BOM for customer in Ajax if Ajax activated or go to select_produits_list
in
Form at line 3149
string|array<array{key: string, value: string, label: string, label2: string, desc: string, type: string, price_ht: string, price_ttc: string, price_ht_locale: string, price_ttc_locale: string, pricebasetype: string, tva_tx: string, default_vat_code: string, qty: string, discount: string, duration_value: string, duration_unit: string, pbq: string, labeltrans: string, desctrans: string, ref_customer: string}>
select_produits_list(int $selected = 0, string $htmlname = 'productid', string $filtertype = '', int $limit = 20, int $price_level = 0, string $filterkey = '', int<-1, 1> $status = 1, int $finished = 2, int $outputmode = 0, int $socid = 0, string|int<0, 1> $showempty = '1', int $forcecombo = 0, string $morecss = 'maxwidth500', int<0, 1> $hidepriceinlabel = 0, ""|"warehouseopen"|"warehouseclosed"|"warehouseinternal" $warehouseStatus = '', int<-1, 1> $status_purchase = -1, int $warehouseId = 0)
Return list of products for a customer.
Not optimized for high number of product, use instead select_produits() for large databases (so select_produits will call this function with a $limit parameter).
in
Form at line 3574
protected void
constructProductListOption(stdClass $objp, string $opt, array{key?: string, value?: string, label?: string, label2?: string, desc?: string, type?: string, price_ht?: string, price_ttc?: string, price_ht_locale?: string, price_ttc_locale?: string, pricebasetype?: string, tva_tx?: string, default_vat_code?: string, qty?: string, discount?: string, duration_value?: string, duration_unit?: string, pbq?: string, labeltrans?: string, desctrans?: string, ref_customer?: string} $optJson, int $price_level, int $selected, int<0, 1> $hidepriceinlabel = 0, string $filterkey = '', int<0, 1> $novirtualstock = 0)
Function to forge the string with OPTIONs of SELECT.
This define value for &$opt and &$optJson. This function is called by select_produits_list().
in
Form at line 3952
string|void
select_produits_fournisseurs(int $socid, string|int $selected = '', string $htmlname = 'productid', string $filtertype = '', string $filtre = '', array<string, string|string[]> $ajaxoptions = array(), int<0, 1> $hidelabel = 0, int<0, 1> $alsoproductwithnosupplierprice = 0, string $morecss = '', string $placeholder = '', int $nooutput = 0)
Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
in
Form at line 4009
array<array<string, mixed>>|string
select_produits_fournisseurs_list(int $socid, string $selected = '', string $htmlname = 'productid', ""|int<0, 1> $filtertype = '', string $filtre = '', string $filterkey = '', int $statut = -1, int $outputmode = 0, int $limit = 100, int $alsoproductwithnosupplierprice = 0, string $morecss = '', int $showstockinlist = 0, string $placeholder = '')
Return list of suppliers products
in
Form at line 4469
string
select_product_fourn_price(int $productid, string $htmlname = 'productfournpriceid', int $selected_supplier = 0)
Return list of suppliers prices for a product
in
Form at line 4576
int
load_cache_conditions_paiements()
Load into cache list of payment terms
in
Form at line 4638
int<-1, 1>
load_cache_rule_for_lines_dates()
Loads into a cache property the list of possible rules for line dates
in
Form at line 4659
int
load_cache_availability()
Load int a cache property the list of possible delivery delays.
in
Form at line 4713
void
selectAvailabilityDelay(""|int $selected = '', string $htmlname = 'availid', string|int<0, 1> $filtertype = '', int<0, 1> $addempty = 0, string $morecss = '')
Return the list of type of delay available.
in
Form at line 4746
int
loadCacheInputReason()
Load into cache cache_demand_reason, array of input reasons
in
Form at line 4808
void
selectInputReason(string $selected = '', string $htmlname = 'demandreasonid', string $exclude = '', int $addempty = 0, string $morecss = '', int $notooltip = 0)
Return list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason
in
Form at line 4846
int
load_cache_types_paiements()
Charge dans cache la liste des types de paiements possibles
in
Form at line 4922
void|string
select_conditions_paiements(int $selected = 0, string $htmlname = 'condid', int $filtertype = -1, int $addempty = 0, int $noinfoadmin = 0, string $morecss = '', float $deposit_percent = -1, int $noprint = 0)
deprecated
deprecated
print list of payment modes.
Constant MAIN_DEFAULT_PAYMENT_TERM_ID can be used to set default value but scope is all application, probably not what you want. See instead to force the default value by the caller.
in
Form at line 4950
string
getSelectConditionsPaiements(int $selected = 0, string $htmlname = 'condid', int $filtertype = -1, int $addempty = 0, int $noinfoadmin = 0, string $morecss = '', float $deposit_percent = -1)
Return list of payment modes.
Constant MAIN_DEFAULT_PAYMENT_TERM_ID can be used to set default value but scope is all application, probably not what you want. See instead to force the default value by the caller.
in
Form at line 5034
string
getSelectRuleForLinesDates(string $selected = '', string $htmlname = 'rule_for_lines_dates', int $addempty = 0)
Returns select with rule for lines dates
in
Form at line 5084
string|void
select_types_paiements(string $selected = '', string $htmlname = 'paiementtype', string $filtertype = '', int $format = 0, int $empty = 1, int $noadmininfo = 0, int $maxlength = 0, int $active = 1, string $morecss = '', int<0, 1> $nooutput = 0)
Return list of payment methods Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want.
in
Form at line 5185
string
selectPriceBaseType(string $selected = '', string $htmlname = 'price_base_type', int $addjscombo = 0)
Selection HT or TTC
in
Form at line 5217
int
load_cache_transport_mode()
Load in cache list of transport mode
in
Form at line 5276
void
selectTransportMode(string $selected = '', string $htmlname = 'transportmode', int $format = 0, int $empty = 1, int $noadmininfo = 0, int $maxlength = 0, int $active = 1, string $morecss = '')
Return list of transport mode for intracomm report
in
Form at line 5349
void
selectShippingMethod(string $selected = '', string $htmlname = 'shipping_method_id', string $filtre = '', int $useempty = 0, string $moreattrib = '', int $noinfoadmin = 0, string $morecss = '')
Return a HTML select list of shipping mode
in
Form at line 5407
void
formSelectShippingMethod(string $page, string $selected = '', string $htmlname = 'shipping_method_id', int $addempty = 0)
Display form to select shipping mode
in
Form at line 5438
string
selectSituationInvoices(string $selected = '', int $socid = 0)
Creates HTML last in cycle situation invoices selector
in
Form at line 5502
string
selectUnits(int|"" $selected = '', string $htmlname = 'units', int<0, 1> $showempty = 0, string $unit_type = '')
Creates HTML units selector (code => label)
in
Form at line 5559
int|string
select_comptes(int|"" $selected = '', string $htmlname = 'accountid', int<0, 2> $status = 0, string $filtre = '', int<0, 2>|string $useempty = 0, string $moreattrib = '', int<0, 1> $showcurrency = 0, string $morecss = '', int<0, 1> $nooutput = 0, int<0, 1> $addentrynone = 0)
Return a HTML select list of bank accounts
in
Form at line 5659
int|string
selectRib(int|"" $selected = '', string $htmlname = 'ribcompanyid', string $filtre = '', int|string $useempty = 0, string $moreattrib = '', int $showibanbic = 0, string $morecss = '', int<0, 1> $nooutput = 0)
Return a HTML select list of bank accounts customer
in
Form at line 5736
int
selectEstablishments(string $selected = '', string $htmlname = 'entity', int $status = 0, string $filtre = '', int $useempty = 0, string $moreattrib = '')
Return a HTML select list of establishment
in
Form at line 5804
void
formSelectAccount(string $page, string $selected = '', string $htmlname = 'fk_account', int<0, 2> $addempty = 0)
Display form to select bank account
in
Form at line 5844
void
formRib(string $page, string $selected = '', string $htmlname = 'ribcompanyid', string $filtre = '', int $addempty = 0, int $showibanbic = 0)
Display form to select bank customer account
in
Form at line 5884
string
selectCategories(string $categtype, string $htmlname, CommonObject $object = null)
Return HTML component to select a category
in
Form at line 5980
string|array<int, string>|array<int, array{id: int, fulllabel: string, data-html?: string, color: string, picto: string}>|array<int, array{rowid: int, id: int, fk_parent: int, label: string, description: string, color: string, position: string, visible: int, ref_ext: string, picto: string, fullpath: string, fulllabel: string, data-html?: string}>
select_all_categories(string|int $type, int|"auto"|"" $selected = '', string $htmlname = "parent", int $maxlength = 64, int|string|int[] $fromid = 0, int<0, 3> $outputmode = 0, int<0, 1> $include = 0, string $morecss = '', int<0, 2> $useempty = 1)
Return list of categories having chosen type
in
Form at line 6070
void
form_confirm(string $page, string $title, string $question, string $action, array<array{name?: string, value?: string|float|bool, values?: string[], default?: string, label?: string, type: string, size?: int|string, morecss?: string, moreattr?: string, style?: string, inputko?: int<0, 1>}>|string|null $formquestion = array(), string $selectedchoice = "", int<0, 2>|string $useajax = 0, int $height = 170, int $width = 500)
deprecated
deprecated
Show a confirmation HTML form or AJAX popup
in
Form at line 6103
string
formconfirm(string $page, string $title, string $question, string $action, null|string|array<array{name?: string, value?: string|float|bool, values?: string[], default?: string, label?: string, type: string, size?: int|string, morecss?: string, moreattr?: string, style?: string, inputko?: int<0, 1>, tdclass?: string}>|array{text: string, 0?: array{name: string, value?: string|float|bool, values?: string[], default?: string, label?: string, type: string, size?: int|string, morecss?: string, moreattr?: string, style?: string, inputko?: int<0, 1>, tdclass?: string}, 1?: array{name: string, value?: string|float|bool, values?: string[], default?: string, label?: string, type: string, size?: int|string, morecss?: string, moreattr?: string, style?: string, inputko?: int<0, 1>, tdclass?: string}} $formquestion = '', int<0, 1>|""|"no"|"yes"|"1"|"0" $selectedchoice = '', int<0, 2>|string $useajax = 0, int|string $height = 0, int $width = 500, int $disableformtag = 0, string $labelbuttonyes = 'Yes', string $labelbuttonno = 'No')
Show a confirmation HTML form or AJAX popup.
Easiest way to use this is with useajax=1. If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters) just after calling this method. For example: print ''."\n";
in
Form at line 6516
string
form_project(string $page, int $socid, int|string|Project $selected = '', string $htmlname = 'projectid', int<0, 2> $discard_closed = 0, int $maxlength = 20, int $forcefocus = 0, int<0, 1> $nooutput = 0, string $textifnoproject = '', string $morecss = '')
Show a form to select a project
in
Form at line 6574
string
form_conditions_reglement(string $page, string $selected = '', string $htmlname = 'cond_reglement_id', int<0, 1> $addempty = 0, ""|"direct-debit"|"bank-transfer" $type = '', int $filtertype = -1, float $deposit_percent = -1, int<0, 1> $nooutput = 0)
Show a form to select payment conditions
in
Form at line 6630
string
form_rule_for_lines_dates(string $page, string $selected = '', string $htmlname = 'rule_for_lines_dates', int $addempty = 0, int $nooutput = 0)
Form select for rule for lines dates
in
Form at line 6675
void
form_availability(string $page, string $selected = '', string $htmlname = 'availability', int<0, 1> $addempty = 0)
Show a form to select a delivery delay
in
Form at line 6708
void
formInputReason(string $page, string $selected = '', string $htmlname = 'demandreason', int $addempty = 0, string $morecss = '')
Output HTML form to select list of input reason (events that triggered an object creation, like after sending an emailing, making an advert, ...) List found into table c_input_reason loaded by loadCacheInputReason
in
Form at line 6748
string
form_date(string $page, int|"" $selected, string $htmlname, int $displayhour = 0, int $displaymin = 0, int<0, 1> $nooutput = 0, string $type = '')
Show a form + html select a date
in
Form at line 6795
void
form_users(string $page, string $selected = '', string $htmlname = 'userid', int[] $exclude = array(), int[] $include = array())
Show a select form to choose a user
in
Form at line 6835
string
form_modes_reglement(string $page, string $selected = '', string $htmlname = 'mode_reglement_id', string $filtertype = '', int<-1, 1> $active = 1, int<0, 1> $addempty = 0, string $type = '', int<0, 1> $nooutput = 0)
Show form with payment mode
in
Form at line 6878
void
formSelectTransportMode(string $page, int|"" $selected = '', string $htmlname = 'transport_mode_id', int<-1, 1> $active = 1, int<0, 1> $addempty = 0)
Show form with transport mode
in
Form at line 6908
void
form_multicurrency_code(string $page, string $selected = '', string $htmlname = 'multicurrency_code')
Show form with multicurrency code
in
Form at line 6936
void
form_multicurrency_rate(string $page, float $rate = 0.0, string $htmlname = 'multicurrency_tx', string $currency = '')
Show form with multicurrency rate
in
Form at line 6982
void
form_remise_dispo(string $page, int $selected, string $htmlname, int $socid, float $amount, string $filter = '', int $maxvalue = 0, string $more = '', int $hidelist = 0, int $discount_type = 0)
Show a select box with available absolute discounts
in
Form at line 7079
void
form_contacts(string $page, Societe $societe, string $selected = '', string $htmlname = 'contactid')
Show forms to select a contact
in
Form at line 7129
string
form_thirdparty(string $page, string $selected = '', string $htmlname = 'socid', string $filter = '', string|int<0, 1> $showempty = 0, int<0, 1> $showtype = 0, int<0, 1> $forcecombo = 0, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events = array(), int<0, 1> $nooutput = 0, int[] $excludeids = array(), string $textifnothirdparty = '')
Output html select to select thirdparty
in
Form at line 7172
void
select_currency(string $selected = '', string $htmlname = 'currency_id')
deprecated
deprecated
Retourne la liste des devises, dans la langue de l'utilisateur
in
Form at line 7187
string
selectCurrency(string $selected = '', string $htmlname = 'currency_id', int $mode = 0, string $useempty = '')
Retourne la liste des devises, dans la langue de l'utilisateur
in
Form at line 7245
string
selectMultiCurrency(string $selected = '', string $htmlname = 'multicurrency_code', int $useempty = 0, string $filter = '', bool $excludeConfCurrency = false, string $morecss = 'maxwidth200 widthcentpercentminusx')
Return array of currencies in user language
in
Form at line 7307
int
load_cache_vatrates($country_code)
Load into the cache ->cache_vatrates, all the vat rates of a country
@param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
in
Form at line 7408
load_tva(string $htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = null, $societe_acheteuse = null, $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0, $type_vat = 0)
Output an HTML select vat rate.
The name of this function should be selectVat. We keep bad name for compatibility purpose.
in
Form at line 7661
select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = 0, $addplusone = '', $adddateof = '')
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
- set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM')
- local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location)
- Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1)
in
Form at line 7689
selectDateToDate($set_time = '', $set_time_end = '', $prefix = 're', $empty = 0, $forcenewline = 0)
Show 2 HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
- set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM')
- local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location)
- Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1)
in
Form at line 7729
selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '', $placeholder = '', $gm = 'auto', $calendarpicto = '')
Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.
Fields are preselected with :
- set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM')
- local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location)
- Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1)
in
Form at line 8195
string
selectTypeDuration(string $prefix, string $selected = 'i', string[] $excludetypes = array(), string $morecss = 'minwidth75 maxwidth100')
selectTypeDuration
in
Form at line 8236
string
select_duration(string $prefix, int|string $iSecond = '', int $disabled = 0, string $typehour = 'select', int $minunderhours = 0, int<0, 1> $nooutput = 0)
Function to show a form to select a duration on a page
in
Form at line 8335
string
selectTickets(string $selected = '', string $htmlname = 'ticketid', string $filtertype = '', int $limit = 0, int $status = 1, string $selected_input_value = '', int<0, 3> $hidelabel = 0, array<string, string|string[]> $ajaxoptions = array(), int $socid = 0, string|int<0, 1> $showempty = '1', int<0, 1> $forcecombo = 0, string $morecss = '', array<string, string> $selected_combinations = null, int<0, 1> $nooutput = 0)
Return list of tickets in Ajax if Ajax activated or go to selectTicketsList
in
Form at line 8401
array<array{key: string, value: mixed, type: int}>|string
selectTicketsList(string $selected = '', string $htmlname = 'ticketid', string $filtertype = '', int $limit = 20, string $filterkey = '', int $status = 1, int $outputmode = 0, string|int<0, 1> $showempty = '1', int $forcecombo = 0, string $morecss = '')
Return list of tickets.
Called by selectTickets.
in
Form at line 8520
protected void
constructTicketListOption(object $objp, string $opt, array{key?: string, value?: mixed, type?: int} $optJson, string $selected, string $filterkey = '')
constructTicketListOption.
This define value for &$opt and &$optJson.
in
Form at line 8561
string
selectProjects(string $selected = '', string $htmlname = 'projectid', string $filtertype = '', int<0, max> $limit = 0, int $status = 1, string $selected_input_value = '', int<0, 3> $hidelabel = 0, array<string, string|string[]> $ajaxoptions = array(), int $socid = 0, string|int<0, 1> $showempty = '1', int<0, 1> $forcecombo = 0, string $morecss = '', array<string, string> $selected_combinations = null, int<0, 1> $nooutput = 0)
Return list of projects in Ajax if Ajax activated or go to selectTicketsList
in
Form at line 8626
mixed[]|string
selectProjectsList(string $selected = '', string $htmlname = 'projectid', string $filtertype = '', int $limit = 20, string $filterkey = '', int $status = 1, int $outputmode = 0, string|int<0, 1> $showempty = '1', int $forcecombo = 0, string $morecss = '')
Return list of projects.
Called by selectProjects.
in
Form at line 8746
protected void
constructProjectListOption(stdClass $objp, string $opt, array{} $optJson, string $selected, string $filterkey = '')
constructProjectListOption.
This define value for &$opt and &$optJson.
in
Form at line 8793
string
selectMembers(string $selected = '', string $htmlname = 'adherentid', string $filtertype = '', int $limit = 0, int $status = 1, string $selected_input_value = '', int<0, 3> $hidelabel = 0, array<string, string|string[]> $ajaxoptions = array(), int $socid = 0, string|int<0, 1> $showempty = '1', int $forcecombo = 0, string $morecss = '', array<string, string> $selected_combinations = null, int<0, 1> $nooutput = 0, string[] $excludeids = array())
Return list of members in Ajax if Ajax activated or go to selectTicketsList
in
Form at line 8862
mixed[]|string
selectMembersList(string $selected = '', string $htmlname = 'adherentid', string $filtertype = '', int $limit = 20, string $filterkey = '', int $status = 1, int $outputmode = 0, string|int<0, 1> $showempty = '1', int $forcecombo = 0, string $morecss = '', string[] $excludeids = array())
Return list of adherents.
Called by selectMembers.
in
Form at line 8986
protected void
constructMemberListOption(object $objp, string $opt, array{key?: string, value?: mixed, type?: int} $optJson, string $selected, string $filterkey = '')
constructMemberListOption.
This define value for &$opt and &$optJson.
in
Form at line 9028
selectForForms($objectdesc, $htmlname, $preSelectedValue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $disabled = 0, $selected_input_value = '', $objectfield = '')
Generic method to select a component from a combo list.
Can use autocomplete with ajax after x key pressed (if $objecttmp->element.'_USE_SEARCH_TO_SELECT' is set) or a full combo, depending on setup. This is the generic method that will replace all specific existing methods.
in
Form at line 9220
string|array<array{key: string, value: mixed, label: string}>
selectForFormsList(CommonObject $objecttmp, string $htmlname, int $preselectedvalue, string|int<0, 1> $showempty = '', string $searchkey = '', string $placeholder = '', string $morecss = '', string $moreparams = '', int $forcecombo = 0, int $outputmode = 0, int $disabled = 0, string $sortfield = '', string $filter = '', string $sortorder = 'ASC')
Output html form to select an object.
Note, this function is called by selectForForms or by ajax selectobject.php
in
Form at line 9451
static string
radio(string $htmlName, array<string, string|array{label: string, value?: string|int, attr?: array<string, string|int|bool|null>, unescapedAttr?: string[], attrLabel?: array<string, string|int|bool|null>, unescapedAttrLabel?: string[], disabled?: bool, css?: string, labelIsHtml?: bool}> $radioItems, string|int $selected = '', array<string, array<string, string|int|bool|null>|string|bool> $moreGlobalParams = [])
Generates a set of HTML radio inputs from an array of key-value items.
in
Form at line 9538
static
selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = 'minwidth75', $addjscombo = 1, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0)
Return a HTML select string, built from an array of key+value.
Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
in
Form at line 9692
static
selectArrayAjax($htmlname, $url, $id = '', $moreparam = '', $moreparamtourl = '', $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0)
Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL.
Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice.
in
Form at line 9797
static
selectArrayFilter($htmlname, $array, $id = '', $moreparam = '', $disableFiltering = 0, $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0, $textfortitle = '')
Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter.
Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice.
in
Form at line 9918
static
multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $nu = '', $placeholder = '', $addjscombo = -1)
Show a multiselect form from an array. WARNING: Use this only for short lists.
static string
multiSelectArrayWithCheckbox(string $htmlname, array<string, array{label: string, checked?: string, enabled?: string, type?: string, langfile?: string, position?: int, help?: string}> $array, string $varpage, int|string $pos = '')
Show a multiselect dropbox from an array.
If a saved selection of fields exists for user (into $user->conf->MAIN_SELECTEDFIELDS_contextofpage), we use this one instead of default.
string
showCategories(int $id, string $type, int<0, 1> $rendermode = 0, int<0, 1> $nolink = 0)
Render list of categories linked to object with id $id and type $type
int
showLinkedObjectBlock(CommonObject $object, string $morehtmlright = '', array<int, string> $compatibleImportElementsList = array(), string $title = 'RelatedObjects')
Show linked object block.
array{linktoelem: string, htmltoenteralink: string}|string
showLinkToObjectBlock(CommonObject $object, string[]|null $restrictlinksto = array(), string[]|null $excludelinksto = array(), int<0, 1> $nooutput = 0)
Show block with links "to link to" other objects.
string
selectyesno(string $htmlname, string|int<min, 1> $value = '', int<0, 1> $option = 0, bool|int<0, 1> $disabled = false, int<0, 1> $useempty = 0, int<0, 1> $addjscombo = 0, string $morecss = 'yesno width75', string $labelyes = 'Yes', string $labelno = 'No')
Return an html string with a select combo box to choose yes or no
void
select_export_model(string $selected = '', string $htmlname = 'exportmodelid', string $type = '', int $useempty = 0)
Return list of export templates
string
showrefnav(CommonObject $object, string $paramid, string $morehtml = '', int<0, 1> $shownav = 1, string $fieldid = 'rowid', string $fieldref = 'ref', string $morehtmlref = '', string $moreparam = '', int<0, 1> $nodbprefix = 0, string $morehtmlleft = '', string $morehtmlstatus = '', string $morehtmlright = '')
Return a HTML area with the reference of object and a navigation bar for a business object Note: To complete search with a particular filter on select, you can set $object->next_prev_filter set to define SQL criteria.
string
showbarcode(CommonObject $object, int $width = 100, string $morecss = '')
Return HTML code to output a barcode
static string
showphoto(string $modulepart, Societe|Adherent|Contact|User|CommonObject $object, int $width = 100, int $height = 0, int<0, 1> $caneditfield = 0, string $cssclass = 'photowithmargin', string $imagesize = '', int<0, 1> $addlinktofullsize = 1, int<0, 1> $cache = 0, ""|"user"|"environment" $forcecapture = '', int<0, 1> $noexternsourceoverwrite = 0)
Return HTML code to output a photo
string
select_dolgroups(int|object|array<int|object> $selected = 0, string $htmlname = 'groupid', int<0, 1> $show_empty = 0, string|int[] $exclude = '', int<0, 1> $disabled = 0, string|int[] $include = '', int[] $enableonly = array(), string $force_entity = '0', bool $multiple = false, string $morecss = 'minwidth200')
Return select list of user groups
string
showFilterButtons(string $pos = '')
Return HTML to show the search and clear search button
string
showCheckAddButtons(string $cssclass = 'checkforaction', int $calljsfunction = 0, string $massactionname = "massaction")
Return HTML to show the search and clear search button
string
showFilterAndCheckAddButtons(int $addcheckuncheckall = 0, string $cssclass = 'checkforaction', int $calljsfunction = 0, string $massactionname = "massaction")
Return HTML to show the search and clear search button
string
selectExpenseCategories(string $selected = '', string $htmlname = 'fk_c_exp_tax_cat', int<0, 1> $useempty = 0, int[] $excludeid = array(), string $target = '', int $default_selected = 0, array<string, int|string> $params = array(), int<0, 1> $info_admin = 1)
Return HTML to show the select of expense categories
string
selectExpenseRanges(string $selected = '', string $htmlname = 'fk_range', int $useempty = 0)
Return HTML to show the select ranges of expense range
string
selectExpenseFees(string $selected = '', string $htmlname = 'fk_c_type_fees', int $useempty = 0, int $allchoice = 1, int $useid = 0)
Return HTML to show a select of expense
string
selectInvoiceForTimeProject(int $socid = -1, string $selected = '', string $htmlname = 'invoiceid', int $maxlength = 24, int $option_only = 0, string $show_empty = '1', int $discard_closed = 0, int $forcefocus = 0, int $disabled = 0, string $morecss = 'maxwidth500', string $projectsListId = '', string $showproject = 'all', User $usertofilter = null)
Output a combo list with invoices for a project
int
selectInvoiceRec(string $selected = '', string $htmlname = 'facrecid', int $maxlength = 24, int $option_only = 0, string $show_empty = '1', int $forcefocus = 0, int $disabled = 0, string $morecss = 'maxwidth500')
Output a combo list with invoices qualified for a third party TODO Bad method. This is used by viewcat.php. We must use a generic method in viewcat to use an ajax search ad remove this one that download all the database.
string
searchComponent(array<array<string, array{type: string}>> $arrayofcriterias, array<int, string> $search_component_params, string[] $arrayofinputfieldsalreadyoutput = array(), string $search_component_params_hidden = '', array<string, array{type: string}> $arrayoffiltercriterias = array())
Output the component to make advanced search criteria
string
selectModelMail(string $prefix, string $modelType = '', int<0, 1> $default = 0, int<0, 1> $addjscombo = 0, int|string $selected = 0, string $morecss = '')
selectModelMail
string
buttonsSaveCancel(string $save_label = 'Save', string $cancel_label = 'Cancel', array<array{addclass?: string, name?: string, label_key?: string}> $morebuttons = array(), bool|int<0, 1> $withoutdiv = false, string $morecss = '', string $dol_openinpopup = '')
Output the buttons to submit a creation/edit form
int
load_cache_invoice_subtype()
Load into cache list of invoice subtypes
string
getSelectInvoiceSubtype(int $selected = 0, string $htmlname = 'subtypeid', int<0, 1> $addempty = 0, int<0, 1> $noinfoadmin = 0, string $morecss = '')
Return list of invoice subtypes.
string
getSearchFilterToolInput(string $dataTarget, string $htmlName = 'search-tools-input', string $value = '', mixed[] $params = [])
No description
string
inputType(string $type, string $name, string $value = '', string $id = '', string $morecss = '', string $moreparam = '', string $label = '', string $addInputLabel = '')
Html for input with label
string
inputSelectAjax(string $htmlName, array<string, mixed> $array, string $id, string $ajaxUrl, array<string, string> $ajaxData = [], string $morecss = 'minwidth75', string $moreparam = '')
Html for select with get options by AJAX
string
inputHtml(string $htmlName, string $value, string $morecss = '', string $moreparam = '')
Html for HTML area
string
inputText(string $htmlName, string $value, string $morecss = '', string $moreparam = '', array<string, mixed> $options = array())
Html for HTML area
string
inputRadio(string $htmlName, array<string, string> $options, string $selectedValue, string $morecss = '', string $moreparam = '')
Html for input radio
string
inputStars(string $htmlName, int $size, int $value, string $morecss = '', string $moreparam = '')
Html for input stars
string
inputIcon(string $htmlName, string $value, string $morecss = '', string $moreparam = '')
Html for input icon
string
inputGeoPoint(string $htmlName, string $value, string $type = '')
Html for input geo point
string
outputMultiValues(string[] $values)
Html for show selected multiple values
string
outputStars(int $size, int $value)
Html for show stars
string
outputIcon(string $value)
Html for show icon
string
outputGeoPoint(string $value, string $type)
Html for show geo point
string
getNomUrl(CommonObject $object, int $withpicto = 0, string $option = '', int $maxlength = 0, int $save_lastsearch_value = -1, int $notooltip = 0, string $morecss = '', int $add_label = 0, string $sep = ' - ')
Return link of object
selectFiscalYear(int $selected = 0, string $htmlname = 'fiscalyear', $useempty = 0, $maxlen = 0, $help = 1)
Return list of fiscal year