diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php
index 2a42d4a3d00..f46c1051c53 100644
--- a/htdocs/core/ajax/ajaxdirpreview.php
+++ b/htdocs/core/ajax/ajaxdirpreview.php
@@ -205,12 +205,14 @@ if ($type == 'directory') {
'product',
'tax',
'project',
+ 'project_task',
'fichinter',
'user',
'expensereport',
'holiday',
'recruitment-recruitmentcandidature',
'banque',
+ 'chequereceipt',
'mrp-mo'
);
@@ -243,6 +245,8 @@ if ($type == 'directory') {
$upload_dir = $conf->tax->dir_output;
} elseif ($module == 'project') {
$upload_dir = $conf->projet->dir_output;
+ } elseif ($module == 'project_task') {
+ $upload_dir = $conf->projet->dir_output;
} elseif ($module == 'fichinter') {
$upload_dir = $conf->ficheinter->dir_output;
} elseif ($module == 'user') {
@@ -255,8 +259,10 @@ if ($type == 'directory') {
$upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature';
} elseif ($module == 'banque') {
$upload_dir = $conf->bank->dir_output;
+ } elseif ($module == 'chequereceipt') {
+ $upload_dir = $conf->bank->dir_output.'/checkdeposits';
} elseif ($module == 'mrp-mo') {
- $upload_dir = $conf->mrp->dir_output.'/mo';
+ $upload_dir = $conf->mrp->dir_output;
} else {
$parameters = array('modulepart'=>$module);
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 1bd622d173f..d313d91f505 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1678,6 +1678,9 @@ class FormFile
} elseif ($modulepart == 'project') {
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$object_instance = new Project($this->db);
+ } elseif ($modulepart == 'project_task') {
+ include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
+ $object_instance = new Task($this->db);
} elseif ($modulepart == 'fichinter') {
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
$object_instance = new Fichinter($this->db);
@@ -1696,6 +1699,9 @@ class FormFile
} elseif ($modulepart == 'banque') {
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$object_instance = new Account($this->db);
+ } elseif ($modulepart == 'chequereceipt') {
+ include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
+ $object_instance = new RemiseCheque($this->db);
} elseif ($modulepart == 'mrp-mo') {
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
$object_instance = new Mo($this->db);
@@ -1750,14 +1756,19 @@ class FormFile
$id = (isset($reg[1]) ? $reg[1] : '');
} elseif ($modulepart == 'invoice_supplier') {
preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg);
- $ref = (isset($reg[1]) ? $reg[1] : ''); if (is_numeric($ref)) {
+ $ref = (isset($reg[1]) ? $reg[1] : '');
+ if (is_numeric($ref)) {
$id = $ref;
$ref = '';
}
- } elseif ($modulepart == 'user' || $modulepart == 'holiday') {
+ } elseif ($modulepart == 'user') {
// $ref may be also id with old supplier invoices
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
$id = (isset($reg[1]) ? $reg[1] : '');
+ } elseif ($modulepart == 'project_task') {
+ // $ref of task is the sub-directory of the project
+ $reg = explode("/", $relativefile);
+ $ref = (isset($reg[1]) ? $reg[1] : '');
} elseif (in_array($modulepart, array(
'invoice',
'propal',
@@ -1767,11 +1778,14 @@ class FormFile
'contract',
'product',
'project',
+ 'project_task',
'fichinter',
'expensereport',
'recruitment-recruitmentcandidature',
'mrp-mo',
- 'banque'))) {
+ 'banque',
+ 'chequereceipt',
+ 'holiday'))) {
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
$ref = (isset($reg[1]) ? $reg[1] : '');
} else {
diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php
index b46671eae01..1374e70d6d4 100644
--- a/htdocs/core/modules/modPropale.class.php
+++ b/htdocs/core/modules/modPropale.class.php
@@ -23,7 +23,7 @@
/**
* \defgroup propale Module commercial proposals
- * \brief Module pour gerer la tenue de propositions commerciales
+ * \brief Module to manage commercial proposals
* \file htdocs/core/modules/modPropale.class.php
* \ingroup propale
* \brief Description and activation file for the module customer proposal
@@ -36,7 +36,6 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
*/
class modPropale extends DolibarrModules
{
-
/**
* Constructor. Define names, constants, directories, boxes, permissions
*
diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php
index e737d1b62a2..1310936ca83 100644
--- a/htdocs/ecm/index_auto.php
+++ b/htdocs/ecm/index_auto.php
@@ -341,6 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
}
if (!empty($conf->projet->enabled)) {
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Projects")));
+ $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'project_task', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Tasks"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Tasks")));
}
if (!empty($conf->ficheinter->enabled)) {
$langs->load("interventions"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Interventions")));
@@ -353,6 +354,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
}
if (!empty($conf->banque->enabled)) {
$langs->load("banks"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'banque', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("BankAccount"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("BankAccount")));
+ $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'chequereceipt', 'test'=>$conf->banque->enabled, 'label'=>$langs->trans("CheckReceipt"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("CheckReceipt")));
}
if (!empty($conf->mrp->enabled)) {
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php
index 1835c87f759..30bee881584 100644
--- a/htdocs/install/step2.php
+++ b/htdocs/install/step2.php
@@ -570,19 +570,27 @@ dolibarr_install_syslog("Exit ".$ret);
dolibarr_install_syslog("- step2: end");
+// Force here a value we need after because master.inc.php is not loaded into step2.
+// This code must be similar with the one into main.inc.php
+$conf->file->instance_unique_id = (empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id); // Unique id of instance
-$out = ' ';
+$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
+
+$out = 'global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
$out .= '';
$out .= '';
$out .= '';
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 03abc10b171..c1f3231c737 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -3223,6 +3223,7 @@ if (!function_exists("llxFooter")) {
if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
//print '';
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
+
if (empty($conf->global->MAIN_FIRST_PING_OK_DATE)
|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled'))
|| $forceping) {
@@ -3231,7 +3232,7 @@ if (!function_exists("llxFooter")) {
print "\n\n";
} elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard.
// MAIN_LAST_PING_KO_DATE
- // Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent
+ // Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent (this month)
if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) {
print "\n\n";
} else {
diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php
index 73eab7773bd..0dc9f7ce63a 100644
--- a/htdocs/multicurrency/class/multicurrency.class.php
+++ b/htdocs/multicurrency/class/multicurrency.class.php
@@ -643,13 +643,12 @@ class MultiCurrency extends CommonObject
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
- $urlendpoint = 'http://apilayer.net/api/live?access_key='.$key;
- //$urlendpoint.='&format=1';
- $urlendpoint .= (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '' : '&source='.$conf->global->MULTICURRENCY_APP_SOURCE);
+ $urlendpoint = 'http://api.currencylayer.com/live?access_key='.$key;
+ $urlendpoint .= '&source=' . (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? 'USD' : $conf->global->MULTICURRENCY_APP_SOURCE);
dol_syslog("Call url endpoint ".$urlendpoint);
- $resget = getURLContent($urlendpoint, 'GET', '', 1, array(), array('http', 'https'), 1);
+ $resget = getURLContent($urlendpoint);
if ($resget['content']) {
$response = $resget['content'];
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index af6d6c08740..d7bd8bee9b4 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -443,6 +443,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') {
*/
$now = dol_now();
+$error = 0;
$form = new Form($db);
$formproduct = new FormProduct($db);
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 4400ce22fa5..37915d91da5 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -6840,6 +6840,10 @@ div.clipboardCPValue.hidewithsize {
min-width: 30px;
}
+ div.login_block {
+ border-right: 1px solid rgba(0,0,0,0.3);
+ }
+
div.tmenucenter {
text-overflow: clip;
}