dolibarr  7.0.0-beta
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 (   $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 535 of file product.lib.php.

Referenced by Product\update().

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 515 of file product.lib.php.

Referenced by Product\update().

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 460 of file product.lib.php.

Referenced by ActionsCardProduct\assign_values(), CommonDocGenerator\get_substitutionarray_shipment(), CommonDocGenerator\get_substitutionarray_shipment_lines(), Product\getNomUrl(), and pdf_rouget\write_file().

product_admin_prepare_head ( )

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

Returns
array head array with tabs

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

References complete_head_from_modules().

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 275 of file product.lib.php.

References complete_head_from_modules().

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.

References complete_head_from_modules(), Link\count(), dol_dir_list(), dol_sanitizeFileName(), get_exdir(), Product\TYPE_PRODUCT, and Product\TYPE_SERVICE.

Referenced by ActionsCardService\assign_values(), and ActionsCardProduct\assign_values().

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.

References complete_head_from_modules().

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 307 of file product.lib.php.

References dol_print_error(), img_object(), and print.