From 112922206469e35129ec5198bac125f40ce736fa Mon Sep 17 00:00:00 2001
From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com>
Date: Fri, 19 Nov 2021 15:59:34 +0100
Subject: [PATCH 1/3] FIX: user employee tab: offset in open days messes up
holiday length calculation
---
htdocs/user/bank.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 3bdc6b5390c..e97d6504369 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -327,7 +327,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
$holiday->id = $objp->rowid;
$holiday->ref = $objp->rowid;
$holiday->fk_type = $objp->fk_type;
- $nbopenedday = num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday);
+ $nbopenedday = num_open_day($db->jdate($objp->date_debut, 'gmt'), $db->jdate($objp->date_fin, 'gmt'), 0, 1, $objp->halfday);
print $holiday->getNomUrl(1);
print '
'.dol_print_date($db->jdate($objp->date_debut), 'day')." | \n";
From 89b7c8298b4f7f27b4d3b08079014826437677a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alo=C3=AFs=20Micard?=
Date: Mon, 11 Apr 2022 17:25:45 +0200
Subject: [PATCH 2/3] Module builder: Translate permissions label
---
htdocs/modulebuilder/index.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index f3922aa6342..f8abd703bf0 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -3008,7 +3008,7 @@ if ($module == 'initmodule')
print '';
print '';
- print $perm[1];
+ print $langs->trans($perm[1]);
print ' | ';
print '';
From 62b74962535ed38c424e569d9dbd79b25653ab16 Mon Sep 17 00:00:00 2001
From: Ferran Marcet
Date: Mon, 11 Apr 2022 18:26:49 +0200
Subject: [PATCH 3/3] Fix: Direct download don't work with multicompany
---
htdocs/document.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/htdocs/document.php b/htdocs/document.php
index 060722e8d5b..fc894091615 100644
--- a/htdocs/document.php
+++ b/htdocs/document.php
@@ -5,6 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2010 Pierre Morin
* Copyright (C) 2010 Juanjo Menent
+ * Copyright (C) 2022 Ferran Marcet
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -140,6 +141,11 @@ if (!empty($hashp))
$modulepart = $moduleparttocheck;
$original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir
}
+ $entity = $ecmfile->entity;
+ if ($entity != $conf->entity) {
+ $conf->entity = $entity;
+ $conf->setValues($db);
+ }
} else {
$langs->load("errors");
accessforbidden($langs->trans("ErrorFileNotFoundWithSharedLink"), 0, 0, 1);
|