dolibarr 25.0.0-alpha
takepos.lib.php File Reference

Library file with function for TakePOS module. More...

Go to the source code of this file.

Functions

 takepos_admin_prepare_head ()
 Prepare array with list of tabs.
 
 takeposTerminalIsEnabled ($terminal)
 Tell if a TakePOS terminal can be used.
 
 takeposEnabledTerminals ()
 Return the list of the TakePOS terminals that can be used.
 

Detailed Description

Library file with function for TakePOS module.

Definition in file takepos.lib.php.

Function Documentation

◆ takepos_admin_prepare_head()

takepos_admin_prepare_head ( )

Prepare array with list of tabs.

Returns
array<array{0:string,1:string,2:string}> Array of tabs to show

Definition at line 32 of file takepos.lib.php.

References $conf, complete_head_from_modules(), getDolGlobalInt(), getDolGlobalString(), and takeposTerminalIsEnabled().

◆ takeposEnabledTerminals()

takeposEnabledTerminals ( )

Return the list of the TakePOS terminals that can be used.

Returns
int[] Array of terminal numbers that are not disabled

Definition at line 107 of file takepos.lib.php.

References getDolGlobalInt(), and takeposTerminalIsEnabled().

◆ takeposTerminalIsEnabled()

takeposTerminalIsEnabled ( $terminal)

Tell if a TakePOS terminal can be used.

A terminal is enabled by default: the constant is only recorded when the terminal is explicitly disabled, so existing setups keep all their terminals available. Disabling a terminal only hides it from the terminal selection: its past invoices and its reference counter are left untouched.

Parameters
int$terminalTerminal number (1 to TAKEPOS_NUM_TERMINALS)
Returns
bool True if the terminal can be used

Definition at line 97 of file takepos.lib.php.

References getDolGlobalInt().

Referenced by takepos_admin_prepare_head(), and takeposEnabledTerminals().