dolibarr  9.0.0
Functions
product.lib.php File Reference

Ensemble de fonctions de base pour le module produit et service. More...

Go to the source code of this file.

Functions

 product_prepare_head ($object)
 Prepare array with list of tabs. More...
 
 productlot_prepare_head ($object)
 Prepare array with list of tabs. More...
 
 product_admin_prepare_head ()
 Return array head with list of tabs to view object informations. More...
 
 product_lot_admin_prepare_head ()
 Return array head with list of tabs to view object informations. More...
 
 show_stats_for_company ($product, $socid)
 Show stats for company. More...
 
 measuring_units_string ($unit, $measuring_style='')
 Return translation label of a unit key. More...
 
 measuring_units_squared ($unit)
 Transform a given unit into the square of that unit, if known. More...
 
 measuring_units_cubed ($unit)
 Transform a given unit into the cube of that unit, if known. More...
 

Detailed Description

Ensemble de fonctions de base pour le module produit et service.

Definition in file product.lib.php.

Function Documentation

◆ measuring_units_cubed()

measuring_units_cubed (   $unit)

Transform a given unit into the cube of that unit, if known.

Parameters
int$unitUnit key (-3,-2,-1,0,98,99...)
Returns
int Cubed unit key (-9,-6,-3,0,88,89...)
See also
formproduct->load_measuring_units

Definition at line 548 of file product.lib.php.

◆ measuring_units_squared()

measuring_units_squared (   $unit)

Transform a given unit into the square of that unit, if known.

Parameters
int$unitUnit key (-3,-2,-1,0,98,99...)
Returns
int Squared unit key (-6,-4,-2,0,98,99...)
See also
formproduct->load_measuring_units

Definition at line 528 of file product.lib.php.

◆ measuring_units_string()

measuring_units_string (   $unit,
  $measuring_style = '' 
)

Return translation label of a unit key.

Parameters
int$unitUnit key (-3,0,3,98,99...)
string$measuring_styleStyle of unit: weight, volume,...
Returns
string Unit string
See also
formproduct->load_measuring_units

Definition at line 473 of file product.lib.php.

◆ product_admin_prepare_head()

product_admin_prepare_head ( )

Return array head with list of tabs to view object informations.

Returns
array head array with tabs

Definition at line 243 of file product.lib.php.

◆ product_lot_admin_prepare_head()

product_lot_admin_prepare_head ( )

Return array head with list of tabs to view object informations.

Returns
array head array with tabs

Definition at line 288 of file product.lib.php.

◆ product_prepare_head()

product_prepare_head (   $object)

Prepare array with list of tabs.

Parameters
Product$objectObject related to tabs
Returns
array Array of tabs to show

Definition at line 35 of file product.lib.php.

◆ productlot_prepare_head()

productlot_prepare_head (   $object)

Prepare array with list of tabs.

Parameters
ProductLot$objectObject related to tabs
Returns
array Array of tabs to show

Definition at line 190 of file product.lib.php.

◆ show_stats_for_company()

show_stats_for_company (   $product,
  $socid 
)

Show stats for company.

Parameters
Product$productProduct object
int$socidThirdparty id
Returns
integer NB of lines shown into array

Definition at line 320 of file product.lib.php.