37 global $db, $langs, $conf, $user;
38 $langs->load(
"products");
40 $label = $langs->trans(
'Product');
41 $usercancreadprice =
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS')?$user->hasRight(
'product',
'product_advance',
'read_prices'):$user->hasRight(
'product',
'read');
43 if ($object->isService()) {
44 $label = $langs->trans(
'Service');
45 $usercancreadprice =
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS')?$user->hasRight(
'service',
'service_advance',
'read_prices'):$user->hasRight(
'service',
'read');
51 $head[$h][0] = DOL_URL_ROOT.
"/product/card.php?id=".$object->id;
52 $head[$h][1] = $label;
53 $head[$h][2] =
'card';
56 if (!empty($object->status)) {
57 if ($usercancreadprice) {
58 $head[$h][0] = DOL_URL_ROOT.
"/product/price.php?id=".$object->id;
59 $head[$h][1] = $langs->trans(
"SellingPrices");
60 $head[$h][2] =
'price';
64 $head[$h][1] = $langs->trans(
"SellingPrices");
65 $head[$h][2] =
'price';
66 $head[$h][5] =
'disabled';
71 if (!empty($object->status_buy) || (
isModEnabled(
'margin') && !empty($object->status))) {
72 if ((((
isModEnabled(
"fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) ||
isModEnabled(
"supplier_order") ||
isModEnabled(
"supplier_invoice")) && $user->rights->fournisseur->lire)
73 || (
isModEnabled(
'margin') && $user->hasRight(
"margin",
"liretous"))
75 if ($usercancreadprice) {
76 $head[$h][0] = DOL_URL_ROOT.
"/product/fournisseurs.php?id=".$object->id;
77 $head[$h][1] = $langs->trans(
"BuyingPrices");
78 $head[$h][2] =
'suppliers';
82 $head[$h][1] = $langs->trans(
"BuyingPrices");
83 $head[$h][2] =
'suppliers';
84 $head[$h][5] =
'disabled';
92 $head[$h][0] = DOL_URL_ROOT.
"/product/traduction.php?id=".$object->id;
93 $head[$h][1] = $langs->trans(
"Translations");
94 $head[$h][2] =
'translation';
99 if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) {
100 $head[$h][0] = DOL_URL_ROOT.
"/product/composition/card.php?id=".$object->id;
101 $head[$h][1] = $langs->trans(
'AssociatedProducts');
103 $nbFatherAndChild = $object->hasFatherOrChild();
104 if ($nbFatherAndChild > 0) {
105 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbFatherAndChild.
'</span>';
107 $head[$h][2] =
'subproduct';
111 if (
isModEnabled(
'variants') && ($object->isProduct() || $object->isService())) {
114 require_once DOL_DOCUMENT_ROOT.
'/variants/class/ProductCombination.class.php';
118 if ($prodcomb->fetchByFkProductChild($object->id) <= 0) {
119 $head[$h][0] = DOL_URL_ROOT.
"/variants/combinations.php?id=".$object->id;
120 $head[$h][1] = $langs->trans(
'ProductCombinations');
121 $head[$h][2] =
'combinations';
122 $nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id);
123 if ($nbVariant > 0) {
124 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbVariant.
'</span>';
131 if ($object->isProduct() || ($object->isService() && !empty($conf->global->STOCK_SUPPORTS_SERVICES))) {
132 if (
isModEnabled(
'stock') && $user->rights->stock->lire) {
133 $head[$h][0] = DOL_URL_ROOT.
"/product/stock/product.php?id=".$object->id;
134 $head[$h][1] = $langs->trans(
"Stock");
135 $head[$h][2] =
'stock';
142 if ($object->isProduct() && !empty($conf->global->RESOURCE_ON_PRODUCTS)) {
143 $head[$h][0] = DOL_URL_ROOT.
'/resource/element_resource.php?element=product&ref='.$object->ref;
144 $head[$h][1] = $langs->trans(
"Resources");
145 $head[$h][2] =
'resources';
148 if ($object->isService() && !empty($conf->global->RESOURCE_ON_SERVICES)) {
149 $head[$h][0] = DOL_URL_ROOT.
'/resource/element_resource.php?element=service&ref='.$object->ref;
150 $head[$h][1] = $langs->trans(
"Resources");
151 $head[$h][2] =
'resources';
156 $head[$h][0] = DOL_URL_ROOT.
"/product/stats/facture.php?showmessage=1&id=".$object->id;
157 $head[$h][1] = $langs->trans(
'Referers');
158 $head[$h][2] =
'referers';
161 $head[$h][0] = DOL_URL_ROOT.
"/product/stats/card.php?id=".$object->id;
162 $head[$h][1] = $langs->trans(
'Statistics');
163 $head[$h][2] =
'stats';
173 if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
175 if (!empty($object->note_private)) {
178 if (!empty($object->note_public)) {
181 $head[$h][0] = DOL_URL_ROOT.
'/product/note.php?id='.$object->id;
182 $head[$h][1] = $langs->trans(
'Notes');
184 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
186 $head[$h][2] =
'note';
191 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
192 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
194 $upload_dir = $conf->product->multidir_output[$object->entity].
'/'.
dol_sanitizeFileName($object->ref);
197 $upload_dir = $conf->service->multidir_output[$object->entity].
'/'.
dol_sanitizeFileName($object->ref);
199 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
202 $upload_dir = $conf->product->multidir_output[$object->entity].
'/'.
get_exdir($object->id, 2, 0, 0, $object,
'product').$object->id.
'/photos';
205 $upload_dir = $conf->service->multidir_output[$object->entity].
'/'.
get_exdir($object->id, 2, 0, 0, $object,
'product').$object->id.
'/photos';
207 $nbFiles += count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
209 $nbLinks =
Link::count($db, $object->element, $object->id);
210 $head[$h][0] = DOL_URL_ROOT.
'/product/document.php?id='.$object->id;
211 $head[$h][1] = $langs->trans(
'Documents');
212 if (($nbFiles + $nbLinks) > 0) {
213 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
215 $head[$h][2] =
'documents';
219 $head[$h][0] = DOL_URL_ROOT.
'/product/agenda.php?id='.$object->id;
220 $head[$h][1] = $langs->trans(
"Events");
221 if (
isModEnabled(
'agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
223 $head[$h][1] .= $langs->trans(
"Agenda");
225 $head[$h][2] =
'agenda';
243 global $db, $langs, $conf, $user;
246 $langs->loadLangs(array(
"products",
"productbatch"));
251 $head[$h][0] = DOL_URL_ROOT.
"/product/stock/productlot_card.php?id=".$object->id;
252 $head[$h][1] = $langs->trans(
"Lot");
253 $head[$h][2] =
'card';
257 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
258 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
259 $upload_dir = $conf->productbatch->multidir_output[$object->entity].
'/'.
dol_sanitizeFileName($object->ref);
260 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
261 $nbLinks =
Link::count($db, $object->element, $object->id);
262 $head[$h][0] = DOL_URL_ROOT.
"/product/stock/productlot_document.php?id=".$object->id;
263 $head[$h][1] = $langs->trans(
"Documents");
264 if (($nbFiles + $nbLinks) > 0) {
265 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
267 $head[$h][2] =
'documents';
271 if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) {
273 if (!empty($object->note_private)) {
276 if (!empty($object->note_public)) {
279 $head[$h][0] = DOL_URL_ROOT .
'/product/stock/productlot_note.php?id=' . $object->id;
280 $head[$h][1] = $langs->trans(
'Notes');
282 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>';
284 $head[$h][2] =
'note';
316 global $langs, $conf, $user, $db;
319 $extrafields->fetch_name_optionals_label(
'product');
320 $extrafields->fetch_name_optionals_label(
'product_fournisseur_price');
325 $head[$h][0] = DOL_URL_ROOT.
"/product/admin/product.php";
326 $head[$h][1] = $langs->trans(
'Parameters');
327 $head[$h][2] =
'general';
330 if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($conf->global->PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL)) {
332 0 => DOL_URL_ROOT.
"/product/admin/price_rules.php",
333 1 => $langs->trans(
'MultipriceRules'),
345 $head[$h][0] = DOL_URL_ROOT.
'/product/admin/product_extrafields.php';
346 $head[$h][1] = $langs->trans(
"ExtraFields");
347 $nbExtrafields = $extrafields->attributes[
'product'][
'count'];
348 if ($nbExtrafields > 0) {
349 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
351 $head[$h][2] =
'attributes';
354 $head[$h][0] = DOL_URL_ROOT.
'/product/admin/product_supplier_extrafields.php';
355 $head[$h][1] = $langs->trans(
"ProductSupplierExtraFields");
356 $nbExtrafields = $extrafields->attributes[
'product_fournisseur_price'][
'count'];
357 if ($nbExtrafields > 0) {
358 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
360 $head[$h][2] =
'supplierAttributes';
377 global $langs, $conf, $user, $db;
380 $extrafields->fetch_name_optionals_label(
'product_lot');
385 $head[$h][0] = DOL_URL_ROOT.
"/product/admin/product_lot.php";
386 $head[$h][1] = $langs->trans(
'Parameters');
387 $head[$h][2] =
'settings';
396 $head[$h][0] = DOL_URL_ROOT.
'/product/admin/product_lot_extrafields.php';
397 $head[$h][1] = $langs->trans(
"ExtraFields");
398 $nbExtrafields = $extrafields->attributes[
'product_lot'][
'count'];
399 if ($nbExtrafields > 0) {
400 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
402 $head[$h][2] =
'attributes';
421 global $conf, $langs, $user, $db, $hookmanager;
427 print
'<tr class="liste_titre">';
428 print
'<td class="left" width="25%">'.$langs->trans(
"Referers").
'</td>';
429 print
'<td class="right" width="25%">'.$langs->trans(
"NbOfThirdParties").
'</td>';
430 print
'<td class="right" width="25%">'.$langs->trans(
"NbOfObjectReferers").
'</td>';
431 print
'<td class="right" width="25%">'.$langs->trans(
"TotalQuantity").
'</td>';
435 if (
isModEnabled(
"propal") && $user->rights->propal->lire) {
437 $ret = $product->load_stats_propale($socid);
441 $langs->load(
"propal");
443 print
'<a href="propal.php?id='.$product->id.
'">'.
img_object(
'',
'propal',
'class="pictofixedwidth"').$langs->trans(
"Proposals").
'</a>';
444 print
'</td><td class="right">';
445 print $product->stats_propale[
'customers'];
446 print
'</td><td class="right">';
447 print $product->stats_propale[
'nb'];
448 print
'</td><td class="right">';
449 print $product->stats_propale[
'qty'];
454 if (
isModEnabled(
'supplier_proposal') && $user->rights->supplier_proposal->lire) {
456 $ret = $product->load_stats_proposal_supplier($socid);
460 $langs->load(
"supplier_proposal");
462 print
'<a href="supplier_proposal.php?id='.$product->id.
'">'.
img_object(
'',
'supplier_proposal',
'class="pictofixedwidth"').$langs->trans(
"SupplierProposals").
'</a>';
463 print
'</td><td class="right">';
464 print $product->stats_proposal_supplier[
'suppliers'];
465 print
'</td><td class="right">';
466 print $product->stats_proposal_supplier[
'nb'];
467 print
'</td><td class="right">';
468 print $product->stats_proposal_supplier[
'qty'];
473 if (
isModEnabled(
'commande') && $user->rights->commande->lire) {
475 $ret = $product->load_stats_commande($socid);
479 $langs->load(
"orders");
481 print
'<a href="commande.php?id='.$product->id.
'">'.
img_object(
'',
'order',
'class="pictofixedwidth"').$langs->trans(
"CustomersOrders").
'</a>';
482 print
'</td><td class="right">';
483 print $product->stats_commande[
'customers'];
484 print
'</td><td class="right">';
485 print $product->stats_commande[
'nb'];
486 print
'</td><td class="right">';
487 print $product->stats_commande[
'qty'];
492 if ((
isModEnabled(
"fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (
isModEnabled(
"supplier_order") && $user->rights->supplier_order->lire)) {
494 $ret = $product->load_stats_commande_fournisseur($socid);
498 $langs->load(
"orders");
500 print
'<a href="commande_fournisseur.php?id='.$product->id.
'">'.
img_object(
'',
'supplier_order',
'class="pictofixedwidth"').$langs->trans(
"SuppliersOrders").
'</a>';
501 print
'</td><td class="right">';
502 print $product->stats_commande_fournisseur[
'suppliers'];
503 print
'</td><td class="right">';
504 print $product->stats_commande_fournisseur[
'nb'];
505 print
'</td><td class="right">';
506 print $product->stats_commande_fournisseur[
'qty'];
511 if (
isModEnabled(
'facture') && $user->rights->facture->lire) {
513 $ret = $product->load_stats_facture($socid);
517 $langs->load(
"bills");
519 print
'<a href="facture.php?id='.$product->id.
'">'.
img_object(
'',
'bill',
'class="pictofixedwidth"').$langs->trans(
"CustomersInvoices").
'</a>';
520 print
'</td><td class="right">';
521 print $product->stats_facture[
'customers'];
522 print
'</td><td class="right">';
523 print $product->stats_facture[
'nb'];
524 print
'</td><td class="right">';
525 print $product->stats_facture[
'qty'];
530 if (
isModEnabled(
"facture") && $user->rights->facture->lire) {
532 $ret = $product->load_stats_facturerec($socid);
536 $langs->load(
"bills");
538 print
'<a href="facturerec.php?id='.$product->id.
'">'.
img_object(
'',
'bill',
'class="pictofixedwidth"').$langs->trans(
"RecurringInvoiceTemplate").
'</a>';
539 print
'</td><td class="right">';
540 print $product->stats_facture[
'customers'];
541 print
'</td><td class="right">';
542 print $product->stats_facturerec[
'nb'];
543 print
'</td><td class="right">';
544 print $product->stats_facturerec[
'qty'];
549 if ((
isModEnabled(
"fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (
isModEnabled(
"supplier_invoice") && $user->rights->supplier_invoice->lire)) {
551 $ret = $product->load_stats_facture_fournisseur($socid);
555 $langs->load(
"bills");
557 print
'<a href="facture_fournisseur.php?id='.$product->id.
'">'.
img_object(
'',
'supplier_invoice',
'class="pictofixedwidth"').$langs->trans(
"SuppliersInvoices").
'</a>';
558 print
'</td><td class="right">';
559 print $product->stats_facture_fournisseur[
'suppliers'];
560 print
'</td><td class="right">';
561 print $product->stats_facture_fournisseur[
'nb'];
562 print
'</td><td class="right">';
563 print $product->stats_facture_fournisseur[
'qty'];
569 if (
isModEnabled(
'contrat') && $user->rights->contrat->lire) {
571 $ret = $product->load_stats_contrat($socid);
575 $langs->load(
"contracts");
577 print
'<a href="contrat.php?id='.$product->id.
'">'.
img_object(
'',
'contract',
'class="pictofixedwidth"').$langs->trans(
"Contracts").
'</a>';
578 print
'</td><td class="right">';
579 print $product->stats_contrat[
'customers'];
580 print
'</td><td class="right">';
581 print $product->stats_contrat[
'nb'];
582 print
'</td><td class="right">';
583 print $product->stats_contrat[
'qty'];
591 $ret = $product->load_stats_bom($socid);
598 print
'<a href="bom.php?id='.$product->id.
'">'.
img_object(
'',
'bom',
'class="pictofixedwidth"').$langs->trans(
"BOM").
'</a>';
599 print
'</td><td class="right">';
601 print
'</td><td class="right">';
602 print
$form->textwithpicto($product->stats_bom[
'nb_toconsume'], $langs->trans(
"RowMaterial"));
603 print
$form->textwithpicto($product->stats_bom[
'nb_toproduce'], $langs->trans(
"Finished"));
604 print
'</td><td class="right">';
605 print
$form->textwithpicto($product->stats_bom[
'qty_toconsume'], $langs->trans(
"RowMaterial"));
606 print
$form->textwithpicto($product->stats_bom[
'qty_toproduce'], $langs->trans(
"Finished"));
612 if (
isModEnabled(
'mrp') && !empty($user->rights->mrp->read)) {
614 $ret = $product->load_stats_mo($socid);
620 print
'<a href="mo.php?id='.$product->id.
'">'.
img_object(
'',
'mrp',
'class="pictofixedwidth"').$langs->trans(
"MO").
'</a>';
621 print
'</td><td class="right">';
622 print
$form->textwithpicto($product->stats_mo[
'customers_toconsume'], $langs->trans(
"ToConsume"));
623 print
$form->textwithpicto($product->stats_mo[
'customers_consumed'], $langs->trans(
"QtyAlreadyConsumed"));
624 print
$form->textwithpicto($product->stats_mo[
'customers_toproduce'], $langs->trans(
"QtyToProduce"));
625 print
$form->textwithpicto($product->stats_mo[
'customers_produced'], $langs->trans(
"QtyAlreadyProduced"));
626 print
'</td><td class="right">';
627 print
$form->textwithpicto($product->stats_mo[
'nb_toconsume'], $langs->trans(
"ToConsume"));
628 print
$form->textwithpicto($product->stats_mo[
'nb_consumed'], $langs->trans(
"QtyAlreadyConsumed"));
629 print
$form->textwithpicto($product->stats_mo[
'nb_toproduce'], $langs->trans(
"QtyToProduce"));
630 print
$form->textwithpicto($product->stats_mo[
'nb_produced'], $langs->trans(
"QtyAlreadyProduced"));
631 print
'</td><td class="right">';
632 print
$form->textwithpicto($product->stats_mo[
'qty_toconsume'], $langs->trans(
"ToConsume"));
633 print
$form->textwithpicto($product->stats_mo[
'qty_consumed'], $langs->trans(
"QtyAlreadyConsumed"));
634 print
$form->textwithpicto($product->stats_mo[
'qty_toproduce'], $langs->trans(
"QtyToProduce"));
635 print
$form->textwithpicto($product->stats_mo[
'qty_produced'], $langs->trans(
"QtyAlreadyProduced"));
639 $parameters = array(
'socid'=>$socid);
640 $reshook = $hookmanager->executeHooks(
'addMoreProductStat', $parameters, $product, $nblines);
645 print $hookmanager->resPrint;
663 function measuring_units_string($scale =
'', $measuring_style =
'', $unit = 0, $use_short_label = 0, $outputlangs =
null)
665 return measuringUnitString($unit, $measuring_style, $scale, $use_short_label, $outputlangs);
679 function measuringUnitString($unit, $measuring_style =
'', $scale =
'', $use_short_label = 0, $outputlangs =
null)
682 global $measuring_unit_cache;
684 if (empty($outputlangs)) {
685 $outputlangs = $langs;
688 if (empty($measuring_unit_cache[$unit.
'_'.$measuring_style.
'_'.$scale.
'_'.$use_short_label])) {
689 require_once DOL_DOCUMENT_ROOT.
'/core/class/cunits.class.php';
690 $measuringUnits =
new CUnits($db);
692 if ($measuring_style ==
'' && $scale ==
'') {
693 $arrayforfilter = array(
697 } elseif ($scale !==
'') {
698 $arrayforfilter = array(
700 't.unit_type' => $measuring_style,
704 $arrayforfilter = array(
706 't.unit_type' => $measuring_style,
710 $result = $measuringUnits->fetchAll(
'',
'', 0, 0, $arrayforfilter);
715 if (is_array($measuringUnits->records) && count($measuringUnits->records) > 0) {
716 if ($use_short_label) {
717 $labeltoreturn = $measuringUnits->records[key($measuringUnits->records)]->short_label;
719 $labeltoreturn = $outputlangs->transnoentitiesnoconv($measuringUnits->records[key($measuringUnits->records)]->label);
724 $measuring_unit_cache[$unit.
'_'.$measuring_style.
'_'.$scale.
'_'.$use_short_label] = $labeltoreturn;
725 return $labeltoreturn;
728 return $measuring_unit_cache[$unit.
'_'.$measuring_style.
'_'.$scale.
'_'.$use_short_label];
741 $measuring_units = array();
742 $measuring_units[0] = 0;
743 $measuring_units[-1] = -2;
744 $measuring_units[-2] = -4;
745 $measuring_units[-3] = -6;
746 $measuring_units[98] = 98;
747 $measuring_units[99] = 99;
748 return $measuring_units[$unit];
761 $measuring_units = array();
762 $measuring_units[0] = 0;
763 $measuring_units[-1] = -3;
764 $measuring_units[-2] = -6;
765 $measuring_units[-3] = -9;
766 $measuring_units[98] = 88;
767 $measuring_units[99] = 89;
768 return $measuring_units[$unit];
Class of dictionary type of thirdparty (used by imports)
static count($dbs, $objecttype, $objectid)
Return nb of links.
Class ProductCombination Used to represent a product combination.
const TYPE_PRODUCT
Regular product.
const TYPE_SERVICE
Service.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
setEventMessage($mesgs, $style='mesgs')
Set event message in dol_events session object.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
isModEnabled($module)
Is Dolibarr module enabled.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart='')
Return a path to have a the directory according to object where files are stored.
product_prepare_head($object)
Prepare array with list of tabs.
product_admin_prepare_head()
Return array head with list of tabs to view object informations.
measuringUnitString($unit, $measuring_style='', $scale='', $use_short_label=0, $outputlangs=null)
Return translation label of a unit key.
measuring_units_string($scale='', $measuring_style='', $unit=0, $use_short_label=0, $outputlangs=null)
Return translation label of a unit key.
show_stats_for_company($product, $socid)
Show stats for company.
productlot_prepare_head($object)
Prepare array with list of tabs.
product_lot_admin_prepare_head()
Return array head with list of tabs to view object informations.
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.