dolibarr 20.0.0
|
Ensemble de functions 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. | |
productlot_prepare_head ($object) | |
Prepare array with list of tabs. | |
product_admin_prepare_head () | |
Return array head with list of tabs to view object information. | |
product_lot_admin_prepare_head () | |
Return array head with list of tabs to view object information. | |
show_stats_for_company ($product, $socid) | |
Show stats for a product. | |
show_stats_for_batch ($batch, $socid) | |
Show stats for product batch. | |
measuring_units_string ($scale='', $measuring_style='', $unit=0, $use_short_label=0, $outputlangs=null) | |
Return translation label of a unit key. | |
measuringUnitString ($unit, $measuring_style='', $scale='', $use_short_label=0, $outputlangs=null) | |
Return translation label of a unit key. | |
measuring_units_squared ($unit) | |
Transform a given unit scale into the square of that unit, if known. | |
measuring_units_cubed ($unit) | |
Transform a given unit scale into the cube of that unit, if known. | |
Ensemble de functions 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 939 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 919 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 841 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 very short label ('g' instead of 'gram'), not translated. 2=Use translated short label. |
Translate | $outputlangs | Language object |
Definition at line 857 of file product.lib.php.
Referenced by pdf_espadon\_tableau_tot(), ActionsCardProduct\assign_values(), BOM\calculateCosts(), Form\constructProductListOption(), CommonDocGenerator\get_substitutionarray_shipment(), ProductFournisseur\getNomUrl(), Product\getTooltipContentArray(), measuring_units_string(), Form\select_produits_fournisseurs_list(), pdf_eagle\write_file(), pdf_espadon\write_file(), pdf_rouget\write_file(), pdf_squille\write_file(), and pdf_standard\write_file().
product_admin_prepare_head | ( | ) |
Return array head with list of tabs to view object information.
Definition at line 321 of file product.lib.php.
References complete_head_from_modules(), and getDolGlobalString().
product_lot_admin_prepare_head | ( | ) |
Return array head with list of tabs to view object information.
Definition at line 382 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 37 of file product.lib.php.
References $object, complete_head_from_modules(), Link\count(), dol_dir_list(), dol_sanitizeFileName(), get_exdir(), getDolGlobalInt(), getDolGlobalString(), Product\TYPE_PRODUCT, and Product\TYPE_SERVICE.
Referenced by ActionsCardProduct\assign_values(), and ActionsCardService\assign_values().
productlot_prepare_head | ( | $object | ) |
Prepare array with list of tabs.
ProductLot | $object | Object related to tabs |
Definition at line 243 of file product.lib.php.
References $object, complete_head_from_modules(), Link\count(), dol_dir_list(), dol_sanitizeFileName(), and getDolGlobalString().
show_stats_for_batch | ( | $batch, | |
$socid ) |
Show stats for product batch.
Productlot | $batch | Product batch object |
int | $socid | Thirdparty id |
Definition at line 716 of file product.lib.php.
References dol_print_error(), img_object(), and setEventMessages().
show_stats_for_company | ( | $product, | |
$socid ) |
Show stats for a product.
Definition at line 426 of file product.lib.php.
References dol_print_error(), getDolGlobalString(), img_object(), price(), setEventMessage(), and setEventMessages().