32require
'../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
39$langs->loadLangs(array(
'bills',
'products',
'stocks'));
43$action =
GETPOST(
'action',
'aZ09');
44$confirm =
GETPOST(
'confirm',
'alpha');
45$cancel =
GETPOST(
'cancel',
'alpha');
50if (!empty($user->socid)) {
51 $socid = $user->socid;
53$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref :
''));
54$fieldtype = (!empty($ref) ?
'ref' :
'rowid');
57$hookmanager->initHooks(array(
'productcompositioncard',
'globalcard'));
61if ($id > 0 || !empty($ref)) {
62 $result = $object->fetch($id, $ref);
63 $objectid = $object->id;
67$result =
restrictedArea($user,
'produit|service', $fieldvalue,
'product&product',
'',
'', $fieldtype);
70 if ($object->type == $object::TYPE_PRODUCT) {
71 restrictedArea($user,
'produit', $object->id,
'product&product',
'',
'');
73 if ($object->type == $object::TYPE_SERVICE) {
74 restrictedArea($user,
'service', $object->id,
'product&product',
'',
'');
77 restrictedArea($user,
'produit|service', $fieldvalue,
'product&product',
'',
'', $fieldtype);
93if ($action ==
'add_prod' && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
95 $maxprod =
GETPOST(
"max_prod",
'int');
97 for ($i = 0; $i < $maxprod; $i++) {
100 if ($object->add_sousproduit($id,
GETPOST(
"prod_id_".$i,
'int'), $qty,
GETPOST(
"prod_incdec_".$i,
'int')) > 0) {
106 if ($object->error ==
"isFatherOfThis") {
107 setEventMessages($langs->trans(
"ErrorAssociationIsFatherOfThis"),
null,
'errors');
113 if ($object->del_sousproduit($id,
GETPOST(
"prod_id_".$i,
'int')) > 0) {
124 header(
"Location: ".$_SERVER[
"PHP_SELF"].
'?id='.$object->id);
127} elseif ($action ===
'save_composed_product') {
128 $TProduct =
GETPOST(
'TProduct',
'array');
129 if (!empty($TProduct)) {
130 foreach ($TProduct as $id_product => $row) {
131 if ($row[
'qty'] > 0) {
132 $object->update_sousproduit($id, $id_product, $row[
'qty'], isset($row[
'incdec']) ? 1 : 0);
134 $object->del_sousproduit($id, $id_product);
140 header(
"Location: ".$_SERVER[
"PHP_SELF"].
'?id='.$object->id);
149$form =
new Form($db);
152$productstatic =
new Product($db);
155if ($action ==
'search') {
156 $current_lang = $langs->getDefaultLang();
158 $sql =
'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type as type, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,';
159 $sql .=
' p.fk_product_type, p.tms as datem, p.tobatch';
160 $sql .=
', p.tosell as status, p.tobuy as status_buy';
162 $sql .=
', pl.label as labelm, pl.description as descriptionm';
165 $parameters = array();
166 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
167 $sql .= $hookmanager->resPrint;
169 $sql .=
' FROM '.MAIN_DB_PREFIX.
'product as p';
170 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'categorie_product as cp ON p.rowid = cp.fk_product';
172 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"product_lang as pl ON pl.fk_product = p.rowid AND lang='".($current_lang).
"'";
174 $sql .=
' WHERE p.entity IN ('.getEntity(
'product').
')';
176 $parameters = array();
177 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
178 $sql .= $hookmanager->resPrint;
182 $params = array(
'p.ref',
'p.label',
'p.description',
'p.note');
185 $params[] =
'pl.label';
186 $params[] =
'pl.description';
187 $params[] =
'pl.note';
189 if (isModEnabled(
'barcode')) {
190 $params[] =
'p.barcode';
194 if (isModEnabled(
'categorie') && !empty($parent) && $parent != -1) {
195 $sql .=
" AND cp.fk_categorie ='".$db->escape($parent).
"'";
197 $sql .=
" ORDER BY p.ref ASC";
199 $resql = $db->query($sql);
202$title = $langs->trans(
'ProductServiceCard');
204$shortlabel =
dol_trunc($object->label, 16);
206 $title = $langs->trans(
'Product').
" ".$shortlabel.
" - ".$langs->trans(
'AssociatedProducts');
207 $help_url =
'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos|DE:Modul_Produkte';
210 $title = $langs->trans(
'Service').
" ".$shortlabel.
" - ".$langs->trans(
'AssociatedProducts');
211 $help_url =
'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Leistungen';
218$titre = $langs->trans(
"CardProduct".$object->type);
224if ($id > 0 || !empty($ref)) {
228 if ($user->rights->produit->lire || $user->hasRight(
'service',
'lire')) {
229 $linkback =
'<a href="'.DOL_URL_ROOT.
'/product/list.php?restore_lastsearch_values=1&type='.$object->type.
'">'.$langs->trans(
"BackToList").
'</a>';
232 if ($user->socid && !in_array(
'product', explode(
',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
238 if ($object->type !=
Product::TYPE_SERVICE || !empty($conf->global->STOCK_SUPPORTS_SERVICES) || empty($conf->global->PRODUIT_MULTIPRICES)) {
239 print
'<div class="fichecenter">';
240 print
'<div class="fichehalfleft">';
241 print
'<div class="underbanner clearboth"></div>';
243 print
'<table class="border centpercent tableforfield">';
246 if (isModEnabled(
"product") && isModEnabled(
"service")) {
247 $typeformat =
'select;0:'.$langs->trans(
"Product").
',1:'.$langs->trans(
"Service");
248 print
'<tr><td class="titlefield">';
249 print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey(
"Type",
'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans(
'Type');
251 print $form->editfieldval(
"Type",
'fk_product_type', $object->type, $object, $usercancreate, $typeformat);
257 print
'</div><div class="fichehalfright">';
258 print
'<div class="underbanner clearboth"></div>';
260 print
'<table class="border centpercent tableforfield">';
264 if (empty($conf->global->PRODUCT_DISABLE_NATURE)) {
265 print
'<tr><td>'.$form->textwithpicto($langs->trans(
"NatureOfProductShort"), $langs->trans(
"NatureOfProductDesc")).
'</td><td>';
266 print $object->getLibFinished();
272 if (empty($conf->global->PRODUIT_MULTIPRICES)) {
274 print
'<tr><td class="titlefield">'.$langs->trans(
"SellingPrice").
'</td><td>';
275 if ($object->price_base_type ==
'TTC') {
276 print
price($object->price_ttc).
' '.$langs->trans($object->price_base_type);
278 print
price($object->price).
' '.$langs->trans($object->price_base_type ? $object->price_base_type :
'HT');
283 print
'<tr><td>'.$langs->trans(
"MinPrice").
'</td><td>';
284 if ($object->price_base_type ==
'TTC') {
285 print
price($object->price_min_ttc).
' '.$langs->trans($object->price_base_type);
287 print
price($object->price_min).
' '.$langs->trans($object->price_base_type ? $object->price_base_type :
'HT');
302 $prodsfather = $object->getFather();
303 $object->get_sousproduits_arbo();
304 $parent_label = $object->label;
305 $prods_arbo = $object->get_arbo_each_prod();
308 if (!empty($conf->use_javascript_ajax)) {
309 $nboflines = $prods_arbo;
310 $table_element_line=
'product_association';
312 include DOL_DOCUMENT_ROOT .
'/core/tpl/ajaxrow.tpl.php';
316 $nbofsubsubproducts = count($prods_arbo);
317 $prodschild = $object->getChildsArbo($id, 1);
318 $nbofsubproducts = count($prodschild);
321 print
'<div class="fichecenter">';
325 print
'<table class="liste">';
326 print
'<tr class="liste_titre">';
327 print
'<td>'.$langs->trans(
'ParentProducts').
'</td>';
328 print
'<td>'.$langs->trans(
'Label').
'</td>';
329 print
'<td class="right">'.$langs->trans(
'Qty').
'</td>';
331 if (count($prodsfather) > 0) {
332 foreach ($prodsfather as $value) {
333 $idprod = $value[
"id"];
334 $productstatic->id = $idprod;
335 $productstatic->type = $value[
"fk_product_type"];
336 $productstatic->ref = $value[
'ref'];
337 $productstatic->label = $value[
'label'];
338 $productstatic->entity = $value[
'entity'];
339 $productstatic->status = $value[
'status'];
340 $productstatic->status_buy = $value[
'status_buy'];
342 print
'<tr class="oddeven">';
343 print
'<td>'.$productstatic->getNomUrl(1,
'composition').
'</td>';
344 print
'<td>'.dol_escape_htmltag($productstatic->label).
'</td>';
345 print
'<td class="right">'.dol_escape_htmltag($value[
'qty']).
'</td>';
349 print
'<tr class="oddeven">';
350 print
'<td colspan="3"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td>';
359 print
'<div class="fichecenter">';
361 $atleastonenotdefined = 0;
364 print
'<form name="formComposedProduct" action="'.$_SERVER[
'PHP_SELF'].
'" method="post">';
365 print
'<input type="hidden" name="token" value="'.newToken().
'" />';
366 print
'<input type="hidden" name="action" value="save_composed_product" />';
367 print
'<input type="hidden" name="id" value="'.$id.
'" />';
369 print
'<table id="tablelines" class="ui-sortable liste nobottom">';
371 print
'<tr class="liste_titre nodrag nodrop">';
373 print
'<td>'.$langs->trans(
'Position').
'</td>';
375 print
'<td>'.$langs->trans(
'ComposedProduct').
'</td>';
377 print
'<td>'.$langs->trans(
'Label').
'</td>';
379 print
'<td class="right" colspan="2">'.$langs->trans(
'MinSupplierPrice').
'</td>';
381 print
'<td class="right" colspan="2">'.$langs->trans(
'MinCustomerPrice').
'</td>';
383 if (isModEnabled(
'stock')) {
384 print
'<td class="right">'.$langs->trans(
'Stock').
'</td>';
387 print
'<td class="right">'.$langs->trans(
'Qty').
'</td>';
389 print
'<td class="center">'.$langs->trans(
'ComposedProductIncDecStock').
'</td>';
391 print
'<td class="linecolmove" style="width: 10px"></td>';
396 if (count($prods_arbo)) {
397 foreach ($prods_arbo as $value) {
398 $productstatic->fetch($value[
'id']);
400 if ($value[
'level'] <= 1) {
401 print
'<tr id="'.$object->sousprods[$parent_label][$value[
'id']][6].
'" class="drag drop oddeven level1">';
404 print
'<td>'.$object->sousprods[$parent_label][$value[
'id']][7].
'</td>';
407 $nb_of_subproduct = $value[
'nb'];
410 print
'<td>'.$productstatic->getNomUrl(1,
'composition').
'</td>';
413 print
'<td title="'.dol_escape_htmltag($productstatic->label).
'" class="tdoverflowmax150">'.
dol_escape_htmltag($productstatic->label).
'</td>';
416 print
'<td class="right">';
417 if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) {
418 print $langs->trans(
"BuyingPriceMinShort").
': ';
419 if ($product_fourn->product_fourn_price_id > 0) {
420 print $product_fourn->display_price_product_fournisseur(0, 0);
422 print $langs->trans(
"NotDefined"); $notdefined++; $atleastonenotdefined++;
428 $fourn_unitprice = (!empty($product_fourn->fourn_unitprice) ? $product_fourn->fourn_unitprice : 0);
429 $fourn_remise_percent = (!empty($product_fourn->fourn_remise_percent) ? $product_fourn->fourn_remise_percent : 0);
430 $fourn_remise = (!empty($product_fourn->fourn_remise) ? $product_fourn->fourn_remise : 0);
432 $unitline =
price2num(($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise),
'MU');
433 $totalline =
price2num($value[
'nb'] * ($fourn_unitprice * (1 - ($fourn_remise_percent / 100)) - $fourn_remise),
'MT');
434 $total += $totalline;
436 print
'<td class="right nowraponall">';
437 print ($notdefined ?
'' : ($value[
'nb'] > 1 ? $value[
'nb'].
'x ' :
'').
'<span class="amount">'.
price($unitline,
'',
'', 0, 0, -1, $conf->currency)).
'</span>';
441 $pricesell = $productstatic->price;
442 if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
443 $pricesell =
'Variable';
445 $totallinesell =
price2num($value[
'nb'] * ($pricesell),
'MT');
446 $totalsell += $totallinesell;
448 print
'<td class="right" colspan="2">';
449 print ($notdefined ?
'' : ($value[
'nb'] > 1 ? $value[
'nb'].
'x ' :
''));
450 if (is_numeric($pricesell)) {
451 print
'<span class="amount">'.price($pricesell,
'',
'', 0, 0, -1, $conf->currency).
'</span>';
453 print
'<span class="opacitymedium">'.$langs->trans($pricesell).
'</span>';
458 if (isModEnabled(
'stock')) {
459 print
'<td class="right">'.$value[
'stock'].
'</td>';
463 if ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer')) {
464 print
'<td class="center"><input type="text" value="'.$nb_of_subproduct.
'" name="TProduct['.$productstatic->id.
'][qty]" class="right width40" /></td>';
465 print
'<td class="center"><input type="checkbox" name="TProduct['.$productstatic->id.
'][incdec]" value="1" '.($value[
'incdec'] == 1 ?
'checked' :
'').
' /></td>';
467 print
'<td>'.$nb_of_subproduct.
'</td>';
468 print
'<td>'.($value[
'incdec'] == 1 ?
'x' :
'').
'</td>';
472 print
'<td class="linecolmove tdlineupdown center"></td>';
477 if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) {
478 $hide =
' hideobject';
481 print
'<tr class="oddeven'.$hide.
'" id="sub-'.$value[
'id_parent'].
'" data-ignoreidfordnd=1>';
484 $productstatic->ref = $value[
'ref'];
491 for ($i = 0; $i < $value[
'level']; $i++) {
492 print
' ';
494 print $productstatic->getNomUrl(1,
'composition');
498 print
'<td>'.dol_escape_htmltag($productstatic->label).
'</td>';
501 print
'<td> </td>';
502 print
'<td> </td>';
504 print
'<td> </td>';
505 print
'<td> </td>';
508 if (isModEnabled(
'stock')) {
513 print
'<td class="right">'.dol_escape_htmltag($value[
'nb']).
'</td>';
516 print
'<td> </td>';
519 print
'<td> </td>';
528 print
'<tr class="liste_total">';
534 print
'<td class="liste_total"></td>';
537 print
'<td class="liste_total"></td>';
540 print
'<td class="liste_total right">';
541 print $langs->trans(
"TotalBuyingPriceMinShort");
544 print
'<td class="liste_total right">';
545 if ($atleastonenotdefined) {
546 print $langs->trans(
"Unknown").
' ('.$langs->trans(
"SomeSubProductHaveNoPrices").
')';
548 print ($atleastonenotdefined ?
'' :
price($total,
'',
'', 0, 0, -1, $conf->currency));
552 print
'<td class="liste_total right">';
553 print $langs->trans(
"TotalSellingPriceMinShort");
556 print
'<td class="liste_total right">';
557 if ($atleastonenotdefined) {
558 print $langs->trans(
"Unknown").
' ('.$langs->trans(
"SomeSubProductHaveNoPrices").
')';
560 print ($atleastonenotdefined ?
'' :
price($totalsell,
'',
'', 0, 0, -1, $conf->currency));
564 if (isModEnabled(
'stock')) {
565 print
'<td class="liste_total right"> </td>';
570 print
'<td class="center">';
571 if ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer')) {
572 print
'<input type="submit" class="button button-save" value="'.$langs->trans(
"Save").
'">';
581 if (isModEnabled(
'stock')) {
585 print
'<tr class="oddeven">';
586 print
'<td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td>';
602 if ((empty($action) || $action ==
'view' || $action ==
'edit' || $action ==
'search' || $action ==
're-edit') && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
606 if (isModEnabled(
'categorie')) {
611 print
'<form action="'.DOL_URL_ROOT.
'/product/composition/card.php?id='.$id.
'" method="POST">';
612 print
'<input type="hidden" name="action" value="search">';
613 print
'<input type="hidden" name="id" value="'.$id.
'">';
614 print
'<div class="inline-block">';
615 print
'<input type="hidden" name="token" value="'.newToken().
'">';
616 print $langs->trans(
"KeywordFilter").
': ';
617 print
'<input type="text" name="key" value="'.$key.
'"> ';
619 if (isModEnabled(
'categorie')) {
620 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
621 print
'<div class="inline-block">'.$langs->trans(
"CategoryFilter").
': ';
622 print $form->select_all_categories(Categorie::TYPE_PRODUCT, $parent,
'parent').
' </div>';
625 print
'<div class="inline-block">';
626 print
'<input type="submit" class="button small" value="'.$langs->trans(
"Search").
'">';
633 if ($action ==
'search') {
635 print
'<form action="'.DOL_URL_ROOT.
'/product/composition/card.php?id='.$id.
'" method="post">';
636 print
'<input type="hidden" name="token" value="'.newToken().
'">';
637 print
'<input type="hidden" name="action" value="add_prod">';
638 print
'<input type="hidden" name="id" value="'.$id.
'">';
640 print
'<table class="noborder centpercent">';
641 print
'<tr class="liste_titre">';
642 print
'<th class="liste_titre">'.$langs->trans(
"ComposedProduct").
'</td>';
643 print
'<th class="liste_titre">'.$langs->trans(
"Label").
'</td>';
645 print
'<th class="liste_titre right">'.$langs->trans(
"Qty").
'</td>';
646 print
'<th class="center">'.$langs->trans(
'ComposedProductIncDecStock').
'</th>';
649 $num = $db->num_rows($resql);
653 print
'<tr><td colspan="4">'.$langs->trans(
"NoMatchFound").
'</td></tr>';
658 while ($i < min($num, $MAX)) {
659 $objp = $db->fetch_object($resql);
660 if ($objp->rowid != $id) {
663 $prod_arbo->id = $objp->rowid;
667 $prod_arbo->get_sousproduits_arbo();
669 $prods_arbo = $prod_arbo->get_arbo_each_prod();
670 if (count($prods_arbo) > 0) {
671 foreach ($prods_arbo as $key => $value) {
672 if ($value[1] == $id) {
684 print
'<tr class="oddeven">';
686 $productstatic->id = $objp->rowid;
687 $productstatic->ref = $objp->ref;
688 $productstatic->label = $objp->label;
689 $productstatic->type = $objp->type;
690 $productstatic->entity = $objp->entity;
691 $productstatic->status = $objp->status;
692 $productstatic->status_buy = $objp->status_buy;
693 $productstatic->status_batch = $objp->tobatch;
695 print
'<td>'.$productstatic->getNomUrl(1,
'', 24).
'</td>';
696 $labeltoshow = $objp->label;
698 $labeltoshow = $objp->labelm;
701 print
'<td>'.$labeltoshow.
'</td>';
704 if ($object->is_sousproduit($id, $objp->rowid)) {
706 $qty = $object->is_sousproduit_qty;
707 $incdec = $object->is_sousproduit_incdec;
717 print
'<td class="right"><input type="hidden" name="prod_id_'.$i.
'" value="'.$objp->rowid.
'"><input type="text" size="2" name="prod_qty_'.$i.
'" value="'.($qty ? $qty :
'').
'"></td>';
720 print
'<td class="center">';
722 print
'<input type="checkbox" name="prod_incdec_'.$i.
'" value="1" '.($incdec ?
'checked' :
'').
'>';
725 print
'<input type="checkbox" name="prod_incdec_'.$i.
'" value="1" checked>';
735 print
'<tr class="oddeven">';
736 print
'<td><span class="opacitymedium">'.$langs->trans(
"More").
'...</span></td>';
746 print
'<input type="hidden" name="max_prod" value="'.$i.
'">';
749 print
'<div class="center">';
750 print
'<input type="submit" class="button button-save" name="save" value="'.$langs->trans(
"Add").
'/'.$langs->trans(
"Update").
'">';
751 print
'<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage predefined suppliers products.
Class to manage products or services.
const TYPE_PRODUCT
Regular product.
const TYPE_STOCKKIT
Advanced feature: stock kit.
const TYPE_SERVICE
Service.
const TYPE_ASSEMBLYKIT
Advanced feature: assembly kit.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
product_prepare_head($object)
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.