'.$langs->trans("CreatedBy").' ';
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 8aa5ce64655..0aa828dc77a 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php';
if (!$user->rights->commande->lire) accessforbidden();
$langs->load("orders");
+$langs->load("bills");
// Security check
$socid=GETPOST('socid','int');
diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index a6e04121707..bf0331f251d 100644
--- a/htdocs/commande/stats/index.php
+++ b/htdocs/commande/stats/index.php
@@ -256,7 +256,7 @@ print '';
print '
'.$langs->trans("ThirdParty").' ';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
- print $form->select_company($socid,'socid',$filter,1);
+ print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
print ' ';
// User
print '
'.$langs->trans("CreatedBy").' ';
diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php
index 9ffbe111ea7..216988b6a7a 100644
--- a/htdocs/compta/deplacement/stats/index.php
+++ b/htdocs/compta/deplacement/stats/index.php
@@ -237,7 +237,7 @@ print ' '.$langs->tra
// Company
print ' '.$langs->trans("ThirdParty").' ';
$filter='';
-print $form->select_company($socid,'socid',$filter,1,1);
+print $form->select_company($socid,'socid',$filter,1,1,0,array(),0,'','style="width: 95%"');
print ' ';
// User
print '
'.$langs->trans("User").' ';
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index bfe3cdc8555..14f8c8d18f6 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -240,7 +240,7 @@ print '';
print '
'.$langs->trans("ThirdParty").' ';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
- print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 100%"');
+ print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
print ' ';
// User
print '
'.$langs->trans("CreatedBy").' ';
diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php
index cc66d7c7978..4a8dc21ca1b 100644
--- a/htdocs/compta/salaries/card.php
+++ b/htdocs/compta/salaries/card.php
@@ -336,9 +336,11 @@ if ($id)
print '';
- print "";
+ $linkback = ''.$langs->trans("BackToList").' ';
+
+ print " ";
print ''.$langs->trans("Ref").' ';
- print $object->ref;
+ print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print ' ';
// Employee
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index efc994a0446..62ebd0589c0 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -898,9 +898,10 @@ class Form
* @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param int $limit Maximum number of elements
* @param string $morecss Add more css styles to the SELECT component
+ * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @return string HTML string with select box for thirdparty.
*/
- function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100')
+ function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='')
{
$out='';
@@ -934,7 +935,7 @@ class Form
}
else
{*/
- $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss);
+ $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam);
//}
return $out;
@@ -954,9 +955,10 @@ class Form
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $limit Limit number of answers
* @param string $morecss Add more css styles to the SELECT component
+ * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @return string HTML string with
*/
- function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100')
+ function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='')
{
global $conf,$user,$langs;
@@ -1010,7 +1012,7 @@ class Form
}
// Construct $out and $outarray
- $out.= ''."\n";
+ $out.= ''."\n";
$textifempty='';
// Do not use textempty = ' ' or ' ' here, or search on key will search on ' key'.
@@ -4510,7 +4512,7 @@ class Form
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '), <0 to add an empty value with key that is this value.
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
* @param int $value_as_key 1 to use value as key
- * @param string $moreparam Add more parameters onto the select tag
+ * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
* @param int $translate Translate and encode value
* @param int $maxlen Length maximum for labels
* @param int $disabled Html select box is disabled
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index d6f1521e49d..1727db5f227 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -598,7 +598,11 @@ class FormOther
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$color = colorArrayToHex(colorStringToArray($color,array()),'');
- if ($color) print ' ';
+ $textcolor='000';
+ $tmpcolorweight=0;
+ foreach(colorStringToArray($color,array()) as $x) $tmpcolorweight+=$x;
+ if ($tmpcolorweight < 400) $textcolor='FFF';
+ if ($color) print ' ';
else print $textifnotdefined;
}
diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php
index 42551601524..ed4c6d874a3 100644
--- a/htdocs/core/lib/holiday.lib.php
+++ b/htdocs/core/lib/holiday.lib.php
@@ -39,10 +39,15 @@ function holiday_prepare_head($object)
$head[$h][2] = 'card';
$h++;
- $head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
- $head[$h][1] = $langs->trans('Document');
- $head[$h][2] = 'documents';
- $h++;
+ // Attachments
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ $upload_dir = $conf->holiday->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
+ $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
+ $head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
+ $head[$h][1] = $langs->trans('Documents');
+ if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.' ';
+ $head[$h][2] = 'documents';
+ $h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 513a16a71f6..a295d433b6f 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -84,9 +84,14 @@ function member_prepare_head(Adherent $object)
if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.' ';
$h++;
+ // Attachments
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+ $upload_dir = $conf->adherent->multidir_output[$object->entity].'/'.get_exdir($object->id,2,0,1,$object,'member').'/'.dol_sanitizeFileName($object->ref);
+ $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
- $head[$h][1] = $langs->trans("Documents");
- $head[$h][2] = 'document';
+ $head[$h][1] = $langs->trans('Documents');
+ if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.' ';
+ $head[$h][2] = 'documents';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/info.php?id='.$object->id;
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 5c3c6a00c08..576e575421e 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -312,7 +312,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5006__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/month_report.php?&action=request', 'MenuReportMonth', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 4, __ENTITY__);
-- HRM - Expense reports
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 89905a5e231..c3ab3f82750 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1264,7 +1264,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/holiday/list.php?select_statut=2&leftmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->holiday->read);
$newmenu->add("/holiday/define_holiday.php?&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->define_holiday);
$newmenu->add("/holiday/view_log.php?&action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday);
- $newmenu->add("/holiday/month_report.php?&action=request", $langs->trans("MenuReportMonth"), 1, $user->rights->holiday->define_holiday);
}
// Trips and expenses (old module)
diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php
index 20fc68444d6..0ccab13e2b5 100644
--- a/htdocs/core/modules/modOauth.class.php
+++ b/htdocs/core/modules/modOauth.class.php
@@ -93,12 +93,12 @@ class modOauth extends DolibarrModules
// $this->rights[$r][4] Niveau 1 pour nommer permission dans code
// $this->rights[$r][5] Niveau 2 pour nommer permission dans code
- $r++;
+ /*$r++;
$this->rights[$r][0] = 66000;
$this->rights[$r][1] = 'OauthAccess';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
- $this->rights[$r][4] = 'read';
+ $this->rights[$r][4] = 'read';*/
// Main menu entries
$this->menus = array(); // List of menus to add
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 1debab7b10b..5e79b71ee34 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -222,7 +222,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
-
+
resArray['options'])) {
-
+
diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php
index 8cff8a88d09..7da3fadcc6e 100644
--- a/htdocs/don/stats/index.php
+++ b/htdocs/don/stats/index.php
@@ -241,7 +241,7 @@ print '
';
print '
'.$langs->trans("ThirdParty").' ';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
- print $form->select_company($socid,'socid',$filter,1);
+ print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
print ' ';
// User
print '
'.$langs->trans("CreatedBy").' ';
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index c397605645d..19b11a0ddf6 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -51,9 +51,9 @@ $var=false;
print ' \n";
/*
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 13760ebf776..00796add031 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -38,6 +38,7 @@ $result = restrictedArea($user, 'expedition',$expeditionid,'');
$search_ref_exp = GETPOST("search_ref_exp");
$search_ref_liv = GETPOST('search_ref_liv');
$search_company = GETPOST("search_company");
+$sall = GETPOST('sall');
$optioncss = GETPOST('optioncss','alpha');
$sortfield = GETPOST('sortfield','alpha');
@@ -63,6 +64,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$viewstatut='';
}
+// List of fields to search into when doing a "search in all"
+$fieldstosearchall = array(
+ 'e.ref'=>"Ref",
+ 's.nom'=>"ThirdParty"
+);
+
+
/*
* View
*/
@@ -100,6 +108,7 @@ if ($viewstatut <> '') {
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_company) $sql .= natural_search('s.nom', $search_company);
+if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1,$offset);
@@ -123,12 +132,21 @@ if ($resql)
$i = 0;
print '