diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 4cd940f33fc..b41103ace61 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -2001,9 +2001,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$nextindextouse++; // Prepare to use next color
}
}
- //print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'
';
- // Define color // @suppress-next-line PhanPluginPrintfIncompatibleArgumentType
- $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
+ if (isset($theme_datacolor[$colorindex])) {
+ $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
+ } elseif (getDolGlobalString('THEME_ELDY_BACKBODY')) {
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+ $color = colorArrayToHex(explode(',', getDolGlobalString('THEME_ELDY_BACKBODY')));
+ } else {
+ $color = "ffffff";
+ }
}
$cssclass = $cssclass.' eventday_'.$ymd;
@@ -2377,7 +2382,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
function dol_color_minus($color, $minus, $minusunit = 16)
{
$newcolor = $color;
- if ($minusunit == 16) {
+ if ($minusunit == 16 && is_array($newcolor)) {
$newcolor[0] = dechex(max(min(hexdec($newcolor[0]) - $minus, 15), 0));
$newcolor[2] = dechex(max(min(hexdec($newcolor[2]) - $minus, 15), 0));
$newcolor[4] = dechex(max(min(hexdec($newcolor[4]) - $minus, 15), 0));
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index 836390e4188..1fa01691f34 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -834,6 +834,7 @@ class PaymentVarious extends CommonObject
$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
$bankline = ((empty($arraydata['bankline']) || empty($arraydata['bankline']->id)) ? 0 : $arraydata['bankline']);
+ $formatedaccountancycode = (empty($arraydata['formatedaccountancycode']) ? '' : $arraydata['formatedaccountancycode']);
$return = '