';
}
if (!empty($arrayfields['sale_representative']['checked']))
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index d9d0442e49e..b3e383ea762 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -1031,7 +1031,7 @@ class FormCompany extends Form
$out .= '';
$out .= '';
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
- $out .= $this->selectarray($htmlname, $this->typent_array(0, $filter), $selected, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
+ $out .= $this->selectarray($htmlname, $this->typent_array(0, $filter), $selected, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
$out .= '';
$out .= '';
} else {
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index a8e08ef1440..0ab4f39c52f 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4507,7 +4507,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
//print 'totalnboflines='.$totalnboflines.'-savlimit='.$savlimit.'-limit='.$limit.'-num='.$num.'-nextpage='.$nextpage;
print "\n";
- print "\n";
+ print "\n";
print '
'; // maring bottom must be same than into load_fiche_tire
// Left
diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php
index 6a894972eb7..93c67f63b3c 100644
--- a/htdocs/core/modules/modBarcode.class.php
+++ b/htdocs/core/modules/modBarcode.class.php
@@ -93,30 +93,35 @@ class modBarcode extends DolibarrModules
// Main menu entries
$r = 0;
- $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
- 'mainmenu'=>'tools',
- 'leftmenu'=>'barcodeprint',
- 'type'=>'left', // This is a Left menu entry
- 'titre'=>'BarCodePrintsheet',
- 'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint',
- 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>200,
- 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'mainmenu'=>'tools',
+ 'leftmenu'=>'barcodeprint',
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'BarCodePrintsheet',
+ 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
+ 'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint',
+ 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>200,
+ 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
- $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
- 'type'=>'left', // This is a Left menu entry
- 'titre'=>'MassBarcodeInit',
- 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools',
- 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>300,
- 'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
- 'target'=>'',
- 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'MassBarcodeInit',
+ 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools',
+ 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>300,
+ 'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>0, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
}
@@ -135,14 +140,14 @@ class modBarcode extends DolibarrModules
$this->remove($options);
$sql = array(
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('DATAMATRIX', 'Datamatrix', 0, '1234567xyz', __ENTITY__)", 'ignoreerror'=>1),
- array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('QRCODE', 'Qr Code', 0, 'www.dolibarr.org', __ENTITY__)", 'ignoreerror'=>1)
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('DATAMATRIX', 'Datamatrix', 0, '1234567xyz', __ENTITY__)", 'ignoreerror'=>1),
+ array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('QRCODE', 'Qr Code', 0, 'www.dolibarr.org', __ENTITY__)", 'ignoreerror'=>1)
);
return $this->_init($sql, $options);
diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php
index 7365f55cf7c..e36827f2dee 100644
--- a/htdocs/core/modules/modBlockedLog.class.php
+++ b/htdocs/core/modules/modBlockedLog.class.php
@@ -124,18 +124,20 @@ class modBlockedLog extends DolibarrModules
// -----------------
$r = 0;
$this->menu[$r] = array(
- 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
- 'mainmenu'=>'tools',
- 'leftmenu'=>'blockedlogbrowser',
- 'type'=>'left', // This is a Left menu entry
- 'titre'=>'BrowseBlockedLog',
- 'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser',
- 'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
- 'position'=>200,
- 'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
- 'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
+ 'mainmenu'=>'tools',
+ 'leftmenu'=>'blockedlogbrowser',
+ 'type'=>'left', // This is a Left menu entry
+ 'titre'=>'BrowseBlockedLog',
+ 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
+ 'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser',
+ 'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
+ 'position'=>200,
+ 'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
+ 'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
}
diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php
index d83edc6cf96..847200adc4f 100644
--- a/htdocs/core/modules/modECM.class.php
+++ b/htdocs/core/modules/modECM.class.php
@@ -123,59 +123,68 @@ class modECM extends DolibarrModules
$r = 0;
// Top menu
- $this->menu[$r] = array('fk_menu'=>0,
- 'type'=>'top',
- 'titre'=>'MenuECM',
- 'mainmenu'=>'ecm',
- 'url'=>'/ecm/index.php',
- 'langs'=>'ecm',
- 'position'=>82,
- 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
- 'enabled'=>'$conf->ecm->enabled',
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>0,
+ 'type'=>'top',
+ 'titre'=>'MenuECM',
+ 'mainmenu'=>'ecm',
+ 'url'=>'/ecm/index.php',
+ 'langs'=>'ecm',
+ 'position'=>82,
+ 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
+ 'enabled'=>'$conf->ecm->enabled',
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
// Left menu linked to top menu
- $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm',
- 'type'=>'left',
- 'titre'=>'ECMArea',
- 'mainmenu'=>'ecm',
- 'leftmenu'=>'ecm',
- 'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
- 'langs'=>'ecm',
- 'position'=>101,
- 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
- 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>'fk_mainmenu=ecm',
+ 'type'=>'left',
+ 'titre'=>'ECMArea',
+ 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
+ 'mainmenu'=>'ecm',
+ 'leftmenu'=>'ecm',
+ 'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
+ 'langs'=>'ecm',
+ 'position'=>101,
+ 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
+ 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
- $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
- 'type'=>'left',
- 'titre'=>'ECMSectionsManual',
- 'mainmenu'=>'ecm',
- 'leftmenu'=>'ecm_manual',
- 'url'=>'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
- 'langs'=>'ecm',
- 'position'=>102,
- 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
- 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
+ 'type'=>'left',
+ 'titre'=>'ECMSectionsManual',
+ 'mainmenu'=>'ecm',
+ 'leftmenu'=>'ecm_manual',
+ 'url'=>'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
+ 'langs'=>'ecm',
+ 'position'=>102,
+ 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
+ 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
- $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
- 'type'=>'left',
- 'titre'=>'ECMSectionsAuto',
- 'mainmenu'=>'ecm',
- 'url'=>'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
- 'langs'=>'ecm',
- 'position'=>103,
- 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
- 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',
- 'target'=>'',
- 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
+ $this->menu[$r] = array(
+ 'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
+ 'type'=>'left',
+ 'titre'=>'ECMSectionsAuto',
+ 'mainmenu'=>'ecm',
+ 'url'=>'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm',
+ 'langs'=>'ecm',
+ 'position'=>103,
+ 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
+ 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',
+ 'target'=>'',
+ 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
+ );
$r++;
}
}
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 20bb6f298cb..a21ad170b09 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -274,7 +274,7 @@ if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_tracking) $sql .= natural_search("e.tracking_number", $search_tracking);
-if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
+if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;
if ($search_user > 0)
{
@@ -339,6 +339,7 @@ if ($resql)
if ($search_tracking) $param .= "&search_tracking=".urlencode($search_tracking);
if ($search_town) $param .= '&search_town='.urlencode($search_town);
if ($search_zip) $param .= '&search_zip='.urlencode($search_zip);
+ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end);
@@ -490,7 +491,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked']))
{
print '