diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index 5e640d1f98c..a0921b222b7 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -100,7 +100,7 @@ $hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules
$formaccounting = new FormAccounting($db);
$form = new Form($db);
-if (empty($search_date_start) && !GETPOSTISSET('formfilteraction')) {
+if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('formfilteraction')) {
$sql = "SELECT date_start, date_end";
$sql .=" FROM ".MAIN_DB_PREFIX."accounting_fiscalyear ";
if (getDolGlobalInt('ACCOUNTANCY_FISCALYEAR_DEFAULT')) {
@@ -162,17 +162,17 @@ if (empty($reshook)) {
$show_subgroup = '';
$search_date_start = '';
$search_date_end = '';
- $search_date_startyear = '';
- $search_date_startmonth = '';
- $search_date_startday = '';
- $search_date_endyear = '';
- $search_date_endmonth = '';
- $search_date_endday = '';
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_not_reconciled = '';
$search_ledger_code = array();
$filter = array();
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_year']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_year']);
}
// Must be after the remove filter action, before the export.
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index a0ee90823aa..2439ca577dd 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -31,6 +31,7 @@
// Load Dolibarr environment
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfiscalyear.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
@@ -264,44 +265,14 @@ if (empty($reshook)) {
$search_mvt_label = '';
$search_direction = '';
$search_ledger_code = array();
- $search_date_startyear = '';
- $search_date_startmonth = '';
- $search_date_startday = '';
- $search_date_endyear = '';
- $search_date_endmonth = '';
- $search_date_endday = '';
$search_date_start = '';
$search_date_end = '';
- $search_date_creation_startyear = '';
- $search_date_creation_startmonth = '';
- $search_date_creation_startday = '';
- $search_date_creation_endyear = '';
- $search_date_creation_endmonth = '';
- $search_date_creation_endday = '';
$search_date_creation_start = '';
$search_date_creation_end = '';
- $search_date_modification_startyear = '';
- $search_date_modification_startmonth = '';
- $search_date_modification_startday = '';
- $search_date_modification_endyear = '';
- $search_date_modification_endmonth = '';
- $search_date_modification_endday = '';
$search_date_modification_start = '';
$search_date_modification_end = '';
- $search_date_export_startyear = '';
- $search_date_export_startmonth = '';
- $search_date_export_startday = '';
- $search_date_export_endyear = '';
- $search_date_export_endmonth = '';
- $search_date_export_endday = '';
$search_date_export_start = '';
$search_date_export_end = '';
- $search_date_validation_startyear = '';
- $search_date_validation_startmonth = '';
- $search_date_validation_startday = '';
- $search_date_validation_endyear = '';
- $search_date_validation_endmonth = '';
- $search_date_validation_endday = '';
$search_date_validation_start = '';
$search_date_validation_end = '';
// Due date start
@@ -320,6 +291,12 @@ if (empty($reshook)) {
$search_not_reconciled = '';
$search_import_key = '';
$toselect = array();
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_year']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_year']);
}
// Must be after the remove filter action, before the export.
diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php
index d52a1c747e3..2ac1ec58814 100644
--- a/htdocs/accountancy/bookkeeping/listbyaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbyaccount.php
@@ -320,6 +320,12 @@ if (empty($reshook)) {
$search_not_reconciled = '';
$search_import_key = '';
$toselect = array();
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_start_accountancy_year']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_day']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_month']);
+ unset($_SESSION['DOLDATE_search_date_end_accountancy_year']);
}
if (!empty($socid)) {
diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php
index 0df964b4214..4dd2665a0a0 100644
--- a/htdocs/expedition/dispatch.php
+++ b/htdocs/expedition/dispatch.php
@@ -56,7 +56,10 @@ if (isModEnabled('project')) {
// Load translation files required by the page
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal', 'receptions'));
-if (isModEnabled('productbatch')) {
+$is_mod_batch_enabled = isModEnabled('productbatch');
+$is_eat_by_enabled = !getDolGlobalInt('PRODUCT_DISABLE_EATBY');
+$is_sell_by_enabled = !getDolGlobalInt('PRODUCT_DISABLE_SELLBY');
+if ($is_mod_batch_enabled) {
$langs->load('productbatch');
}
@@ -531,7 +534,7 @@ if ($object->id > 0 || !empty($object->ref)) {
print '';
print '