Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
f5562177e7
@ -205,12 +205,14 @@ if ($type == 'directory') {
|
|||||||
'product',
|
'product',
|
||||||
'tax',
|
'tax',
|
||||||
'project',
|
'project',
|
||||||
|
'project_task',
|
||||||
'fichinter',
|
'fichinter',
|
||||||
'user',
|
'user',
|
||||||
'expensereport',
|
'expensereport',
|
||||||
'holiday',
|
'holiday',
|
||||||
'recruitment-recruitmentcandidature',
|
'recruitment-recruitmentcandidature',
|
||||||
'banque',
|
'banque',
|
||||||
|
'chequereceipt',
|
||||||
'mrp-mo'
|
'mrp-mo'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -243,6 +245,8 @@ if ($type == 'directory') {
|
|||||||
$upload_dir = $conf->tax->dir_output;
|
$upload_dir = $conf->tax->dir_output;
|
||||||
} elseif ($module == 'project') {
|
} elseif ($module == 'project') {
|
||||||
$upload_dir = $conf->projet->dir_output;
|
$upload_dir = $conf->projet->dir_output;
|
||||||
|
} elseif ($module == 'project_task') {
|
||||||
|
$upload_dir = $conf->projet->dir_output;
|
||||||
} elseif ($module == 'fichinter') {
|
} elseif ($module == 'fichinter') {
|
||||||
$upload_dir = $conf->ficheinter->dir_output;
|
$upload_dir = $conf->ficheinter->dir_output;
|
||||||
} elseif ($module == 'user') {
|
} elseif ($module == 'user') {
|
||||||
@ -255,8 +259,10 @@ if ($type == 'directory') {
|
|||||||
$upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature';
|
$upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature';
|
||||||
} elseif ($module == 'banque') {
|
} elseif ($module == 'banque') {
|
||||||
$upload_dir = $conf->bank->dir_output;
|
$upload_dir = $conf->bank->dir_output;
|
||||||
|
} elseif ($module == 'chequereceipt') {
|
||||||
|
$upload_dir = $conf->bank->dir_output.'/checkdeposits';
|
||||||
} elseif ($module == 'mrp-mo') {
|
} elseif ($module == 'mrp-mo') {
|
||||||
$upload_dir = $conf->mrp->dir_output.'/mo';
|
$upload_dir = $conf->mrp->dir_output;
|
||||||
} else {
|
} else {
|
||||||
$parameters = array('modulepart'=>$module);
|
$parameters = array('modulepart'=>$module);
|
||||||
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
|
$reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters);
|
||||||
|
|||||||
@ -1678,6 +1678,9 @@ class FormFile
|
|||||||
} elseif ($modulepart == 'project') {
|
} elseif ($modulepart == 'project') {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
$object_instance = new Project($this->db);
|
$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') {
|
} elseif ($modulepart == 'fichinter') {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||||
$object_instance = new Fichinter($this->db);
|
$object_instance = new Fichinter($this->db);
|
||||||
@ -1696,6 +1699,9 @@ class FormFile
|
|||||||
} elseif ($modulepart == 'banque') {
|
} elseif ($modulepart == 'banque') {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
$object_instance = new Account($this->db);
|
$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') {
|
} elseif ($modulepart == 'mrp-mo') {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
|
||||||
$object_instance = new Mo($this->db);
|
$object_instance = new Mo($this->db);
|
||||||
@ -1750,14 +1756,19 @@ class FormFile
|
|||||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
$id = (isset($reg[1]) ? $reg[1] : '');
|
||||||
} elseif ($modulepart == 'invoice_supplier') {
|
} elseif ($modulepart == 'invoice_supplier') {
|
||||||
preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg);
|
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;
|
$id = $ref;
|
||||||
$ref = '';
|
$ref = '';
|
||||||
}
|
}
|
||||||
} elseif ($modulepart == 'user' || $modulepart == 'holiday') {
|
} elseif ($modulepart == 'user') {
|
||||||
// $ref may be also id with old supplier invoices
|
// $ref may be also id with old supplier invoices
|
||||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||||
$id = (isset($reg[1]) ? $reg[1] : '');
|
$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(
|
} elseif (in_array($modulepart, array(
|
||||||
'invoice',
|
'invoice',
|
||||||
'propal',
|
'propal',
|
||||||
@ -1767,11 +1778,14 @@ class FormFile
|
|||||||
'contract',
|
'contract',
|
||||||
'product',
|
'product',
|
||||||
'project',
|
'project',
|
||||||
|
'project_task',
|
||||||
'fichinter',
|
'fichinter',
|
||||||
'expensereport',
|
'expensereport',
|
||||||
'recruitment-recruitmentcandidature',
|
'recruitment-recruitmentcandidature',
|
||||||
'mrp-mo',
|
'mrp-mo',
|
||||||
'banque'))) {
|
'banque',
|
||||||
|
'chequereceipt',
|
||||||
|
'holiday'))) {
|
||||||
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg);
|
||||||
$ref = (isset($reg[1]) ? $reg[1] : '');
|
$ref = (isset($reg[1]) ? $reg[1] : '');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup propale Module commercial proposals
|
* \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
|
* \file htdocs/core/modules/modPropale.class.php
|
||||||
* \ingroup propale
|
* \ingroup propale
|
||||||
* \brief Description and activation file for the module customer proposal
|
* \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
|
class modPropale extends DolibarrModules
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor. Define names, constants, directories, boxes, permissions
|
* Constructor. Define names, constants, directories, boxes, permissions
|
||||||
*
|
*
|
||||||
|
|||||||
@ -341,6 +341,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
|||||||
}
|
}
|
||||||
if (!empty($conf->projet->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', '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)) {
|
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")));
|
$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)) {
|
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")));
|
$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)) {
|
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")));
|
$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")));
|
||||||
|
|||||||
@ -570,19 +570,27 @@ dolibarr_install_syslog("Exit ".$ret);
|
|||||||
|
|
||||||
dolibarr_install_syslog("- step2: end");
|
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 = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno" value="checked" checked="true"> ';
|
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
||||||
|
|
||||||
|
$out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"'.((!empty($conf->global->MAIN_FIRST_PING_OK_ID) && $conf->global->MAIN_FIRST_PING_OK_ID == 'disabled') ? '' : ' value="checked" checked="true"').'> ';
|
||||||
$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>';
|
$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>';
|
||||||
|
|
||||||
$out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';
|
$out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';
|
||||||
$out .= '<script type="text/javascript">';
|
$out .= '<script type="text/javascript">';
|
||||||
$out .= 'jQuery(document).ready(function(){';
|
$out .= 'jQuery(document).ready(function(){';
|
||||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=0; path=/"'."\n";
|
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=0; path=/"'."\n";
|
||||||
$out .= ' jQuery("#dolibarrpingno").click(function() {';
|
$out .= ' jQuery("#dolibarrpingno").click(function() {';
|
||||||
$out .= ' if (! $(this).is(\':checked\')) {';
|
$out .= ' if (! $(this).is(\':checked\')) {';
|
||||||
$out .= ' console.log("We uncheck anonymous ping");';
|
$out .= ' console.log("We uncheck anonymous ping");';
|
||||||
$out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=1; path=/"'."\n";
|
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=1; path=/"'."\n";
|
||||||
$out .= ' }';
|
$out .= ' } else {'."\n";
|
||||||
|
$out .= ' console.log("We check anonymous ping");';
|
||||||
|
$out .= ' document.cookie = "DOLINSTALLNOPING_'.$hash_unique_id.'=0; path=/"'."\n";
|
||||||
|
$out .= ' }'."\n";
|
||||||
$out .= ' });';
|
$out .= ' });';
|
||||||
$out .= '});';
|
$out .= '});';
|
||||||
$out .= '</script>';
|
$out .= '</script>';
|
||||||
|
|||||||
@ -3223,6 +3223,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
|
if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
|
||||||
//print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' -->';
|
//print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' -->';
|
||||||
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
$hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id);
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_FIRST_PING_OK_DATE)
|
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'))
|
|| (!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) {
|
|| $forceping) {
|
||||||
@ -3231,7 +3232,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\n";
|
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\n";
|
||||||
} elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) { // Cookie is set when we uncheck the checkbox in the installation wizard.
|
} 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
|
// 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) {
|
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<!-- NO JS CODE TO ENABLE the anonymous Ping. An error already occured this month, we will try later. -->\n";
|
print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. An error already occured this month, we will try later. -->\n";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -643,13 +643,12 @@ class MultiCurrency extends CommonObject
|
|||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
|
|
||||||
$urlendpoint = 'http://apilayer.net/api/live?access_key='.$key;
|
$urlendpoint = 'http://api.currencylayer.com/live?access_key='.$key;
|
||||||
//$urlendpoint.='&format=1';
|
$urlendpoint .= '&source=' . (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? 'USD' : $conf->global->MULTICURRENCY_APP_SOURCE);
|
||||||
$urlendpoint .= (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '' : '&source='.$conf->global->MULTICURRENCY_APP_SOURCE);
|
|
||||||
|
|
||||||
dol_syslog("Call url endpoint ".$urlendpoint);
|
dol_syslog("Call url endpoint ".$urlendpoint);
|
||||||
|
|
||||||
$resget = getURLContent($urlendpoint, 'GET', '', 1, array(), array('http', 'https'), 1);
|
$resget = getURLContent($urlendpoint);
|
||||||
|
|
||||||
if ($resget['content']) {
|
if ($resget['content']) {
|
||||||
$response = $resget['content'];
|
$response = $resget['content'];
|
||||||
|
|||||||
@ -443,6 +443,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
|
|||||||
@ -6840,6 +6840,10 @@ div.clipboardCPValue.hidewithsize {
|
|||||||
min-width: 30px;
|
min-width: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.login_block {
|
||||||
|
border-right: 1px solid rgba(0,0,0,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
div.tmenucenter {
|
div.tmenucenter {
|
||||||
text-overflow: clip;
|
text-overflow: clip;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user