';
if (!$i) $totalarray['nbfield']++;
if (!empty($val['isameasure']))
{
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
- $totalarray['val']['t.'.$key] += $obj->$key;
+ $totalarray['val']['t.'.$key] += $object->$key;
}
}
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
+ $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@@ -599,13 +608,13 @@ while ($i < min($num, $limit))
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) $selected = 1;
- print '';
+ if (in_array($object->id, $arrayofselected)) $selected = 1;
+ print '';
}
print '';
if (!$i) $totalarray['nbfield']++;
- print '
';
+ print ''."\n";
$i++;
}
@@ -648,8 +657,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
$urlsource .= str_replace('&', '&', $param);
$filedir = $diroutputmassaction;
- $genallowed = $user->rights->bom->read;
- $delallowed = $user->rights->bom->create;
+ $genallowed = $permissiontoread;
+ $delallowed = $permissiontoadd;
print $formfile->showdocuments('massfilesarea_bom', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 39548f3c41e..edc84cf2ece 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5563,16 +5563,17 @@ abstract class CommonObject
* Return HTML string to put an input field into a page
* Code very similar with showInputField of extra fields
*
- * @param array $val Array of properties for field to show
+ * @param array $val Array of properties for field to show (used only if ->fields not defined)
* @param string $key Key of attribute
* @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value)
* @param string $moreparam To add more parameters on html input tag
* @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names)
* @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
+ * @param int $nonewbutton Force to not show the new button on field that are links to object
* @return string
*/
- public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0)
+ public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0)
{
global $conf, $langs, $form;
@@ -5582,7 +5583,9 @@ abstract class CommonObject
$form = new Form($this->db);
}
- $val = $this->fields[$key];
+ if (! empty($this->fields)) {
+ $val = $this->fields[$key];
+ }
$out = '';
$type = '';
@@ -6125,7 +6128,7 @@ abstract class CommonObject
if (!empty($param_list_array[2])) // If we set to add a create button
{
- if (!GETPOSTISSET('backtopage') && empty($val['disabled'])) // To avoid to open several infinitely the 'Create Object' button and to avoid to have button if field is protected by a "disabled".
+ if (!GETPOSTISSET('backtopage') && empty($val['disabled']) && empty($nonewbutton)) // To avoid to open several times the 'Create Object' button and to avoid to have button if field is protected by a "disabled".
{
list($class, $classfile) = explode(':', $param_list[0]);
if (file_exists(dol_buildpath(dirname(dirname($classfile)).'/card.php'))) $url_path = dol_buildpath(dirname(dirname($classfile)).'/card.php', 1);
@@ -7384,7 +7387,7 @@ abstract class CommonObject
* @param stdClass $obj Contain data of object from database
* @return void
*/
- protected function setVarsFromFetchObj(&$obj)
+ public function setVarsFromFetchObj(&$obj)
{
foreach ($this->fields as $field => $info)
{
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index da936944140..df3ef85230c 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7661,6 +7661,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
$operator = '=';
$newcrit = preg_replace('/([<>=]+)/', '', trim($crit));
+ $reg = array();
preg_match('/([<>=]+)/', trim($crit), $reg);
if ($reg[1])
{
diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php
index 2c58bccc56e..841d1a40316 100644
--- a/htdocs/core/tpl/commonfields_add.tpl.php
+++ b/htdocs/core/tpl/commonfields_add.tpl.php
@@ -56,7 +56,7 @@ foreach($object->fields as $key => $val)
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int');
elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOST($key, 'none');
else $value = GETPOST($key, 'alpha');
- print $object->showInputField($val, $key, $value, '', '', '', 0, $object->table_element);
+ print $object->showInputField($val, $key, $value, '', '', '', 0);
print '';
print '';
}
diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php
index eb1533ba759..4060384d334 100644
--- a/htdocs/core/tpl/commonfields_edit.tpl.php
+++ b/htdocs/core/tpl/commonfields_edit.tpl.php
@@ -55,8 +55,8 @@ foreach($object->fields as $key => $val)
elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOSTISSET($key)?GETPOST($key, 'none'):$object->$key;
else $value = GETPOSTISSET($key)?GETPOST($key, 'alpha'):$object->$key;
//var_dump($val.' '.$key.' '.$value);
- if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0, $object->table_element);
- else print $object->showInputField($val, $key, $value, '', '', '', 0, $object->table_element);
+ if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0);
+ else print $object->showInputField($val, $key, $value, '', '', '', 0);
print '';
print '';
}
diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php
index 6199af8e76b..13d0267817f 100644
--- a/htdocs/core/tpl/commonfields_view.tpl.php
+++ b/htdocs/core/tpl/commonfields_view.tpl.php
@@ -60,6 +60,7 @@ foreach ($object->fields as $key => $val)
print '
';
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index dc63f12511a..acb2ae6e5ae 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -225,6 +225,7 @@ ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Objects must have status '
ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox' into definition of object '%s'. No way to show the combolist.
ErrorFieldRequiredForProduct=Field '%s' is required for product %s
ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s.
+ErrorAddAtLeastOneLineFirst=Add at least one line first
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index aa1af165813..8540612f3a7 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -482,13 +482,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
if ($permissiontoadd)
{
- if (is_array($object->lines) && count($object->lines) > 0)
+ if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
{
print ''.$langs->trans("Validate").'';
}
else
{
- print ''.$langs->trans("Validate").'';
+ $langs->load("errors");
+ print ''.$langs->trans("Validate").'';
}
}
}
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 319d8ff8903..70f550e4ba1 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -75,7 +75,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
-$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@@ -240,6 +240,10 @@ foreach ($search as $key => $val)
{
if ($key == 'status' && $search[$key] == -1) continue;
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
+ if (strpos($object->fields[$key]['type'], 'integer:') === 0) {
+ if ($search[$key] == '-1') $search[$key] = '';
+ $mode_search = 2;
+ }
if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search));
}
if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
@@ -260,6 +264,7 @@ foreach($object->fields as $key => $val)
// Add fields from extrafields
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
+}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook
@@ -421,7 +426,10 @@ foreach ($object->fields as $key => $val)
{
print '
';
}
}
@@ -487,11 +495,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
if (empty($obj)) break; // Should not happen
// Store properties in $object
- $object->id = $obj->rowid;
- foreach ($object->fields as $key => $val)
- {
- if (property_exists($obj, $key)) $object->$key = $obj->$key;
- }
+ $object->setVarsFromFetchObj($obj);
// Show here line of result
print '
';
if (!$i) $totalarray['nbfield']++;
if (!empty($val['isameasure']))
{
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
- $totalarray['val']['t.'.$key] += $obj->$key;
+ $totalarray['val']['t.'.$key] += $object->$key;
}
}
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
+ $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@@ -512,13 +524,13 @@ while ($i < min($num, $limit))
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) $selected = 1;
- print '';
+ if (in_array($object->id, $arrayofselected)) $selected = 1;
+ print '';
}
print '';
if (!$i) $totalarray['nbfield']++;
- print '
';
+ print ''."\n";
$i++;
}
@@ -560,8 +572,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
$urlsource .= str_replace('&', '&', $param);
$filedir = $diroutputmassaction;
- $genallowed = $user->rights->mrp->read;
- $delallowed = $user->rights->mrp->write;
+ $genallowed = $permissiontoread;
+ $delallowed = $permissiontoadd;
print $formfile->showdocuments('massfilesarea_mrp', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
}
diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 148caa30ed7..e3b5e159913 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -259,7 +259,7 @@ if (empty($reshook))
$error++;
}
}
- var_dump(GETPOST('batchtoproduce-'.$line->id.'-'.$i));
+
$idstockmove = 0;
if (! $error && GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i) > 0) {
// Record stock movement
diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php
index ca3a0c114d8..2562b2bcb93 100644
--- a/htdocs/product/inventory/class/inventory.class.php
+++ b/htdocs/product/inventory/class/inventory.class.php
@@ -57,7 +57,7 @@ class Inventory extends CommonObject
const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;
const STATUS_RECORDED = 2;
- const STATUS_CANCELED = -1;
+ const STATUS_CANCELED = 9;
/**
* 'type' if the field format ('integer', 'integer:Class:pathtoclass', 'varchar(x)', 'double(24,8)', 'text', 'html', 'datetime', 'timestamp', 'float')
@@ -100,7 +100,7 @@ class Inventory extends CommonObject
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>512),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Recorded', -1=>'Canceled')),
+ 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>4, 'enabled'=>1, 'position'=>1000, 'default'=>0, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Recorded', 9=>'Canceled')),
);
/**
diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php
index 11854843b9d..ceab13454a0 100644
--- a/htdocs/product/inventory/list.php
+++ b/htdocs/product/inventory/list.php
@@ -37,7 +37,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
-$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorylist'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'inventorylist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@@ -109,13 +109,22 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
{
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val)
{
- if (!empty($extrafields->attributes[$object->table_element]['list'][$key]))
- $arrayfields["ef.".$key] = array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key]));
+ if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) {
+ $arrayfields["ef.".$key] = array(
+ 'label'=>$extrafields->attributes[$object->table_element]['label'][$key],
+ 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1),
+ 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key],
+ 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])
+ );
+ }
}
}
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
+$permissiontoread = $user->rights->stock->lire;
+$permissiontoadd = $user->rights->stock->creer;
+$permissiontodelete = $user->rights->stock->supprimer;
/*
@@ -153,8 +162,6 @@ if (empty($reshook))
// Mass actions
$objectclass = 'Inventory';
$objectlabel = 'Inventory';
- $permissiontoread = $user->rights->stock->lire;
- $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -188,7 +195,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
-$sql .= $hookmanager->resPrint;
+$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
$sql = preg_replace('/,\s*$/', '', $sql);
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
@@ -198,9 +205,14 @@ foreach ($search as $key => $val)
{
if ($key == 'status' && $search[$key] == -1) continue;
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
+ if (strpos($object->fields[$key]['type'], 'integer:') === 0) {
+ if ($search[$key] == '-1') $search[$key] = '';
+ $mode_search = 2;
+ }
if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search));
}
if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
+//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
// Add where from hooks
@@ -222,7 +234,7 @@ if (! empty($extrafields->attributes[$object->table_element]['label'])) {
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
-$sql=preg_replace('/, $/','', $sql);
+$sql=preg_replace('/,\s*$/','', $sql);
*/
$sql .= $db->order($sortfield, $sortorder);
@@ -240,13 +252,13 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
}
}
// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set.
-if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords)
+if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit)))
{
$num = $nbtotalofrecords;
}
else
{
- $sql .= $db->plimit($limit + 1, $offset);
+ if ($limit) $sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
if (!$resql)
@@ -259,7 +271,7 @@ else
}
// Direct jump if only one record found
-if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
+if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page)
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
@@ -289,10 +301,12 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// List of mass actions available
$arrayofmassactions = array(
- //'presend'=>$langs->trans("SendByMail"),
+ //'validate'=>$langs->trans("Validate"),
+ //'generate_doc'=>$langs->trans("ReGeneratePDF"),
//'builddoc'=>$langs->trans("PDFMerge"),
+ //'presend'=>$langs->trans("SendByMail"),
);
-if ($user->rights->stock->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete");
+if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
@@ -306,7 +320,7 @@ print '';
print '';
print '';
-$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->bom->write);
+$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bom/bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit);
@@ -320,7 +334,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
if ($search_all)
{
foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
- print '