From 97b811f170b2c4cddde0ecc4fe3d5c49272d77f9 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Mon, 8 Dec 2025 21:44:47 +0100 Subject: [PATCH 1/8] Fixed Typo in German Language --- htdocs/langs/de_DE/accountancy.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/de_DE/accountancy.lang b/htdocs/langs/de_DE/accountancy.lang index b9ea42dab2e..8b6333c7186 100644 --- a/htdocs/langs/de_DE/accountancy.lang +++ b/htdocs/langs/de_DE/accountancy.lang @@ -186,7 +186,7 @@ ACCOUNTING_RESULT_LOSS=Ergebnisabrechnungskonto (Verlust) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal für Abschlussbuchungen ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT=Kontengruppen, die zur Berechnung der Bilanz verwendet werden ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNTHelp=Legen Sie hier die Liste der Kontengruppen (definiert im Kontenplan) fest, die verwendet werden müssen, um alle Konten zur Berechnung der Bilanz zu finden. Trennen Sie die einzelnen Werte durch Kommas.
Beispiel: CAPIT,IMMOSTOCK,FINAN,THIRDPARTY -ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT=Kontenruppen, die zur Berechnung der Gewinn- und Verlustrechnung verwendet werden +ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT=Kontengruppen, die zur Berechnung der Gewinn- und Verlustrechnung verwendet werden ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENTHelp=Legen Sie hier die Liste der Kontengruppen (definiert im Kontenplan) fest, die verwendet werden müssen, um alle Konten zu finden um die Gewinn- und Verlustrechnung zu berechnen. Trennen Sie die einzelnen Werte durch Kommas.
Beispiel: ERLÖSE,AUFWENDUNGEN ACCOUNTING_ACCOUNT_TRANSFER_CASH=Konto (aus dem Kontenplan), das als Verrechnungskonto/Transferkonto für Banküberweisungen verwendet werden soll TransitionalAccount=Überweisungskonto From 56c6b48effb60a3f2bb78f305ed6fce24f38b930 Mon Sep 17 00:00:00 2001 From: Dolibot Date: Tue, 9 Dec 2025 12:11:04 +0000 Subject: [PATCH 2/8] PHPStan > Update baseline --- dev/build/phpstan/phpstan-baseline.neon | 36 ------------------------- 1 file changed, 36 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index a7729ec1878..b34cfc57794 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -7356,24 +7356,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/import/import_csv.modules.php - - - message: '#^Property ModeleImports\:\:\$errors \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 3 - path: ../../../htdocs/core/modules/import/import_csv.modules.php - - - - message: '#^Property ModeleImports\:\:\$errors \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 3 - path: ../../../htdocs/core/modules/import/import_csv.modules.php - - - - message: '#^Property ModeleImports\:\:\$warnings \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/import/import_csv.modules.php - - message: '#^Variable \$key might not be defined\.$#' identifier: variable.undefined @@ -7422,24 +7404,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/import/import_xlsx.modules.php - - - message: '#^Property ModeleImports\:\:\$errors \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 3 - path: ../../../htdocs/core/modules/import/import_xlsx.modules.php - - - - message: '#^Property ModeleImports\:\:\$errors \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 3 - path: ../../../htdocs/core/modules/import/import_xlsx.modules.php - - - - message: '#^Property ModeleImports\:\:\$warnings \(array\\) does not accept array\\|string\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/import/import_xlsx.modules.php - - message: '#^Variable \$where might not be defined\.$#' identifier: variable.undefined From 9d39ac76de1a7bf73fa209f96f892a267149efe5 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 9 Dec 2025 14:50:21 +0100 Subject: [PATCH 3/8] Qual(menu): Replace str_pad with str_repeat (fix phan notices) The changes replace instances of `str_pad('', $level)` with `str_repeat(' ', $level)`. This fixes suspicious argument order notices for str_pad (in phan). --- htdocs/core/menus/standard/auguria_menu.php | 20 ++++++++++---------- htdocs/core/menus/standard/eldy_menu.php | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 8812052ba66..2775ebdcdfd 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007 Patrick Raguin * Copyright (C) 2009 Regis Houssin * Copyright (C) 2008-2013 Laurent Destailleur - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -244,12 +244,12 @@ class MenuManager // Start a new ul level 1 $level = 1; - print str_pad('', $level).''."\n"; // end ul level 1 + print str_repeat(' ', $level - 1).''."\n"; // end ul level 1 } elseif ($val['enabled'] == 2) { print '
  • '; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 983b43e6169..00bba6c0239 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2009 Regis Houssin - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -246,12 +246,12 @@ class MenuManager // Start a new ul level 1 $level = 1; - print str_pad('', $level).''."\n"; // end ul level 1 + print str_repeat(' ', $level - 1).'
  • '."\n"; // end ul level 1 } elseif ($val['enabled'] == 2) { print '
  • '; From 245fdda75b954d19eca4247294f8afb39b8e7929 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 9 Dec 2025 14:53:25 +0100 Subject: [PATCH 4/8] Qual: Update deleteLine method parameter type for $fuser The parameter `$fuser` in the `deleteLine` method has been updated to explicitly accept a `?User` type, which is the type that is expected by ExpenseReport::call_trigger --- htdocs/expensereport/class/expensereport.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 44dd126b498..228bf211b96 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2356,11 +2356,11 @@ class ExpenseReport extends CommonObject * deleteline * * @param int $rowid Row id - * @param User|string $fuser User + * @param ?User $fuser User * @param int<0,1> $notrigger 1=No trigger * @return int<-1,1> Return integer <0 if KO, >0 if OK */ - public function deleteLine($rowid, $fuser = '', $notrigger = 0) + public function deleteLine($rowid, $fuser = null, $notrigger = 0) { $error = 0; From 6f4516f310e1e943d46d35698604f505e6c4770a Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 9 Dec 2025 14:59:58 +0100 Subject: [PATCH 5/8] Qual: Allow null for $outputlangs in get_date_range # Qual: Allow null for $outputlangs in get_date_range `null` is already the default for $outputlangs so allow it as an argument value (fixes phan notice) --- .../boxes/box_members_last_subscriptions.php | 2 +- htdocs/core/lib/functions.lib.php | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index 25c40cee881..cbac8ba68e7 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015-2025 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 23e46a5376a..a3b0e6c7aca 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9385,8 +9385,10 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' * @return string Translated string for the key */ function ($m) { - return '__BRACKETSTART' . $m[1] . 'BRACKETEND__'; }, - $out); + return '__BRACKETSTART' . $m[1] . 'BRACKETEND__'; + }, + $out + ); $dom->loadHTML($out, LIBXML_HTML_NODEFDTD | LIBXML_ERR_NONE | LIBXML_HTML_NOIMPLIED | LIBXML_NONET | LIBXML_NOWARNING | LIBXML_NOERROR | LIBXML_NOXMLDECL); @@ -9402,8 +9404,10 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = ' * @return string Translated string for the key */ function ($m) { - return '__[' . $m[1] . ']__'; }, - $out); + return '__[' . $m[1] . ']__'; + }, + $out + ); // Remove the trick added to solve pb with text in utf8 and text without parent tag //$out = preg_replace('/^'.preg_quote('', '/').'/', '', $out); @@ -10973,8 +10977,8 @@ function print_date_range($date_start, $date_end, $format = '', $outputlangs = n * @param int $date_start Start date * @param int $date_end End date * @param string $format Output date format ('day', 'dayhour', ...) - * @param Translate $outputlangs Output language - * @param integer $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis + * @param ?Translate $outputlangs Output language + * @param int<0,2> $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis * @return string String */ function get_date_range($date_start, $date_end, $format = '', $outputlangs = null, $withparenthesis = 1) From e8bb08ea47215c716b6cfdd5a7c7caa85f68fedc Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:50:52 +0100 Subject: [PATCH 6/8] FIX Enhance VAT loading logic for supplier and buyer Refactor VAT loading to handle supplier and buyer roles dynamically. --- htdocs/core/tpl/objectline_title.tpl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php index fff2656659b..c97a08012e7 100644 --- a/htdocs/core/tpl/objectline_title.tpl.php +++ b/htdocs/core/tpl/objectline_title.tpl.php @@ -104,7 +104,10 @@ if (in_array($object->element, array('propal', 'commande', 'facture', 'supplier_ //print ''; if (GETPOST('mode', 'aZ09') == 'vatforalllines') { print '
    '; - print $form->load_tva('vatforalllines', '', $mysoc, $object->thirdparty, 0, 0, '', false, 1); + $societe_vendeuse = strpos($object->element, 'supplier') === false ? $mysoc : $object->thirdparty; + $societe_acheteuse = strpos($object->element, 'supplier') === false ? $object->thirdparty : $mysoc; + $vat_mode = strpos($object->element, 'supplier') === false ? 1 : 2; + print $form->load_tva('vatforalllines', '', $societe_vendeuse, $societe_acheteuse, 0, 0, '', false, 1, $vat_mode); print ''; print '
    '; } From d1c829a79fed37b0f773189ee1932fe7d347071a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Dec 2025 01:07:44 +0100 Subject: [PATCH 7/8] Fix CI --- htdocs/core/boxes/box_members_last_subscriptions.php | 2 +- htdocs/core/lib/functions.lib.php | 12 ++++++------ htdocs/core/menus/standard/auguria_menu.php | 9 ++++++++- htdocs/core/menus/standard/eldy_menu.php | 2 ++ htdocs/core/modules/mailings/partnership.modules.php | 2 +- .../thirdparties_services_expired.modules.php | 10 ++++++---- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index 25c40cee881..fb423ed92d2 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -140,7 +140,7 @@ class box_members_last_subscriptions extends ModeleBoxes 'asis' => 1, ); - $daterange = get_date_range($this->db->jdate($obj->date_start), $this->db->jdate($obj->date_end), '', null, 0); + $daterange = get_date_range($this->db->jdate($obj->date_start), $this->db->jdate($obj->date_end), '', $langs, 0); $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone" title="'.dol_escape_htmltag($daterange).'"', 'text' => ''.$daterange.'', diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 23e46a5376a..f08d497922d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10970,12 +10970,12 @@ function print_date_range($date_start, $date_end, $format = '', $outputlangs = n /** * Format output for start and end date * - * @param int $date_start Start date - * @param int $date_end End date - * @param string $format Output date format ('day', 'dayhour', ...) - * @param Translate $outputlangs Output language - * @param integer $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis - * @return string String + * @param int $date_start Start date + * @param int $date_end End date + * @param string $format Output date format ('day', 'dayhour', ...) + * @param Translate|null $outputlangs Output language + * @param integer $withparenthesis 1=Add space and parenthesis, 0=no parenthesis, 2=Add parenthesis + * @return string String */ function get_date_range($date_start, $date_end, $format = '', $outputlangs = null, $withparenthesis = 1) { diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 8812052ba66..0eb23d9bfc2 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -244,11 +244,13 @@ class MenuManager // Start a new ul level 1 $level = 1; + // @phan-suppress-next-line PhanParamSuspiciousOrder print str_pad('', $level).'
    '."\n"; // end ul level 1 - print str_pad('', $level - 1).'
  • '."\n"; // end ul level 1 + // @phan-suppress-next-line PhanParamSuspiciousOrder + print str_pad('', $level - 1).''."\n"; // end ul level 1 } elseif ($val['enabled'] == 2) { print '
  • '; diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 983b43e6169..a0ee8ce41b1 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -246,11 +246,13 @@ class MenuManager // Start a new ul level 1 $level = 1; + // @phan-suppress-next-line PhanParamSuspiciousOrder print str_pad('', $level).'