|
dolibarr
13.0.2
|
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 ($scale= '', $measuring_style= '', $unit=0, $use_short_label=0, $outputlangs=null) | |
| Return translation label of a unit key. More... | |
| measuringUnitString ($unit, $measuring_style= '', $scale= '', $use_short_label=0, $outputlangs=null) | |
| Return translation label of a unit key. More... | |
| measuring_units_squared ($unit) | |
| Transform a given unit scale into the square of that unit, if known. More... | |
| measuring_units_cubed ($unit) | |
| Transform a given unit scale into the cube of that unit, if known. More... | |
Ensemble de fonctions de base pour le module produit et service.
Definition in file product.lib.php.
| measuring_units_cubed | ( | $unit | ) |
Transform a given unit scale into the cube of that unit, if known.
| int | $unit | Unit scale key (-3,-2,-1,0,98,99...) |
Definition at line 653 of file product.lib.php.
Referenced by Product\update().
| measuring_units_squared | ( | $unit | ) |
Transform a given unit scale into the square of that unit, if known.
| int | $unit | Unit scale key (-3,-2,-1,0,98,99...) |
Definition at line 633 of file product.lib.php.
Referenced by Product\update().
| measuring_units_string | ( | $scale = '', |
|
$measuring_style = '', |
|||
$unit = 0, |
|||
$use_short_label = 0, |
|||
$outputlangs = null |
|||
| ) |
Return translation label of a unit key.
Function kept for backward compatibility.
| string | $scale | Scale of unit: '0', '-3', '6', ... |
| string | $measuring_style | Style of unit: weight, volume,... |
| int | $unit | ID of unit (rowid in llx_c_units table) |
| int | $use_short_label | 1=Use short label ('g' instead of 'gram'). Short labels are not translated. |
| Translate | $outputlangs | Language object |
Definition at line 557 of file product.lib.php.
References measuringUnitString().
| measuringUnitString | ( | $unit, | |
$measuring_style = '', |
|||
$scale = '', |
|||
$use_short_label = 0, |
|||
$outputlangs = null |
|||
| ) |
Return translation label of a unit key.
| int | $unit | ID of unit (rowid in llx_c_units table) |
| string | $measuring_style | Style of unit: 'weight', 'volume', ..., '' = 'net_measure' for option PRODUCT_ADD_NET_MEASURE |
| string | $scale | Scale of unit: '0', '-3', '6', ... |
| int | $use_short_label | 1=Use short label ('g' instead of 'gram'). Short labels are not translated. |
| Translate | $outputlangs | Language object |
Definition at line 573 of file product.lib.php.
Referenced by ActionsCardProduct\assign_values(), Form\constructProductListOption(), CommonDocGenerator\get_substitutionarray_shipment(), CommonDocGenerator\get_substitutionarray_shipment_lines(), ProductFournisseur\getNomUrl(), Product\getNomUrl(), measuring_units_string(), Form\select_produits_fournisseurs_list(), showDimensionInBestUnit(), pdf_squille\write_file(), pdf_espadon\write_file(), and pdf_rouget\write_file().
| product_admin_prepare_head | ( | ) |
Return array head with list of tabs to view object informations.
Definition at line 264 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.
Definition at line 314 of file product.lib.php.
References complete_head_from_modules().
| product_prepare_head | ( | $object | ) |
Prepare array with list of tabs.
| Product | $object | Object related to tabs |
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.
| ProductLot | $object | Object related to tabs |
Definition at line 211 of file product.lib.php.
References complete_head_from_modules(), Link\count(), dol_dir_list(), and dol_sanitizeFileName().
| show_stats_for_company | ( | $product, | |
| $socid | |||
| ) |
Show stats for company.
Definition at line 346 of file product.lib.php.
References dol_print_error(), img_object(), print, and setEventMessage().