mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
f7300eeaa4
|
|
@ -1726,6 +1726,9 @@ if ($id > 0) {
|
|||
}
|
||||
|
||||
if (in_array($value, array('label', 'libelle', 'libelle_facture')) && empty($tabcomplete[$tabname[$id]]['help'][$value])) {
|
||||
if (!is_array($tabcomplete[$tabname[$id]]['help'])) { // protection when $tabcomplete[$tabname[$id]]['help'] is a an empty string, we must force it into an array
|
||||
$tabcomplete[$tabname[$id]]['help'] = array();
|
||||
}
|
||||
$tabcomplete[$tabname[$id]]['help'][$value] = $langs->trans('LabelUsedByDefault');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ if ($action == 'update') {
|
|||
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||
|
||||
if (GETPOST('dol_resetcache')) {
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup&mode=".$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ if ($action == 'set' && $user->admin) {
|
|||
if ($csrfCheckOldValue != getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
|
||||
setEventMessage($langs->trans('WarningModuleHasChangedSecurityCsrfParameter', $value), 'warnings');
|
||||
}
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
if (!empty($resarray['errors'])) {
|
||||
setEventMessages('', $resarray['errors'], 'errors');
|
||||
} else {
|
||||
|
|
@ -298,7 +298,7 @@ if ($action == 'set' && $user->admin) {
|
|||
exit;
|
||||
} elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') {
|
||||
$result = unActivateModule($value);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
if ($result) {
|
||||
setEventMessages($result, null, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1185,7 +1185,7 @@ if ($resql) {
|
|||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
* \brief File of class to build exports with CSV format
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.modules.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.class.php';
|
||||
|
||||
// avoid timeout for big export
|
||||
set_time_limit(0);
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/export/export_csv.modules.php
|
||||
* \file htdocs/core/modules/export/exportcsv.class.php
|
||||
* \ingroup export
|
||||
* \brief File of class to build exports with CSV format
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.modules.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/export/exportcsv.class.php';
|
||||
|
||||
// avoid timeout for big export
|
||||
set_time_limit(0);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/export/exportcsv.modules.php
|
||||
* \file htdocs/core/modules/export/exportcsv.class.php
|
||||
* \ingroup export
|
||||
* \brief File of class to build exports with CSV format
|
||||
*/
|
||||
|
|
@ -62,8 +62,12 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
|||
$i = 0;
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
$reg = array();
|
||||
if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) {
|
||||
$moduleid = $reg[1];
|
||||
if ($moduleid == 'csv') {
|
||||
continue; // This may happen if on old file export_csv.modules.php was not correctly deleted
|
||||
}
|
||||
|
||||
// Loading Class
|
||||
$file = $dir."export_".$moduleid.".modules.php";
|
||||
|
|
|
|||
|
|
@ -1332,7 +1332,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Action column
|
||||
|
|
|
|||
|
|
@ -4133,6 +4133,8 @@ function migrate_delete_old_files($db, $langs, $conf)
|
|||
'/core/modules/facture/pdf_crabe.modules.php',
|
||||
'/core/modules/facture/pdf_oursin.modules.php',
|
||||
'/core/modules/export/export_excel.modules.php',
|
||||
'/core/modules/export/export_csv.modules.php',
|
||||
'/core/modules/export/exportcsv.modules.php',
|
||||
'/core/modules/export/export_excel2007new.modules.php',
|
||||
'/core/boxes/box_members.php',
|
||||
|
||||
|
|
|
|||
|
|
@ -1735,7 +1735,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||
}
|
||||
// Refresh value of MAIN_IHM_PARAMS_REV before forging the parameter line.
|
||||
if (GETPOST('dol_resetcache')) {
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", ((int) $conf->global->MAIN_IHM_PARAMS_REV) + 1, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$themeparam = '?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').(empty($user->id) ? '' : ('&userid='.$user->id)).'&entity='.$conf->entity;
|
||||
|
|
|
|||
|
|
@ -2063,7 +2063,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
// Default warehouse
|
||||
print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>';
|
||||
print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'class="pictofixedwidth"');
|
||||
print $formproduct->selectWarehouses((GETPOSTISSET('fk_default_warehouse') ? GETPOST('fk_default_warehouse') : $object->fk_default_warehouse), 'fk_default_warehouse', 'warehouseopen', 1);
|
||||
print $formproduct->selectWarehouses((GETPOSTISSET('fk_default_warehouse') ? GETPOST('fk_default_warehouse') : $object->fk_default_warehouse), 'fk_default_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF'].'?action=edit&id='.((int) $object->id)).'">';
|
||||
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span></a>';
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -760,7 +760,11 @@ if (count($tasksarray) > 0) {
|
|||
$projectstatic->loadTimeSpent($firstdaytoshow, 0, $usertoprocess->id); // Load time spent from table element_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
|
||||
$totalforeachday[$tmpday] += $projectstatic->weekWorkLoad[$tmpday];
|
||||
if (empty($totalforeachday[$tmpday])) {
|
||||
$totalforeachday[$tmpday] = empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday];
|
||||
} else {
|
||||
$totalforeachday[$tmpday] += empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -992,12 +992,12 @@ $includeonly = '';
|
|||
if (empty($user->rights->user->user->lire)) {
|
||||
$includeonly = array($user->id);
|
||||
}
|
||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
|
||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('ProjectsWithThisContact');
|
||||
$moreforfilter .= img_picto($tmptitle, 'contact', 'class="pictofixedwidth"').$form->selectcontacts(0, $search_project_contact ? $search_project_contact : '', 'search_project_contact', $tmptitle, '', '', 0, 'maxwidth250 widthcentpercentminusx');
|
||||
$moreforfilter .= img_picto($tmptitle, 'contact', 'class="pictofixedwidth"').$form->selectcontacts(0, $search_project_contact ? $search_project_contact : '', 'search_project_contact', $tmptitle, '', '', 0, 'maxwidth300 widthcentpercentminusx');
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
// If the user can view thirdparties other than his'
|
||||
|
|
@ -1005,14 +1005,14 @@ if ($user->rights->user->user->lire) {
|
|||
$langs->load("commercial");
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
|
||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250 widthcentpercentminusx');
|
||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth300 widthcentpercentminusx');
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
|
||||
// Filter on categories
|
||||
if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
|
||||
$formcategory = new FormCategory($db);
|
||||
$moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array, 'minwidth300imp widthcentpercentminusx');
|
||||
$moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array, 'minwidth300imp minwidth300 widthcentpercentminusx');
|
||||
}
|
||||
// Filter on customer categories
|
||||
if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && isModEnabled("categorie") && $user->hasRight('categorie', 'lire')) {
|
||||
|
|
@ -1021,7 +1021,7 @@ if (!empty($conf->global->MAIN_SEARCH_CATEGORY_CUSTOMER_ON_PROJECT_LIST) && isMo
|
|||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
|
||||
$categoriesArr = $form->select_all_categories(Categorie::TYPE_CUSTOMER, '', '', 64, 0, 1);
|
||||
$categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -';
|
||||
$moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle);
|
||||
$moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300im minwidth300 widthcentpercentminusx', 0, 0, '', 'category', $tmptitle);
|
||||
$moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>';
|
||||
$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click
|
||||
$moreforfilter .= '</div>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user