';
$more .= $this->selectDate($input['value'], $input['name'], 0, 0, 0, '', 1, 0);
@@ -4414,17 +4412,17 @@ class Form
$formquestion[] = array('name'=>$input['name'].'year');
$formquestion[] = array('name'=>$input['name'].'hour');
$formquestion[] = array('name'=>$input['name'].'min');
- } elseif ($input['type'] == 'other')
- {
+ } elseif ($input['type'] == 'other') {
$more .= '
';
if (!empty($input['label'])) $more .= $input['label'].'
';
$more .= $input['value'];
$more .= '
'."\n";
- } elseif ($input['type'] == 'onecolumn')
- {
+ } elseif ($input['type'] == 'onecolumn') {
$moreonecolumn .= '
';
$moreonecolumn .= $input['value'];
$moreonecolumn .= '
'."\n";
+ } elseif ($input['type'] == 'hidden') {
+ // Do nothing more, already added by a previous loop
} else {
$more .= 'Error type '.$input['type'].' for the confirm box is not a supported type';
}
@@ -6303,7 +6301,7 @@ class Form
*/
public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0)
{
- global $conf, $langs, $user;
+ global $conf, $langs, $user, $hookmanager;
//print "$objecttmp->filter, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled";
@@ -6349,27 +6347,34 @@ class Form
}
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe')
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
- $sql .= " WHERE 1=1";
- if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
- if (isset($objecttmp->ismultientitymanaged) && !is_numeric($objecttmp->ismultientitymanaged)) {
- $sql .= ' AND parenttable.entity = t.'.$tmparray[0];
- }
- if ($objecttmp->ismultientitymanaged == 1 && !empty($user->socid)) {
- if ($objecttmp->element == 'societe') $sql .= " AND t.rowid = ".$user->socid;
- else $sql .= " AND t.fk_soc = ".$user->socid;
- }
- if ($searchkey != '') $sql .= natural_search(explode(',', $fieldstoshow), $searchkey);
- if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') {
- if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
- }
- if ($objecttmp->filter) { // Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
- /*if (! DolibarrApi::_checkFilters($objecttmp->filter))
- {
- throw new RestException(503, 'Error when validating parameter sqlfilters '.$objecttmp->filter);
- }*/
- $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
- $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'Form::forgeCriteriaCallback', $objecttmp->filter).")";
- }
+
+ // Add where from hooks
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('selectForFormsListWhere', $parameters); // Note that $action and $object may have been modified by hook
+ if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
+ else {
+ $sql .= " WHERE 1=1";
+ if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
+ if (isset($objecttmp->ismultientitymanaged) && !is_numeric($objecttmp->ismultientitymanaged)) {
+ $sql .= ' AND parenttable.entity = t.'.$tmparray[0];
+ }
+ if ($objecttmp->ismultientitymanaged == 1 && !empty($user->socid)) {
+ if ($objecttmp->element == 'societe') $sql .= " AND t.rowid = ".$user->socid;
+ else $sql .= " AND t.fk_soc = ".$user->socid;
+ }
+ if ($searchkey != '') $sql .= natural_search(explode(',', $fieldstoshow), $searchkey);
+ if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') {
+ if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
+ }
+ if ($objecttmp->filter) { // Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
+ /*if (! DolibarrApi::_checkFilters($objecttmp->filter))
+ {
+ throw new RestException(503, 'Error when validating parameter sqlfilters '.$objecttmp->filter);
+ }*/
+ $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
+ $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'Form::forgeCriteriaCallback', $objecttmp->filter).")";
+ }
+ }
$sql .= $this->db->order($fieldstoshow, "ASC");
//$sql.=$this->db->plimit($limit, 0);
//print $sql;
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index bfd5a6f64f7..f12b16211ae 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -355,7 +355,7 @@ class FormActions
if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected);
$out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0);
} else {
- $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1);
+ $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth300'.($morecss ? ' '.$morecss : ''), 1);
}
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index 3e8eb04c430..36af8bfa875 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -77,7 +77,7 @@ class FormAdmin
if ($showempty && !$multiselect)
{
$out .= '
trans("AutoDetectLang").' ';
}
@@ -115,7 +115,7 @@ class FormAdmin
}
$valuetoshow .= ' '.picto_from_langcode($key, 'class="saturatemedium"');
- if ($selected == $keytouse) {
+ if ((string) $selected == (string) $keytouse) {
$out .= '
'.$valuetoshow.' ';
} else {
$out .= '
'.$valuetoshow.' ';
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index c9c895148bf..c53bc1a0750 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -450,7 +450,7 @@ class FormFile
if ($modulepart == 'company')
{
- $showempty = 1;
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) $modellist = $genallowed;
else {
include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php';
@@ -514,6 +514,7 @@ class FormFile
}
} elseif ($modulepart == 'contract')
{
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) $modellist = $genallowed;
else {
include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
@@ -577,6 +578,7 @@ class FormFile
}
} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
{
+ $showempty = 1; // can have no template active
if (is_array($genallowed)) $modellist = $genallowed;
else {
include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php';
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index ac9285363d7..a706d9a880e 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -113,7 +113,12 @@ class Translate
} else $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
} else { // If it's for a codetouse that is a short code xx
// Array to convert short lang code into long code.
- $longforshort = array('ar'=>'ar_SA', 'el'=>'el_GR', 'ca'=>'ca_ES', 'en'=>'en_US', 'ja'=>'ja_JP', 'nb'=>'nb_NO', 'no'=>'nb_NO');
+ $longforshort = array(
+ 'am'=>'am_ET', 'ar'=>'ar_SA', 'bn'=>'bn_DB', 'el'=>'el_GR', 'ca'=>'ca_ES', 'cs'=>'cs_CZ', 'en'=>'en_US', 'fa'=>'fa_IR',
+ 'gl'=>'gl_ES', 'he'=>'he_IL', 'hi'=>'hi_IN', 'ja'=>'ja_JP',
+ 'ka'=>'ka_GE', 'km'=>'km_KH', 'kn'=>'kn_IN', 'ko'=>'ko_KR', 'lo'=>'lo_LA', 'nb'=>'nb_NO', 'no'=>'nb_NO', 'ne'=>'ne_NP',
+ 'sl'=>'sl_SI', 'sq'=>'sq_AL', 'sr'=>'sr_RS', 'sv'=>'sv_SE', 'uk'=>'uk_UA', 'vi'=>'vi_VN', 'zh'=>'zh_CN'
+ );
if (isset($longforshort[strtolower($langpart[0])])) $srclang = $longforshort[strtolower($langpart[0])];
elseif (!empty($langpart[0])) $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]);
else $srclang = 'en_US';
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index e35fefdad6f..9cf8439483a 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -62,13 +62,16 @@ class Utils
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
- if (empty($choices)) $choices = 'tempfilesold,logfiles';
+ if (empty($choices)) {
+ $choices = 'tempfilesold+logfiles';
+ }
dol_syslog("Utils::purgeFiles choice=".$choices, LOG_DEBUG);
$count = 0;
$countdeleted = 0;
$counterror = 0;
+ $filelog = '';
$choicesarray = preg_split('/[\+,]/', $choices);
foreach ($choicesarray as $choice) {
@@ -109,7 +112,6 @@ class Utils
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
}
- $filelog = '';
if (!empty($conf->syslog->enabled))
{
$filelog = $conf->global->SYSLOG_FILE;
@@ -143,8 +145,7 @@ class Utils
if ($filesarray[$key]['fullname'] != $filelog || $choice == 'logfile' || $choice == 'logfiles')
{
$result = dol_delete_file($filesarray[$key]['fullname'], 1, 1);
- if ($result)
- {
+ if ($result) {
$count++;
$countdeleted++;
} else {
@@ -166,7 +167,9 @@ class Utils
if ($count > 0) {
$this->output = $langs->trans("PurgeNDirectoriesDeleted", $countdeleted);
- if ($count > $countdeleted) $this->output .= '
'.$langs->trans("PurgeNDirectoriesFailed", ($count - $countdeleted));
+ if ($count > $countdeleted) {
+ $this->output .= '
'.$langs->trans("PurgeNDirectoriesFailed", ($count - $countdeleted));
+ }
} else {
$this->output = $langs->trans("PurgeNothingToDelete").(in_array('tempfilesold', $choicesarray) ? ' (older than 24h for temp files)' : '');
}
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index 739035f71a5..8e71f8255e8 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -137,9 +137,10 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
update: update, textarea: textarea,
pbq: item.pbq,
type: item.type, qty: item.qty, discount: item.discount,
- pricebasetype: item.pricebasetype, price_ht: item.price_ht,
+ pricebasetype: item.pricebasetype,
+ price_ht: item.price_ht,
price_ttc: item.price_ttc,
- up: item.up, description : item.description,
+ description : item.description,
ref_customer: item.ref_customer }
}));
}
@@ -152,32 +153,24 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
console.log("We will trigger change on input '.$htmlname.' because of the select definition of autocomplete code for input#search_'.$htmlname.'");
console.log("Selected id = "+ui.item.id+" - If this value is null, it means you select a record with key that is null so selection is not effective");
- console.log("Propagate before some properties");
+ console.log("Propagate before some properties retrieved by ajax into data-xxx properties");
- //console.log(ui.item);
- //For supplier price
- $("#'.$htmlname.'").attr("data-up", ui.item.up);
- $("#'.$htmlname.'").attr("data-discount", ui.item.discount);
+ // For supplier price and customer when price by quantity is off
+ $("#'.$htmlname.'").attr("data-up", ui.item.price_ht);
+ $("#'.$htmlname.'").attr("data-base", ui.item.pricebasetype);
$("#'.$htmlname.'").attr("data-qty", ui.item.qty);
+ $("#'.$htmlname.'").attr("data-discount", ui.item.discount);
$("#'.$htmlname.'").attr("data-description", ui.item.description);
$("#'.$htmlname.'").attr("data-ref-customer", ui.item.ref_customer);
-
- //For customer price
- ';
+ ';
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) {
$script .= '
- $("#' . $htmlname . '").attr("data-pbq", ui.item.pbq);
- $("#' . $htmlname . '").attr("data-pbqup", ui.item.price_ht);
- $("#' . $htmlname . '").attr("data-pbqbase", ui.item.pricebasetype);
- $("#' . $htmlname . '").attr("data-pbqqty", ui.item.qty);
- $("#' . $htmlname . '").attr("data-pbqpercent", ui.item.discount);
- ';
- } else {
- $script .= '
- $("#' . $htmlname . '").attr("data-up", ui.item.price_ht);
- $("#' . $htmlname . '").attr("data-base", ui.item.pricebasetype);
- $("#' . $htmlname . '").attr("data-qty", ui.item.qty);
- $("#' . $htmlname . '").attr("data-discount", ui.item.discount);
+ // For customer price when PRODUIT_CUSTOMER_PRICES_BY_QTY is on
+ $("#'.$htmlname.'").attr("data-pbq", ui.item.pbq);
+ $("#'.$htmlname.'").attr("data-pbqup", ui.item.price_ht);
+ $("#'.$htmlname.'").attr("data-pbqbase", ui.item.pricebasetype);
+ $("#'.$htmlname.'").attr("data-pbqqty", ui.item.qty);
+ $("#'.$htmlname.'").attr("data-pbqpercent", ui.item.discount);
';
}
$script .= '
@@ -217,6 +210,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
console.log("Make action update on each ui.item.update")
// loop on each "update" fields
$.each(ui.item.update, function(key, value) {
+ console.log("Set value "+value+" into #"+key);
$("#" + key).val(value).trigger("change");
});
}
diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php
index c72c46c8916..10f8d37a3c8 100644
--- a/htdocs/core/lib/contract.lib.php
+++ b/htdocs/core/lib/contract.lib.php
@@ -70,7 +70,7 @@ function contract_prepare_head(Contrat $object)
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
- $upload_dir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
+ $upload_dir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks = Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 1bdaeef13ef..14701d57256 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1192,6 +1192,16 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0,
{
if ($nophperrors) $ok = @unlink($filename);
else $ok = unlink($filename);
+
+ // If it fails and it is because of the missing write permission on parent dir
+ if (!$ok && file_exists(dirname($filename)) && !(fileperms(dirname($filename)) & 0200)) {
+ dol_syslog("Error in deletion, but parent directory exists with no permission to write, we try to change permission on parent directory and retry...", LOG_DEBUG);
+ @chmod(dirname($filename), fileperms(dirname($filename)) | 0200);
+ // Now we retry deletion
+ if ($nophperrors) $ok = @unlink($filename);
+ else $ok = unlink($filename);
+ }
+
if ($ok)
{
dol_syslog("Removed file ".$filename, LOG_DEBUG);
@@ -2316,10 +2326,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
if ($fuser->rights->ficheinter->{$lire}) $accessallowed = 1;
$original_file = $conf->ficheinter->dir_output.'/'.$original_file;
} // Wrapping pour les apercu conat
- elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->dir_output))
+ elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->multidir_output[$entity]))
{
if ($fuser->rights->contrat->{$lire}) $accessallowed = 1;
- $original_file = $conf->contrat->dir_output.'/'.$original_file;
+ $original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
} // Wrapping pour les apercu supplier proposal
elseif (($modulepart == 'apercusupplier_proposal' || $modulepart == 'apercusupplier_proposal') && !empty($conf->supplier_proposal->dir_output))
{
@@ -2709,13 +2719,13 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
}
if (!empty($conf->stock->enabled)) $original_file = $conf->stock->multidir_output[$entity].'/movement/'.$original_file;
} // Wrapping pour les contrats
- elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output))
+ elseif ($modulepart == 'contract' && !empty($conf->contrat->multidir_output[$entity]))
{
if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file))
{
$accessallowed = 1;
}
- $original_file = $conf->contrat->dir_output.'/'.$original_file;
+ $original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."contrat WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('contract').")";
} // Wrapping pour les dons
elseif ($modulepart == 'donation' && !empty($conf->don->dir_output))
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d328d4ae693..b22caec4633 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3232,7 +3232,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
- * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"')
+ * @param string $moreatt Add more attribute on img tag (For example 'class="pictofixedwidth"')
* @param boolean|int $pictoisfullpath If true or 1, image path is a full path
* @param int $srconly Return only content of the src attribute of img.
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
@@ -3265,7 +3265,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
if (empty($srconly) && in_array($pictowithouttext, array(
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
- 'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
+ 'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'angle-double-down', 'angle-double-up', 'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
'cash-register', 'category', 'check', 'clock', 'close_title', 'cog', 'company', 'contact', 'contract', 'cron', 'cubes',
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
@@ -3273,11 +3273,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot',
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
- 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
+ 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert',
+ 'object_folder', 'object_folder-open','object_generic',
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
- 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
+ 'object_margin', 'object_members', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
'object_lot', 'object_mrp', 'object_other',
'object_payment', 'object_pdf', 'object_product', 'object_propal',
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
@@ -3291,7 +3292,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
- 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'salary', 'supplier_invoice', 'ticket',
+ 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'salary', 'shipment', 'supplier_invoice', 'technic', 'ticket',
'error', 'warning',
'recruitmentcandidature', 'recruitmentjobposition', 'resource',
'shapes', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'user-cog',
@@ -3318,11 +3319,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
- 'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
+ 'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'email'=>'at',
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', 'loan'=>'money-bill-alt',
- 'member'=>'users', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
+ 'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
'sign-out'=>'sign-out-alt',
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
@@ -3370,11 +3371,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-'.$pictowithouttext;
}
- if (in_array($pictowithouttext, array('member', 'contract'))) {
- $fasize = '0.92em';
+ if (in_array($pictowithouttext, array('holiday', 'dollyrevert', 'member', 'members', 'contract', 'group', 'resource', 'shipment'))) {
+ $morecss = 'em092';
}
- if (in_array($pictowithouttext, array('intervention', 'payment', 'loan'))) {
- $fasize = '0.80em';
+ if (in_array($pictowithouttext, array('holiday'))) {
+ $morecss = 'em088';
+ }
+ if (in_array($pictowithouttext, array('intervention', 'payment', 'loan', 'stock', 'technic'))) {
+ $morecss = 'em080';
}
// Define $marginleftonlyshort
@@ -3423,7 +3427,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
'other'=>'#ddd',
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
- 'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',
+ 'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'uparrow'=>'#555', 'user-cog'=>'#999', 'globe-americas'=>'#aaa',
'website'=>'#304'
);
if (isset($arrayconvpictotocolor[$pictowithouttext])) {
@@ -7873,7 +7877,10 @@ function printCommonFooter($zone = 'private')
// Add property 'required' on input
print 'jQuery("input[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
print 'jQuery("textarea[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
- print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n"; // required on a select works only if key is "", this does not happen in Dolibarr
+ print '// required on a select works only if key is "", so we add the required attributes but also we reset the key -1 or 0 to an empty string'."\n";
+ print 'jQuery("select[name=\''.$paramkey.'\']").prop(\'required\',true);'."\n";
+ print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'-1\']").prop(\'value\', \'\');'."\n";
+ print 'jQuery("select[name=\''.$paramkey.'\'] option[value=\'0\']").prop(\'value\', \'\');'."\n";
}
}
}
@@ -8202,7 +8209,7 @@ function showDirectDownloadLink($object)
if ($url)
{
- $out .= img_picto('', 'globe').' '.$langs->trans("DirectDownloadLink").'
';
+ $out .= img_picto($langs->trans("PublicDownloadLinkdesc"), 'globe').' '.$langs->trans("DirectDownloadLink").'
';
$out .= '
';
$out .= ajax_autoselect("directdownloadlink", 0);
}
diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php
index 453bc34be8a..eda1a901986 100644
--- a/htdocs/core/lib/invoice.lib.php
+++ b/htdocs/core/lib/invoice.lib.php
@@ -189,7 +189,7 @@ function invoice_rec_prepare_head($object)
$head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/card-rec.php?id='.$object->id;
- $head[$h][1] = $langs->trans("CardBill");
+ $head[$h][1] = $langs->trans("RepeatableInvoice");
$head[$h][2] = 'card';
$h++;
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 2f1e3d5596b..4602e877bd1 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -590,9 +590,9 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
$sql .= " WHERE dbt.rowid IN (".$objectid.")";
$sql .= " AND dbt.".$dbt_keyfield." = ".$user->socid;
- } elseif (!empty($conf->societe->enabled)) {
+ } elseif (!empty($conf->societe->enabled) && !$user->rights->societe->client->voir) {
// If internal user: Check permission for internal users that are restricted on their objects
- if ($feature != 'ticket' && !$user->rights->societe->client->voir) {
+ if ($feature != 'ticket') {
if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined');
$sql = "SELECT COUNT(sc.fk_soc) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
@@ -601,9 +601,8 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
$sql .= " AND sc.fk_soc = dbt.".$dbt_keyfield;
$sql .= " AND sc.fk_user = ".$user->id;
- }
- // On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties.
- if ($feature == 'ticket' && !$user->rights->societe->client->voir) {
+ } else {
+ // On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties.
$sql = "SELECT COUNT(dbt.".$dbt_select.") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = dbt.".$dbt_keyfield." AND sc.fk_user = ".$user->id;
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index eb1b965f555..4135c26c7c0 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -696,6 +696,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$substitarray = getCommonSubstitutionArray($langs, 0, null, null);
+ $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
+
/**
* We update newmenu with entries found into database
* --------------------------------------------------
@@ -1534,7 +1536,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if ($mainmenu == 'products') {
// Products
if (!empty($conf->product->enabled)) {
- $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product');
+ $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"'));
$newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
$newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
if (!empty($conf->stock->enabled)) {
@@ -1562,7 +1564,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Services
if (!empty($conf->service->enabled)) {
- $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
+ $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"'));
$newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
$newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) {
@@ -1579,7 +1581,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Warehouse
if (!empty($conf->stock->enabled)) {
$langs->load("stocks");
- $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
+ $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"'));
$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
$newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
@@ -1601,7 +1603,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (!empty($conf->stock->enabled)) {
$langs->load("stocks");
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
- $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
+ $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire);
@@ -1619,7 +1621,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Shipments
if (!empty($conf->expedition->enabled)) {
$langs->load("sendings");
- $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings');
+ $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"'));
$newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer);
$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
@@ -1633,7 +1635,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Receptions
if (!empty($conf->reception->enabled)) {
$langs->load("receptions");
- $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions');
+ $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"'));
$newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer);
$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
@@ -1699,7 +1701,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
}
// Project assigned to user
- $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
+ $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="pictofixedwidth"'));
$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->rights->projet->creer);
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0) {
@@ -1722,7 +1724,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (empty($conf->global->PROJECT_HIDE_TASKS)) {
// Project affected to user
- $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks');
+ $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0, '', '', '', img_picto('', 'task', 'class="pictofixedwidth"'));
$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire);
$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire);
@@ -1740,7 +1742,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (!empty($conf->hrm->enabled)) {
$langs->load("hrm");
- $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->hrm->employee->read, '', $mainmenu, 'hrm');
+ $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->hrm->employee->read, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"'));
$newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->hrm->employee->write);
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->hrm->employee->read);
}
@@ -1750,7 +1752,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Load translation files required by the page
$langs->loadLangs(array("holiday", "trips"));
- $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
+ $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'holiday', 'class="pictofixedwidth"'));
$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write);
$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read);
if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
@@ -1820,14 +1822,14 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (!empty($conf->export->enabled)) {
$langs->load("exports");
- $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export');
+ $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->rights->export->creer);
//$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
}
if (!empty($conf->import->enabled)) {
$langs->load("exports");
- $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import');
+ $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->rights->import->run);
}
}
@@ -1861,7 +1863,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat');
}
- $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire);
+ $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->rights->adherent->cotisation->creer);
$newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->cotisation->lire);
$newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire);
@@ -1870,7 +1872,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
//if (! empty($conf->export->enabled) && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export);
// Type
- $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup');
+ $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup', 0, '', '', '', img_picto('', 'members', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->rights->adherent->configurer);
$newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->rights->adherent->configurer);
}
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 485b079d1cd..f3078516080 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -357,8 +357,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
*
* @param array $array_sql SQL requests to be executed when enabling module
* @param string $options String with options when disabling module:
- * - 'noboxes' = Do not insert boxes
- * - 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
+ * - 'noboxes' = Do all actions but do not insert boxes
+ * - 'newboxdefonly' = Do all actions but for boxes, insert def of boxes only and not boxes activation
* @return int 1 if OK, 0 if KO
*/
protected function _init($array_sql, $options = '')
@@ -389,7 +389,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$err += $this->insert_const(); // Test on newboxdefonly to avoid to erase value during upgrade
}
- // Insert boxes def into llx_boxes_def and boxes setup (into llx_boxes)
+ // Insert boxes def (into llx_boxes_def) and boxes setup (into llx_boxes)
if (!$err && !preg_match('/noboxes/', $options)) {
$err += $this->insert_boxes($options);
}
@@ -1815,7 +1815,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
// phpcs:enable
global $user;
- if (!is_array($this->menu) || empty($this->menu)) { return 0;
+ if (!is_array($this->menu) || empty($this->menu)) {
+ return 0;
}
include_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
@@ -2172,9 +2173,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
* The init function adds tabs, constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
* It also creates data directories
*
- * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
- * 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes,
- * insert def of boxes only and not boxes activation
+ * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes', 'menuonly')
+ * 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
* @return int 1 if OK, 0 if KO
*/
public function init($options = '')
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index f02f04728cd..8d17f9759fb 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -712,7 +712,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 3daa5288d7e..c7d83ebbaf7 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -930,7 +930,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
index edad675857f..bc6274482c4 100644
--- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
+++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
@@ -219,7 +219,7 @@ class doc_generic_contract_odt extends ModelePDFContract
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
- if ($conf->contrat->dir_output)
+ if ($conf->contrat->multidir_output[$object->entity])
{
// If $object is id instead of object
if (!is_object($object))
@@ -236,7 +236,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$object->fetch_thirdparty();
- $dir = $conf->contrat->dir_output;
+ $dir = $conf->contrat->multidir_output[$object->entity];
$objectref = dol_sanitizeFileName($object->ref);
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
$file = $dir."/".$objectref.".odt";
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index 619dcdf84d3..877bf19f3a9 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -201,7 +201,7 @@ class pdf_strato extends ModelePDFContract
$file = $dir."/SPECIMEN.pdf";
} else {
$objectref = dol_sanitizeFileName($object->ref);
- $dir = $conf->contrat->dir_output."/".$objectref;
+ $dir = $conf->contrat->multidir_output[$object->entity]."/".$objectref;
$file = $dir."/".$objectref.".pdf";
}
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index ce44aac0319..9e336863467 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1004,7 +1004,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 0edcdec536b..aafbb192bce 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -1108,7 +1108,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php
index 847200adc4f..b97dce7157b 100644
--- a/htdocs/core/modules/modECM.class.php
+++ b/htdocs/core/modules/modECM.class.php
@@ -58,7 +58,7 @@ class modECM extends DolibarrModules
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Name of png file (without png) used for this module
- $this->picto = 'folder';
+ $this->picto = 'folder-open';
// Data directories to create when module is enabled
$this->dirs = array("/ecm/temp");
diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php
index 7a72d3967e0..5887fac8577 100644
--- a/htdocs/core/modules/modResource.class.php
+++ b/htdocs/core/modules/modResource.class.php
@@ -188,7 +188,7 @@ class modResource extends DolibarrModules
'fk_menu'=>'fk_mainmenu=tools',
'type'=>'left',
'titre'=> 'MenuResourceIndex',
- 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
+ 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em92"'),
'mainmenu'=>'tools',
'leftmenu'=> 'resource',
'url'=> '/resource/list.php',
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index 2d7a6c7c4e6..2c3679c0374 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -208,7 +208,7 @@ class modTicket extends DolibarrModules
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
'type' => 'left',
'titre' => 'Ticket',
- 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
+ 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
'mainmenu' => 'ticket',
'leftmenu' => 'ticket',
'url' => '/ticket/index.php',
diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php
index ec1c458ce00..f7655db824a 100644
--- a/htdocs/core/modules/modWorkflow.class.php
+++ b/htdocs/core/modules/modWorkflow.class.php
@@ -51,7 +51,7 @@ class modWorkflow extends DolibarrModules
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i', '', get_class($this));
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
- $this->description = "Workflow management";
+ $this->description = "Inter-modules workflow management";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index be3f53847bf..be0d044ac25 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -908,7 +908,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index bc71116081e..4e1b448d9db 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1048,7 +1048,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 275b4672109..74abd0fc715 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -865,7 +865,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 2094eab8c3a..99e76b20337 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -747,7 +747,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_id);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 3d3990c06b4..36f589531e6 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -807,7 +807,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
+ $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php
index f1b5a109230..67c524d67f6 100644
--- a/htdocs/core/photos_resize.php
+++ b/htdocs/core/photos_resize.php
@@ -451,8 +451,10 @@ if ($action == 'confirm_crop')
*/
$title= $langs->trans("ImageEditor");
+$morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js');
+$morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css');
-llxHeader($head, $title, '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
+llxHeader($head, $title, '', '', 0, 0, $morejs, $morecss);
print load_fiche_titre($title);
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
index 9e893bf93e3..5239a93fdf7 100644
--- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
@@ -169,6 +169,7 @@ $totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname];
$help = $extrafields->attributes[$elementtype]['help'][$attrname];
$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname];
$printable = $extrafields->attributes[$elementtype]['printable'][$attrname];
+$enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname];
if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param))
{
@@ -302,6 +303,14 @@ if (in_array($type, array_keys($typewecanchangeinto)))
trans("AllEntities"); ?> >
+
+
+
+
trans("EnabledCondition"); ?>
+
+
+
+
diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php
index fb542f9037e..c62a95ec12b 100644
--- a/htdocs/core/tpl/admin_extrafields_view.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php
@@ -76,6 +76,11 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel
{
foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value)
{
+ /*if (! dol_eval($extrafields->attributes[$elementtype]['enabled'][$key], 1)) {
+ // TODO Uncomment this to exclude extrafields of modules not enabled. Add a link to "Show extrafields disabled"
+ // continue;
+ }*/
+
// Load language if required
if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) {
$langs->load($extrafields->attributes[$elementtype]['langfile'][$key]);
diff --git a/htdocs/core/tpl/extrafields_list_array_fields.tpl.php b/htdocs/core/tpl/extrafields_list_array_fields.tpl.php
index d2d77cf3b5c..bbc5ba3370b 100644
--- a/htdocs/core/tpl/extrafields_list_array_fields.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_array_fields.tpl.php
@@ -1,6 +1,6 @@
'."\n";
+// This tpl file is included into the init part of pages, so before action.
+// So no output must be done.
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf))
diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php
index 85afea4ab16..c2c89e28ce0 100644
--- a/htdocs/core/tpl/object_discounts.tpl.php
+++ b/htdocs/core/tpl/object_discounts.tpl.php
@@ -88,7 +88,7 @@ if ($absolute_creditnote > 0) {
}
if ($absolute_discount <= 0 || $isNewObject) {
- $text .= '('.$addabsolutediscount.')';
+ $text .= ' ('.$addabsolutediscount.')';
}
if ($isNewObject) {
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index cc74b02a29b..b4950f00e39 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -32,6 +32,7 @@
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
*/
+
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error: this template page cannot be called directly as an URL";
@@ -174,7 +175,7 @@ if ($nolinesbefore) {
echo ((GETPOST('prod_entry_mode', 'alpha') == 'free' || !empty($conf->global->MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT)) ? ' checked' : '');
echo '> ';
// Show type selector
- echo $langs->trans("FreeLineOfType");
+ echo '';
echo '';
echo ' ';
} else {
@@ -193,20 +194,25 @@ if ($nolinesbefore) {
// Predefined product/service
if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
{
- if ($forceall >= 0 && $freelines) echo '
';
- echo '
';
+ if ($forceall >= 0 && $freelines) echo '';
+ else echo '';
echo '';
echo ' ';
- if (empty($senderissupplier))
- {
- if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');
- elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) echo $langs->trans('PredefinedServicesToSell');
- else echo $langs->trans('PredefinedProductsAndServicesToSell');
+ $labelforradio = '';
+ if (empty($conf->dol_optimize_smallscreen)) {
+ if (empty($senderissupplier)) {
+ if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToSell');
+ elseif ((empty($conf->product->enabled) && !empty($conf->service->enabled)) || ($object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS))) $labelforradio = $langs->trans('PredefinedServicesToSell');
+ else $labelforradio = $langs->trans('PredefinedProductsAndServicesToSell');
+ } else {
+ if (!empty($conf->product->enabled) && empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedProductsToPurchase');
+ elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) $labelforradio = $langs->trans('PredefinedServicesToPurchase');
+ else $labelforradio = $langs->trans('PredefinedProductsAndServicesToPurchase');
+ }
} else {
- if (!empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToPurchase');
- elseif (empty($conf->product->enabled) && !empty($conf->service->enabled)) echo $langs->trans('PredefinedServicesToPurchase');
- else echo $langs->trans('PredefinedProductsAndServicesToPurchase');
+ $labelforradio = $langs->trans('PredefinedItem');
}
+ print '';
echo ' ';
echo ' ';
$filtertype = '';
@@ -239,22 +245,22 @@ if ($nolinesbefore) {
array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
- 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
- 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
+ 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
+ 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
+ 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
);
$alsoproductwithnosupplierprice = 0;
} else {
$ajaxoptions = array(
- 'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key
+ 'update' => array('remise_percent' => 'discount', 'price_ht' => 'price_ht') // html id tags that will be edited with each ajax json response key
);
$alsoproductwithnosupplierprice = 1;
}
- $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth500');
+ $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'minwidth300imp maxwidth500');
if (!empty($conf->global->MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_SUPPLIER_PRODUCTS))
{
?>
@@ -331,7 +337,7 @@ if ($nolinesbefore) {
{
$coldisplay++;
?>
- ">
+
">
';
$coldisplay++;
@@ -535,47 +541,47 @@ if (!empty($usemargins) && $user->rights->margins->creer)
/* TODO This does not work for number with thousand separator that is , */
function checkFreeLine(e, npRate)
{
- var buying_price = $("input[name='buying_price']:first");
- var remise = $("input[name='remise_percent']:first");
+ var buying_price = $("input[name='buying_price']:first");
+ var remise = $("input[name='remise_percent']:first");
+
+ var rate = $("input[name='"+npRate+"']:first");
+ if (rate.val() == '')
+ return true;
+
+ if (! $.isNumeric(rate.val().replace(',','.')))
+ {
+ alert('trans("rateMustBeNumeric")); ?>');
+ e.stopPropagation();
+ setTimeout(function () { rate.focus() }, 50);
+ return false;
+ }
+ if (npRate == "np_markRate" && rate.val() >= 100)
+ {
+ alert('trans("markRateShouldBeLesserThan100")); ?>');
+ e.stopPropagation();
+ setTimeout(function () { rate.focus() }, 50);
+ return false;
+ }
+
+ var price = 0;
+ remisejs=price2numjs(remise.val());
+
+ if (remisejs != 100) // If a discount not 100 or no discount
+ {
+ if (remisejs == '') remisejs=0;
+
+ bpjs=price2numjs(buying_price.val());
+ ratejs=price2numjs(rate.val());
+
+ if (npRate == "np_marginRate")
+ price = ((bpjs * (1 + ratejs / 100)) / (1 - remisejs / 100));
+ else if (npRate == "np_markRate")
+ price = ((bpjs / (1 - ratejs / 100)) / (1 - remisejs / 100));
+ }
+
+ $("input[name='price_ht']:first").val(price); // TODO Must use a function like php price to have here a formated value
- var rate = $("input[name='"+npRate+"']:first");
- if (rate.val() == '')
return true;
-
- if (! $.isNumeric(rate.val().replace(',','.')))
- {
- alert('trans("rateMustBeNumeric")); ?>');
- e.stopPropagation();
- setTimeout(function () { rate.focus() }, 50);
- return false;
- }
- if (npRate == "np_markRate" && rate.val() >= 100)
- {
- alert('trans("markRateShouldBeLesserThan100")); ?>');
- e.stopPropagation();
- setTimeout(function () { rate.focus() }, 50);
- return false;
- }
-
- var price = 0;
- remisejs=price2numjs(remise.val());
-
- if (remisejs != 100) // If a discount not 100 or no discount
- {
- if (remisejs == '') remisejs=0;
-
- bpjs=price2numjs(buying_price.val());
- ratejs=price2numjs(rate.val());
-
- if (npRate == "np_marginRate")
- price = ((bpjs * (1 + ratejs / 100)) / (1 - remisejs / 100));
- else if (npRate == "np_markRate")
- price = ((bpjs / (1 - ratejs / 100)) / (1 - remisejs / 100));
- }
-
- $("input[name='price_ht']:first").val(price); // TODO Must use a function like php price to have here a formated value
-
- return true;
}
rights->margins->creer)
$("#select_type").change(function()
{
setforfree();
- if (jQuery('#select_type').val() >= 0)
- {
- /* focus work on a standard textarea but not if field was replaced with CKEDITOR */
- jQuery('#dp_desc').focus();
- /* focus if CKEDITOR */
- if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined")
+ if (jQuery('#select_type').val() >= 0)
{
- var editor = CKEDITOR.instances['dp_desc'];
- if (editor) { editor.focus(); }
+ /* focus work on a standard textarea but not if field was replaced with CKEDITOR */
+ jQuery('#dp_desc').focus();
+ /* focus if CKEDITOR */
+ if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined")
+ {
+ var editor = CKEDITOR.instances['dp_desc'];
+ if (editor) { editor.focus(); }
+ }
+ }
+ console.log("Hide/show date according to product type");
+ if (jQuery('#select_type').val() == '0')
+ {
+ jQuery('#trlinefordates').hide();
+ jQuery('.divlinefordates').hide();
+ }
+ else
+ {
+ jQuery('#trlinefordates').show();
+ jQuery('.divlinefordates').show();
}
- }
- console.log("Hide/show date according to product type");
- if (jQuery('#select_type').val() == '0')
- {
- jQuery('#trlinefordates').hide();
- jQuery('.divlinefordates').hide();
- }
- else
- {
- jQuery('#trlinefordates').show();
- jQuery('.divlinefordates').show();
- }
});
$("#prod_entry_mode_predef").on( "click", function() {
@@ -652,7 +658,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
/* When changing predefined product, we reload list of supplier prices required for margin combo */
$("#idprod, #idprodfournprice").change(function()
{
- console.log("Call method change() after change on #idprod or #idprodfournprice. this.val = "+$(this).val());
+ console.log("Call method change() after change on #idprod or #idprodfournprice (senderissupplier=). this.val = "+$(this).val());
setforpredef(); // TODO Keep vat combo visible and set it to first entry into list that match result of get_default_tva
diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php
index 8a7c38f8ada..697c46c6fcd 100644
--- a/htdocs/core/tpl/objectline_title.tpl.php
+++ b/htdocs/core/tpl/objectline_title.tpl.php
@@ -53,9 +53,10 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '
'.$langs->trans('Description').' ';
+// Supplier ref
if ($this->element == 'supplier_proposal' || $this->element == 'order_supplier' || $this->element == 'invoice_supplier')
{
- print '
'.$langs->trans("SupplierRef").' ';
+ print '
'.$langs->trans("SupplierRef").' ';
}
// VAT
@@ -90,6 +91,7 @@ if ($inputalsopricewithtax) print '
'.$lang
// Qty
print ' '.$langs->trans('Qty').' ';
+// Unit
if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '
'.$langs->trans('Unit').' ';
@@ -104,6 +106,7 @@ if ($this->situation_cycle_ref) {
print '
'.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).' ';
}
+// Purchase price
if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid))
{
if (!empty($user->rights->margins->creer))
diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
index 3d4c4ed63b7..4034198fff0 100644
--- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
+++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php
@@ -654,7 +654,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
$object->actionmsg = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref);
- $object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref;
+ //$object->actionmsg .= "\n".$langs->transnoentities("Task").': ???';
+ if (!empty($object->usage_opportunity) && is_object($object->oldcopy) && $object->opp_status != $object->oldcopy->opp_status) {
+ $object->actionmsg .= "\n".$langs->transnoentitiesnoconv("OpportunityStatus").': '.$object->oldcopy->opp_status.' -> '.$object->opp_status;
+ }
$object->sendtoid = 0;
}
diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
index ee576992865..a903ab53b23 100644
--- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
+++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
@@ -47,7 +47,7 @@ class InterfaceContactRoles extends DolibarrTriggers
$this->description = "Triggers of this module auto link contact to company.";
// 'development', 'experimental', 'dolibarr' or version
$this->version = self::VERSION_DOLIBARR;
- $this->picto = 'action';
+ $this->picto = 'company';
}
/**
diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php
index 4c4a3fc3412..802e3681bd7 100644
--- a/htdocs/ecm/class/ecmdirectory.class.php
+++ b/htdocs/ecm/class/ecmdirectory.class.php
@@ -40,7 +40,7 @@ class EcmDirectory extends CommonObject
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
- public $picto = 'dir';
+ public $picto = 'folder-open';
/**
* @var int ID
diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php
index 6392d6f162e..bd550dbf751 100644
--- a/htdocs/ecm/class/ecmfiles.class.php
+++ b/htdocs/ecm/class/ecmfiles.class.php
@@ -47,7 +47,7 @@ class EcmFiles extends CommonObject
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
- public $picto = 'generic';
+ public $picto = 'folder-open';
/**
* @var string Ref hash of file path
diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php
index b1c7eb0ec28..93885c2843a 100644
--- a/htdocs/ecm/file_card.php
+++ b/htdocs/ecm/file_card.php
@@ -290,7 +290,7 @@ print '
';
print '
';
print '
';
-print ''.$langs->trans("ECMCreationDate").' ';
+print ' '.$langs->trans("ECMCreationDate").' ';
print dol_print_date(dol_filemtime($fullpath), 'dayhour');
print ' ';
/*print ''.$langs->trans("ECMDirectoryForFiles").' ';
@@ -321,7 +321,9 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Link for internal download
-print ' '.$langs->trans("DirectDownloadInternalLink").' ';
+print ' ';
+print $form->textwithpicto($langs->trans("DirectDownloadInternalLink"), $langs->trans("PrivateDownloadLinkDesc"));
+print ' ';
$modulepart = 'ecm';
$forcedownload = 1;
$rellink = '/document.php?modulepart='.$modulepart;
@@ -347,9 +349,9 @@ print ' ';
// Link for direct external download
print '';
if ($action != 'edit') {
- print $langs->trans("DirectDownloadLink");
+ print $form->textwithpicto($langs->trans("DirectDownloadLink"), $langs->trans("PublicDownloadLinkDesc"));
} else {
- print $langs->trans("FileSharedViaALink");
+ print $form->textwithpicto($langs->trans("FileSharedViaALink"), $langs->trans("PublicDownloadLinkDesc"));
}
print ' ';
if (!empty($object->share)) {
diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php
index a5050889e09..8feff24e4c3 100644
--- a/htdocs/ecm/index.php
+++ b/htdocs/ecm/index.php
@@ -327,7 +327,7 @@ $moreheadjs .= ''."\n";
llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0);
$head = ecm_prepare_dasboard_head('');
-print dol_get_fiche_head($head, 'index', $langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"), -1, '');
+print dol_get_fiche_head($head, 'index', '', -1, '');
// Add filemanager component
diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php
index ae7aa840ab9..9d8e1527b9b 100644
--- a/htdocs/ecm/index_auto.php
+++ b/htdocs/ecm/index_auto.php
@@ -341,7 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED))
}
$head = ecm_prepare_dasboard_head('');
-print dol_get_fiche_head($head, 'index_auto', $langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"), -1, '');
+print dol_get_fiche_head($head, 'index_auto', '', -1, '');
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 6ff4c418988..f41f2902e71 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -225,10 +225,12 @@ if (empty($reshook))
if (!($object->fk_user_author > 0)) $object->fk_user_author = $user->id;
// Check that expense report is for a user inside the hierarchy or advanced permission for all is set
- if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) {
+ if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
+ || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
$error++;
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
- } else {
+ }
+ if (!$error) {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
if (!in_array($object->fk_user_author, $childids)) {
$error++;
diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php
index f245084f8db..bee9ac1c9fe 100644
--- a/htdocs/fichinter/card-rec.php
+++ b/htdocs/fichinter/card-rec.php
@@ -224,7 +224,9 @@ if ($action == 'add') {
* View
*/
-llxHeader('', $langs->trans("RepeatableIntervention"), 'ch-fichinter.html#s-fac-fichinter-rec');
+$help_url = '';
+
+llxHeader('', $langs->trans("RepeatableIntervention"), $help_url);
$form = new Form($db);
$companystatic = new Societe($db);
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 58b39cba8d6..1e6e0234cdc 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -139,6 +139,8 @@ class CommandeFournisseur extends CommonOrder
public $cond_reglement_id;
public $cond_reglement_code;
+ public $cond_reglement_label; // Label
+ public $cond_reglement_doc; // Label on documents
/**
* @var int ID
@@ -312,7 +314,7 @@ class CommandeFournisseur extends CommonOrder
$sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,";
$sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,";
$sql .= " cm.libelle as methode_commande,";
- $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,";
+ $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,";
$sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle";
$sql .= ', c.fk_incoterms, c.location_incoterms';
$sql .= ', i.libelle as label_incoterms';
@@ -373,8 +375,9 @@ class CommandeFournisseur extends CommonOrder
$this->fk_project = $obj->fk_project;
$this->cond_reglement_id = $obj->fk_cond_reglement;
$this->cond_reglement_code = $obj->cond_reglement_code;
- $this->cond_reglement = $obj->cond_reglement_libelle;
- $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
+ $this->cond_reglement = $obj->cond_reglement_label; // deprecated
+ $this->cond_reglement_label = $obj->cond_reglement_label;
+ $this->cond_reglement_doc = $obj->cond_reglement_doc;
$this->fk_account = $obj->fk_account;
$this->mode_reglement_id = $obj->fk_mode_reglement;
$this->mode_reglement_code = $obj->mode_reglement_code;
@@ -1562,8 +1565,6 @@ class CommandeFournisseur extends CommonOrder
{
global $langs, $mysoc, $conf;
- $error = 0;
-
dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id");
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 67070b99c57..0157dbd0eec 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -176,8 +176,11 @@ class FactureFournisseur extends CommonInvoice
public $note_private;
public $note_public;
public $propalid;
+
public $cond_reglement_id;
public $cond_reglement_code;
+ public $cond_reglement_label;
+ public $cond_reglement_doc;
/**
* @var int ID
@@ -641,8 +644,8 @@ class FactureFournisseur extends CommonInvoice
$sql .= " t.model_pdf,";
$sql .= " t.import_key,";
$sql .= " t.extraparams,";
- $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,";
- $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,";
+ $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,";
+ $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_label,";
$sql .= ' s.nom as socnom, s.rowid as socid,';
$sql .= ' t.fk_incoterms, t.location_incoterms,';
$sql .= " i.libelle as label_incoterms,";
@@ -697,12 +700,13 @@ class FactureFournisseur extends CommonInvoice
$this->fk_project = $obj->fk_project;
$this->cond_reglement_id = $obj->fk_cond_reglement;
$this->cond_reglement_code = $obj->cond_reglement_code;
- $this->cond_reglement = $obj->cond_reglement_libelle;
- $this->cond_reglement_doc = $obj->cond_reglement_libelle;
+ $this->cond_reglement = $obj->cond_reglement_label; // deprecated
+ $this->cond_reglement_label = $obj->cond_reglement_label;
+ $this->cond_reglement_doc = $obj->cond_reglement_doc;
$this->fk_account = $obj->fk_account;
$this->mode_reglement_id = $obj->fk_mode_reglement;
$this->mode_reglement_code = $obj->mode_reglement_code;
- $this->mode_reglement = $obj->mode_reglement_libelle;
+ $this->mode_reglement = $obj->mode_reglement_label;
$this->date_echeance = $this->db->jdate($obj->date_lim_reglement);
$this->note = $obj->note_private; // deprecated
$this->note_private = $obj->note_private;
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 2ed7ccab8ef..0aea652de68 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -570,7 +570,9 @@ if (empty($reshook))
$fk_unit = GETPOST('units', 'alpha');
- $tva_tx = price2num($tva_tx); // When vat is text input field
+ if (!preg_match('/\((.*)\)/', $tva_tx)) {
+ $tva_tx = price2num($tva_tx); // When vat is text input field
+ }
// Local Taxes
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index acfa5a54e16..dbe0bd5d7af 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -525,7 +525,9 @@ $warehouse_static = new Entrepot($db);
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
-llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, array('/fourn/js/lib_dispatch.js.php'));
+$morejs = array('/fourn/js/lib_dispatch.js.php');
+
+llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, $morejs);
if ($id > 0 || !empty($ref)) {
$soc = new Societe($db);
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index a8f7fa2cc42..1e88aaf74c4 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2530,7 +2530,12 @@ if ($action == 'create')
$discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, 0, $object->id);
if ($result > 0) {
- print ' '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).' ';
+ print ' ';
+ $s = $langs->trans("CreditNoteConvertedIntoDiscount", '{s1}', '{s2}');
+ $s = str_replace('{s1}', $object->getLibType(1), $s);
+ $s = str_replace('{s2}', $discount->getNomUrl(1, 'discount'), $s);
+ print $s;
+ print ' ';
}
}
print ' ';
diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql
index 43d2652298f..ddda0f7ff32 100644
--- a/htdocs/install/mysql/data/llx_10_c_regions.sql
+++ b/htdocs/install/mysql/data/llx_10_c_regions.sql
@@ -346,41 +346,44 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('2
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('202', '20204', 'SI04', NULL, 'West Slovenia');
-- Regions China (rowid country=9)
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,901, '京',0,'北京市');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,902, '津',0,'天津市');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,903, '沪',0,'上海市');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,904, '渝',0,'重庆市');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,905, '冀',0,'河北省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,906, '晋',0,'山西省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,907, '辽',0,'辽宁省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,908, '吉',0,'吉林省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,909, '黑',0,'黑龙江省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,910, '苏',0,'江苏省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,911, '浙',0,'浙江省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,912, '皖',0,'安徽省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,913, '闽',0,'福建省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,914, '赣',0,'江西省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,915, '鲁',0,'山东省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,916, '豫',0,'河南省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,917, '鄂',0,'湖北省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,918, '湘',0,'湖南省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,919, '粤',0,'广东省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,920, '琼',0,'海南省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,921, '川',0,'四川省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,922, '贵',0,'贵州省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,923, '云',0,'云南省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,924, '陕',0,'陕西省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,925, '甘',0,'甘肃省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,926, '青',0,'青海省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,927, '台',0,'台湾省');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,928, '蒙',0,'内蒙古自治区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,929, '桂',0,'广西壮族自治区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,930, '藏',0,'西藏自治区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,931, '宁',0,'宁夏回族自治区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,932, '新',0,'新疆维吾尔自治区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,933, '港',0,'香港特别行政区');
-insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,934, '澳',0,'澳门特别行政区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 901, '京',0,'北京市');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 902, '津',0,'天津市');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 903, '沪',0,'上海市');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 904, '渝',0,'重庆市');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 905, '冀',0,'河北省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 906, '晋',0,'山西省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 907, '辽',0,'辽宁省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 908, '吉',0,'吉林省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 909, '黑',0,'黑龙江省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 910, '苏',0,'江苏省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 911, '浙',0,'浙江省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 912, '皖',0,'安徽省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 913, '闽',0,'福建省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 914, '赣',0,'江西省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 915, '鲁',0,'山东省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 916, '豫',0,'河南省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 917, '鄂',0,'湖北省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 918, '湘',0,'湖南省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 919, '粤',0,'广东省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 920, '琼',0,'海南省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 921, '川',0,'四川省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 922, '贵',0,'贵州省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 923, '云',0,'云南省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 924, '陕',0,'陕西省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 925, '甘',0,'甘肃省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 926, '青',0,'青海省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 927, '台',0,'台湾省');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 928, '蒙',0,'内蒙古自治区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 929, '桂',0,'广西壮族自治区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 930, '藏',0,'西藏自治区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 931, '宁',0,'宁夏回族自治区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 932, '新',0,'新疆维吾尔自治区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 933, '港',0,'香港特别行政区');
+insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 934, '澳',0,'澳门特别行政区');
-- Regions Angola (rowid country=35)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (35, 35001, 'AO', NULL, 'Angola');
+-- Regions Taiwan (rowid country=213)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (213, 21301, 'TW', NULL, 'Taiwan');
+
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index 00f30fab0be..50a1317430b 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -1626,3 +1626,37 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe');
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge');
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre');
+
+-- Provinces Taiwan (rowid country=886)
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KLU', 'KLU', NULL, '基隆市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TPE', 'TPE', NULL, '臺北市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TPH', 'TPH', NULL, '新北市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TYC', 'TYC', NULL, '桃園市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HSH', 'HSH', NULL, '新竹縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HSC', 'HSC', NULL, '新竹市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-MAL', 'MAL', NULL, '苗栗縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-MAC', 'MAC', NULL, '苗栗市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TXG', 'TXG', NULL, '臺中市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CWH', 'CWH', NULL, '彰化縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CWS', 'CWS', NULL, '彰化市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-NTC', 'NTC', NULL, '南投市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-NTO', 'NTO', NULL, '南投縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-YLH', 'YLH', NULL, '雲林縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CHY', 'CHY', NULL, '嘉義縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CYI', 'CYI', NULL, '嘉義市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TNN', 'TNN', NULL, '臺南市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KHH', 'KHH', NULL, '高雄市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-IUH', 'IUH', NULL, '屏東縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-PTS', 'PTS', NULL, '屏東市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-ILN', 'ILN', NULL, '宜蘭縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-ILC', 'ILC', NULL, '宜蘭市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HWA', 'HWA', NULL, '花蓮縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HWC', 'HWC', NULL, '花蓮市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TTC', 'TTC', NULL, '臺東市');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TTT', 'TTT', NULL, '臺東縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-PEH', 'PEH', NULL, '澎湖縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-GNI', 'GNI', NULL, '綠島');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KYD', 'KYD', NULL, '蘭嶼');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KMN', 'KMN', NULL, '金門縣');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-LNN', 'LNN', NULL, '連江縣');
+
diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql
index 9a0d8c223b6..cb22ee70ce3 100644
--- a/htdocs/install/mysql/data/llx_c_actioncomm.sql
+++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql
@@ -30,7 +30,7 @@
-- Types action comm
--
-delete from llx_c_actioncomm where id in (1,2,3,4,5,8,9,10,30,31,40,50);
+delete from llx_c_actioncomm where id in (1,2,3,4,5,6,8,9,10,11,30,31,40,50);
-- Code used from 3.3+ when type of event is used
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 1,'AC_TEL','system','Phone call',NULL, 1, 2);
insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3);
diff --git a/htdocs/install/mysql/data/llx_c_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql
index d05015721c8..478c263af4c 100644
--- a/htdocs/install/mysql/data/llx_c_currencies.sql
+++ b/htdocs/install/mysql/data/llx_c_currencies.sql
@@ -73,6 +73,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XCD'
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EGP', '[163]', 1, 'Egypt Pound');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'SVC', '[36]', 1, 'El Salvador Colon');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EEK', '[107,114]', 1, 'Estonia Kroon');
+INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ETB', NULL, 1, 'Ethiopian Birr');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EUR', '[8364]', 1, 'Euro Member Countries');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FKP', '[163]', 1, 'Falkland Islands (Malvinas) Pound');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FJD', '[36]', 1, 'Fiji Dollar');
diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql
index 7cd039a2c19..ed5449c0bd3 100644
--- a/htdocs/install/mysql/data/llx_const.sql
+++ b/htdocs/install/mysql/data/llx_const.sql
@@ -56,7 +56,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
--
-- IHM
--
-insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Maximum length of lists',0,0);
+insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','20','chaine','Maximum length of lists',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Maximum length of short lists',0,0);
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0,0);
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index 9658d6c3051..c297d14eb4a 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -580,3 +580,6 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
-- Removed no more used function
-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE;
+
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4);
+
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index ea8f4aa70f6..f2be5893c0a 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -35,6 +35,8 @@ ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposal
ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object);
+insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4);
+
-- For v14
ALTER TABLE llx_c_availability ADD COLUMN position integer NOT NULL DEFAULT 0;
diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
index ded61d49e8b..5749acd93d8 100644
--- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
+++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
@@ -37,7 +37,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
date_birth date,
remuneration_requested integer,
remuneration_proposed integer,
- email_msgid varchar(255),
+ email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index
fk_recruitment_origin INTEGER NULL
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php
index 14138dc5664..baac0eb2cbd 100644
--- a/htdocs/install/repair.php
+++ b/htdocs/install/repair.php
@@ -223,7 +223,7 @@ if ($ok && GETPOST('standard', 'alpha'))
{
$extrafields = new ExtraFields($db);
$listofmodulesextra = array('societe'=>'societe', 'adherent'=>'adherent', 'product'=>'product',
- 'socpeople'=>'socpeople', 'commande'=>'commande', 'facture'=>'facture',
+ 'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture',
'supplier_proposal'=>'supplier_proposal', 'commande_fournisseur'=>'commande_fournisseur', 'facture_fourn'=>'facture_fourn',
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task');
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 07c68a498b2..1dc7180bc4b 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -469,6 +469,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
'MAIN_MODULE_CRON'=>'newboxdefonly',
'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
+ 'MAIN_MODULE_BLOCKEDLOG'=>'noboxes',
'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
'MAIN_MODULE_DON'=>'newboxdefonly',
'MAIN_MODULE_ECM'=>'newboxdefonly',
@@ -482,7 +483,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
'MAIN_MODULE_PRINTING'=>'newboxdefonly',
'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
- 'MAIN_MODULE_RESOURCE'=>'newboxdefonly',
+ 'MAIN_MODULE_RESOURCE'=>'noboxes',
'MAIN_MODULE_SALARIES'=>'newboxdefonly',
'MAIN_MODULE_SYSLOG'=>'newboxdefonly',
'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
@@ -4289,7 +4290,7 @@ function migrate_delete_old_dir($db, $langs, $conf)
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
- * @param array $listofmodule List of modules
+ * @param array $listofmodule List of modules, like array('MODULE_KEY_NAME'=>', $reloadmode)
* @param int $force 1=Reload module even if not already loaded
* @return int <0 if KO, >0 if OK
*/
@@ -4328,6 +4329,15 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->remove('noboxes');
$mod->init($reloadmode);
}
+ } elseif ($moduletoreload == 'MAIN_MODULE_BLOCKEDLOG') {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate BlockedLog module");
+ $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modBlockedLog.class.php';
+ if ($res) {
+ $mod = new modBlockedLog($db);
+ // For this module we only reload menus.
+ $mod->delete_menus();
+ $mod->insert_menus($reloadmode);
+ }
} elseif ($moduletoreload == 'MAIN_MODULE_CRON') {
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Cron module");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php';
@@ -4472,7 +4482,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->remove('noboxes'); // We need to remove because menu entries has changed
$mod->init($reloadmode);
}
- } else {
+ } else { // Other generic cases/modules
$reg = array();
$tmp = preg_match('/MAIN_MODULE_([a-zA-Z0-9]+)/', $moduletoreload, $reg);
if (!empty($reg[1]))
@@ -4484,12 +4494,15 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
{
$moduletoreloadshort = $reg[1];
}
+
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ".$moduletoreloadshort." with mode ".$reloadmode);
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php';
if ($res) {
$classname = 'mod'.$moduletoreloadshort;
$mod = new $classname($db);
+
//$mod->remove('noboxes');
+ $mod->delete_menus(); // We must delete to be sure it is insert with new values
$mod->init($reloadmode);
} else {
dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php');
@@ -4498,7 +4511,6 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
if ($res) {
$classname = 'mod'.$moduletoreloadshort;
$mod = new $classname($db);
- //$mod->remove('noboxes');
$mod->init($reloadmode);
} else {
dolibarr_install_syslog('Failed to include '.strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php', LOG_ERR);
@@ -4530,7 +4542,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
/**
- * Reload menu if dynamic menus, if modified by version
+ * Reload SQL menu file (if dynamic menus, if modified by version)
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index dbdbd6873b6..b7948532773 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -232,6 +232,7 @@ BoxesAvailable=Widgets available
BoxesActivated=Widgets activated
ActivateOn=Activate on
ActiveOn=Activated on
+ActivatableOn=Activatable on
SourceFile=Source file
AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled
Required=Required
@@ -647,8 +648,8 @@ Module4000Name=HRM
Module4000Desc=Human resources management (management of department, employee contracts and feelings)
Module5000Name=Multi-company
Module5000Desc=Allows you to manage multiple companies
-Module6000Name=Workflow
-Module6000Desc=Workflow management (automatic creation of object and/or automatic status change)
+Module6000Name=Inter-modules Workflow
+Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change)
Module10000Name=Websites
Module10000Desc=Create websites (public) with a WYSIWYG editor. This is a webmaster or developer oriented CMS (it is better to know HTML and CSS language). Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the internet with your own domain name.
Module20000Name=Leave Request Management
@@ -1741,6 +1742,7 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se
AccountancyCode=Accounting Code
AccountancyCodeSell=Sale account. code
AccountancyCodeBuy=Purchase account. code
+CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax
##### Agenda #####
AgendaSetup=Events and agenda module setup
PasswordTogetVCalExport=Key to authorize export link
@@ -1987,7 +1989,7 @@ SocialNetworkSetup=Setup of module Social Networks
EnableFeatureFor=Enable features for %s
VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to Off in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales.
SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents
-FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
+FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
EmailCollector=Email collector
EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads).
NewEmailCollector=New Email Collector
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index 33e0c01aad6..d16188d40d4 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -4,7 +4,7 @@ Actions=Events
Agenda=Agenda
TMenuAgenda=Agenda
Agendas=Agendas
-LocalAgenda=Internal calendar
+LocalAgenda=Default calendar
ActionsOwnedBy=Event owned by
ActionsOwnedByShort=Owner
AffectedTo=Assigned to
@@ -20,7 +20,7 @@ MenuToDoActions=All incomplete events
MenuDoneActions=All terminated events
MenuToDoMyActions=My incomplete events
MenuDoneMyActions=My terminated events
-ListOfEvents=List of events (internal calendar)
+ListOfEvents=List of events (default calendar)
ActionsAskedBy=Events reported by
ActionsToDoBy=Events assigned to
ActionsDoneBy=Events done by
@@ -131,7 +131,7 @@ AgendaUrlOptions4=logint=%s to restrict output to actions assigned to use
AgendaUrlOptionsProject=project=__PROJECT_ID__ to restrict output to actions linked to project __PROJECT_ID__ .
AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto to exclude automatic events.
AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays.
-AgendaShowBirthdayEvents=Show birthdays of contacts
+AgendaShowBirthdayEvents=Birthdays of contacts
AgendaHideBirthdayEvents=Hide birthdays of contacts
Busy=Busy
ExportDataset_event1=List of agenda events
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 88ff8fecdb6..7263b04730a 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -56,7 +56,8 @@ Paymentnumpad=Type of Pad to enter payment
Numberspad=Numbers Pad
BillsCoinsPad=Coins and banknotes Pad
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
-TakeposNeedsCategories=TakePOS needs product categories to work
+TakeposNeedsCategories=TakePOS needs at least one product categorie to work
+TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work
OrderNotes=Order Notes
CashDeskBankAccountFor=Default account to use for payments in
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang
index 10c536e0d48..2181b48ecb4 100644
--- a/htdocs/langs/en_US/commercial.lang
+++ b/htdocs/langs/en_US/commercial.lang
@@ -64,10 +64,10 @@ ActionAC_SHIP=Send shipping by mail
ActionAC_SUP_ORD=Send purchase order by mail
ActionAC_SUP_INV=Send vendor invoice by mail
ActionAC_OTH=Other
-ActionAC_OTH_AUTO=Automatically inserted events
+ActionAC_OTH_AUTO=Other auto
ActionAC_MANUAL=Manually inserted events
ActionAC_AUTO=Automatically inserted events
-ActionAC_OTH_AUTOShort=Auto
+ActionAC_OTH_AUTOShort=Other
Stats=Sales statistics
StatusProsp=Prospect status
DraftPropals=Draft commercial proposals
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 99bed13179f..d4c9f95b0b9 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -203,6 +203,7 @@ ProfId2IT=-
ProfId3IT=-
ProfId4IT=-
ProfId5IT=EORI number
+ProfId6IT=-
ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg)
ProfId2LU=Id. prof. 2 (Business permit)
ProfId3LU=-
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index a5cd750e3d6..f7c55df211f 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -899,8 +899,10 @@ ViewAccountList=View ledger
ViewSubAccountList=View subaccount ledger
RemoveString=Remove string '%s'
SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at https://transifex.com/projects/p/dolibarr/ to add your improvements.
-DirectDownloadLink=Direct download link (public/external)
-DirectDownloadInternalLink=Direct download link (need to be logged and need permissions)
+DirectDownloadLink=Public download link
+PublicDownloadLinkDesc=Only the link is required to download the file
+DirectDownloadInternalLink=Private download link
+PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file
Download=Download
DownloadDocument=Download document
ActualizeCurrency=Update currency rate
@@ -1049,7 +1051,7 @@ KeyboardShortcut=Keyboard shortcut
AssignedTo=Assigned to
Deletedraft=Delete draft
ConfirmMassDraftDeletion=Draft mass delete confirmation
-FileSharedViaALink=File shared via a link
+FileSharedViaALink=File shared with a public link
SelectAThirdPartyFirst=Select a third party first...
YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
Inventory=Inventory
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 9ecc11ed93d..9ec22ad00cc 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product)
DiscountQtyMin=Discount for this qty.
NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product
NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product
+PredefinedItem=Predefined item
PredefinedProductsToSell=Predefined Product
PredefinedServicesToSell=Predefined Service
PredefinedProductsAndServicesToSell=Predefined products/services to sell
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index b6d9e236c18..33a0fafb5dc 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -270,3 +270,5 @@ RefTaskParent=Ref. Parent Task
ProfitIsCalculatedWith=Profit is calculated using
AddPersonToTask=Add also to tasks
UsageOrganizeEvent=Usage: Event Organization
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress)
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects.
diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index 7793fa5dead..b7babd403a1 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -46,12 +46,12 @@ SetHereVirtualHost=Use with Apache/NGinx/... Create on your web server
ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup:
YouCanAlsoTestWithPHPS=Use with PHP embedded server On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by runningphp -S 0.0.0.0:8080 -t %s
YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org
-CheckVirtualHostPerms=Check also that virtual host has permission %s on files into%s
+CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has %s permissions on files into%s
ReadPerm=Read
WritePerm=Write
TestDeployOnWeb=Test/deploy on web
PreviewSiteServedByWebServer=Preview %s in a new tab. The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:%s URL served by external server:%s
-PreviewSiteServedByDolibarr=Preview %s in a new tab. The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed. The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr. URL served by Dolibarr:%s To use your own external web server to serve this web site, create a virtual host on your web server that point on directory%s then enter the name of this virtual server and click on the other preview button.
+PreviewSiteServedByDolibarr=Preview %s in a new tab. The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed. The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr. URL served by Dolibarr:%s To use your own external web server to serve this web site, create a virtual host on your web server that points on directory%s then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web".
VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined
NoPageYet=No pages yet
YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template
diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang
index 072fd057dbf..7ecd5800861 100644
--- a/htdocs/langs/fr_FR/agenda.lang
+++ b/htdocs/langs/fr_FR/agenda.lang
@@ -130,7 +130,7 @@ AgendaUrlOptions4=logint=%s pour limiter l'export aux actions assignées
AgendaUrlOptionsProject=project=__PROJECT_ID__ pour restreindre aux événements associés au projet __PROJECT_ID__ .
AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto pour exclure les événements automatiques.
AgendaUrlOptionsIncludeHolidays=includeholidays=1 pour inclure les événements de type congé.
-AgendaShowBirthdayEvents=Afficher les anniversaires de contacts
+AgendaShowBirthdayEvents=Anniversaires de contacts
AgendaHideBirthdayEvents=Masquer les anniversaires de contacts
Busy=Occupé
ExportDataset_event1=Liste des événements de l'agenda
diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang
index 9b5721326d1..badec05e8c2 100644
--- a/htdocs/langs/fr_FR/commercial.lang
+++ b/htdocs/langs/fr_FR/commercial.lang
@@ -64,10 +64,10 @@ ActionAC_SHIP=Envoi bon d'expédition par email
ActionAC_SUP_ORD=Envoi commande fournisseur par email
ActionAC_SUP_INV=Envoi facture fournisseur par email
ActionAC_OTH=Autre
-ActionAC_OTH_AUTO=Évènements insérés automatiquement
+ActionAC_OTH_AUTO=Autre auto
ActionAC_MANUAL=Événements insérés manuellement
ActionAC_AUTO=Événements insérés automatiquement
-ActionAC_OTH_AUTOShort=Auto
+ActionAC_OTH_AUTOShort=Autre
Stats=Statistiques de vente
StatusProsp=Status prospection
DraftPropals=Propositions brouillons
diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang
index 1affdad0889..a963bffe13d 100644
--- a/htdocs/langs/fr_FR/projects.lang
+++ b/htdocs/langs/fr_FR/projects.lang
@@ -268,3 +268,5 @@ OneLinePerTask=Une ligne par tâche
OneLinePerPeriod=Une ligne par période
RefTaskParent=Réf. Tâche parent
ProfitIsCalculatedWith=Le bénéfice est calculé sur la base de
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classer le projet à clôturé lorsque toutes les tâches de ce projet sont à 100 %% de progression
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Non rétroactif : l’activation de cette option ne clôturera pas les projets dont les tâches sont déjà à 100 %%. Cette option ne classe que les projets ouverts.
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 06d7e5690f1..cbd0dc69375 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -1568,13 +1568,16 @@ if (!dol_is_dir($dirins))
}
$dirins_ok = (dol_is_dir($dirins));
-llxHeader('', $langs->trans("ModuleBuilder"), '', '', 0, 0,
- array(
+$help_url = '';
+$morejs = array(
'/includes/ace/src/ace.js',
'/includes/ace/src/ext-statusbar.js',
'/includes/ace/src/ext-language_tools.js',
//'/includes/ace/src/ext-chromevox.js'
- ), array(), '', 'classforhorizontalscrolloftabs');
+);
+$morecss = array();
+
+llxHeader('', $langs->trans("ModuleBuilder"), $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
$text = $langs->trans("ModuleBuilder");
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index e7da913f39c..e07e7757751 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -772,9 +772,17 @@ class MyObject extends CommonObject
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
} else $linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
- $linkstart = '';
- $linkend = ' ';
+ if ($option == 'nolink') {
+ $linkend = '';
+ } else {
+ $linkend = '';
+ }
$result .= $linkstart;
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index e22de010459..2cbccd1523b 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -231,6 +231,8 @@ $now = dol_now();
//$help_url="EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
$help_url = '';
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("MyObjects"));
+$morejs = array();
+$morecss = array();
// Build and execute select
@@ -351,7 +353,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
// Output page
// --------------------------------------------------------------------
-llxHeader('', $title, $help_url);
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
// Example : Adding jquery code
print '