Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-04-20 12:59:11 +02:00
commit ccf2e4dd34
100 changed files with 286 additions and 358 deletions

View file

@ -888,12 +888,6 @@ parameters:
count: 1
path: ../../../htdocs/asset/card.php
-
message: '#^Property Asset\:\:\$fields \(array\<string, array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\}\>\) does not accept non\-empty\-array\<string, array\{type\: ''integer…'', label\: ''SupplierInvoice'', enabled\: ''1'', noteditable\: 1, position\: 280, notnull\: 0, visible\: 1, index\: 1, \.\.\.\}\|array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\}\>\.$#'
identifier: assign.propertyType
count: 1
path: ../../../htdocs/asset/card.php
-
message: '#^Call to function is_callable\(\) with array\{\$this\(AssetDepreciationOptions\), ''validateField''\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
@ -1146,12 +1140,6 @@ parameters:
count: 1
path: ../../../htdocs/bookmarks/bookmarks.lib.php
-
message: '#^Variable \$result might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/categories/card.php
-
message: '#^Loose comparison using \=\= between ''hierarchy'' and ''common'' will always evaluate to false\.$#'
identifier: equal.alwaysFalse
@ -1164,12 +1152,6 @@ parameters:
count: 1
path: ../../../htdocs/categories/categorie_list.php
-
message: '#^Strict comparison using \=\=\= between array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\} and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: ../../../htdocs/categories/categorie_list.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
@ -1302,12 +1284,6 @@ parameters:
count: 2
path: ../../../htdocs/comm/action/index.php
-
message: '#^Variable \$socid might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/comm/action/info.php
-
message: '#^Call to function is_array\(\) with array\<mixed\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
@ -1980,12 +1956,6 @@ parameters:
count: 3
path: ../../../htdocs/compta/cashcontrol/cashcontrol_card.php
-
message: '#^Strict comparison using \=\=\= between array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\} and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: ../../../htdocs/compta/cashcontrol/cashcontrol_list.php
-
message: '#^Call to function method_exists\(\) with \$this\(CashControl\) and ''getLibStatut'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
@ -4176,12 +4146,6 @@ parameters:
count: 1
path: ../../../htdocs/core/class/html.formother.class.php
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
count: 1
path: ../../../htdocs/core/class/html.formprojet.class.php
-
message: '#^Variable \$labeltoshow might not be defined\.$#'
identifier: variable.undefined
@ -6756,18 +6720,6 @@ parameters:
count: 2
path: ../../../htdocs/fourn/commande/card.php
-
message: '#^Variable \$line might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../../htdocs/fourn/commande/card.php
-
message: '#^Variable \$num might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/fourn/commande/card.php
-
message: '#^Right side of && is always false\.$#'
identifier: booleanAnd.rightAlwaysFalse
@ -6780,12 +6732,6 @@ parameters:
count: 2
path: ../../../htdocs/fourn/commande/dispatch.php
-
message: '#^Variable \$comment might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../../htdocs/fourn/commande/dispatch.php
-
message: '#^Variable \$product might not be defined\.$#'
identifier: variable.undefined
@ -7314,12 +7260,6 @@ parameters:
count: 1
path: ../../../htdocs/hrm/job_card.php
-
message: '#^Strict comparison using \=\=\= between array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\} and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: ../../../htdocs/hrm/job_list.php
-
message: '#^Comparison operation "\<" between int\<0, max\> and 0 is always false\.$#'
identifier: smaller.alwaysFalse
@ -7332,12 +7272,6 @@ parameters:
count: 1
path: ../../../htdocs/hrm/position.php
-
message: '#^Property Position\:\:\$fields \(array\<string, array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\}\>\) does not accept non\-empty\-array\<string, array\{\}\|array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\}\>\.$#'
identifier: assign.propertyType
count: 1
path: ../../../htdocs/hrm/position_agenda.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
@ -8226,12 +8160,6 @@ parameters:
count: 1
path: ../../../htdocs/modulebuilder/template/myobject_list.php
-
message: '#^Strict comparison using \=\=\= between array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\} and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: ../../../htdocs/modulebuilder/template/myobject_list.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
@ -8460,12 +8388,6 @@ parameters:
count: 1
path: ../../../htdocs/partnership/class/partnership.class.php
-
message: '#^Call to function property_exists\(\) with \$this\(Partnership\) and ''fk_soc'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/partnership/class/partnership.class.php
-
message: '#^Call to function property_exists\(\) with \$this\(Partnership\) and ''thirdparty'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
@ -8505,7 +8427,7 @@ parameters:
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
count: 2
count: 1
path: ../../../htdocs/partnership/class/partnership.class.php
-
@ -8538,12 +8460,6 @@ parameters:
count: 1
path: ../../../htdocs/partnership/partnership_card.php
-
message: '#^Variable \$adht might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/partnership/partnership_card.php
-
message: '#^Variable \$soc might not be defined\.$#'
identifier: variable.undefined
@ -8556,12 +8472,6 @@ parameters:
count: 1
path: ../../../htdocs/partnership/partnership_list.php
-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 2
path: ../../../htdocs/partnership/partnership_list.php
-
message: '#^Right side of && is always true\.$#'
identifier: booleanAnd.rightAlwaysTrue
@ -11586,12 +11496,6 @@ parameters:
count: 1
path: ../../../htdocs/webhook/target_card.php
-
message: '#^Strict comparison using \=\=\= between array\{type\: string, label\: string, langfile\?\: string, enabled\: int\<0, 2\>\|string, position\: int, notnull\?\: int, visible\: int\<\-6, 6\>\|string, alwayseditable\?\: int\<0, 1\>\|string, \.\.\.\} and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: ../../../htdocs/webhook/triggerhistory_list.php
-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse

View file

@ -89,7 +89,6 @@ return [
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanTypeMismatchArgument'],
'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
'htdocs/core/modules/holiday/mod_holiday_immaculate.php' => ['PhanTypeMismatchArgument'],

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* This is the phan config file used by .github/workflows/phan.yml
@ -279,6 +279,7 @@ return [
'dolibarr_main_db_encrypted_pass' => 'string',
'dolibarr_main_db_host' => 'string',
'dolibarr_main_db_pass' => 'string',
'dolibarr_main_db_type' => '?string',
'dolibarr_main_demo' => 'string',
'dolibarr_main_document_root' => 'string',
'dolibarr_main_url_root' => 'string',

View file

@ -3,7 +3,7 @@
* Copyright (C) 2015-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2015-2020 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Jose MARTINEZ <jose.martinez@pichinov.com>
* Copyright (C) 2025 Nicolas Barrouillet <nicolas@pragma-tech.fr>
*
@ -2947,7 +2947,7 @@ class BookKeeping extends CommonObject
$income_statement_amount = 0;
if (getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) {
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); // @phpstan-ignore argument.type
$pcg_type_filter = array();
foreach ($accounting_groups_used_for_income_statement as $item) {
@ -3073,8 +3073,8 @@ class BookKeeping extends CommonObject
}
if (!$error && is_object($journal)) {
$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen');
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen'); // @phpstan-ignore argument.type
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); // @phpstan-ignore argument.type
$pcg_type_filter = array();
$tmp = array_merge($accounting_groups_used_for_balance_sheet_account, $accounting_groups_used_for_income_statement);
@ -3217,8 +3217,8 @@ class BookKeeping extends CommonObject
$bookkeeping->subledger_label = null;
} else {
*/
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
$bookkeeping->subledger_account = null;
$bookkeeping->subledger_label = null;
//}
$bookkeeping->numero_compte = $accountingaccount->account_number;
@ -3422,16 +3422,20 @@ class BookKeeping extends CommonObject
$echecT = [];
foreach ($toselect as $id) {
if ($bookkeeping->fetch($id)) {
if ( !getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')) {
if (!getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')) {
$accountcustcode = '411';
} else $accountcustcode = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER');
} else {
$accountcustcode = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER');
}
if ( !getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) {
if (!getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) {
$accountsuppcode = '401';
} else $accountsuppcode = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER');
} else {
$accountsuppcode = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER');
}
if (strpos($bookkeeping->numero_compte, $accountcustcode) === 0 || strpos($bookkeeping->numero_compte, $accountsuppcode) === 0) {
$echecT[]=$bookkeeping->numero_compte;
$echecT[] = $bookkeeping->numero_compte;
continue;
}
@ -3468,7 +3472,10 @@ class BookKeeping extends CommonObject
if (!empty($echecImplode)) {
$nbEchec = count(explode(',', $echecImplode));
setEventMessages($nbEchec == 1 ? $langs->trans('NoAccountChangedWithAccountNumber') . ' ' . $echecImplode : $langs->trans('NoAccountsChangedWithAccountNumber') . ' ' . $echecImplode, null, 'errors'
setEventMessages(
$nbEchec == 1 ? $langs->trans('NoAccountChangedWithAccountNumber') . ' ' . $echecImplode : $langs->trans('NoAccountsChangedWithAccountNumber') . ' ' . $echecImplode,
null,
'errors'
);
}
@ -3731,7 +3738,6 @@ class BookKeeping extends CommonObject
* @param string $code_journal Accounting journal code
* @param int $docdate Date of the document
* @return int int Return integer -1 if KO, 1 if OK
*
*/
public function newReturnAccount(array $toselect, $code_journal, $docdate)
{
@ -3753,7 +3759,7 @@ class BookKeeping extends CommonObject
$alreadyExtourneT = array();
if ($resqlAlreadyExtourne) {
while ($obj4 = $this->db->fetch_object($resqlAlreadyExtourne)) {
$alreadyExtourneT []= $obj4->piece_num;
$alreadyExtourneT [] = $obj4->piece_num;
}
}

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2019-2023 Open-DSI <support@open-dsi.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -122,8 +122,8 @@ if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) {
}
}
$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen');
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen');
$accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen'); // @phpstan-ignore argument.type
$accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); // @phpstan-ignore argument.type
/*

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -198,7 +198,7 @@ if ($action == 'create') {
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
}
if (GETPOSTISSET('supplier_invoice_id')) {
$object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => 1, 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',);
$object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => 1, 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => 1,);
print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOSTINT('supplier_invoice_id') . '">';
}

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -282,9 +282,6 @@ foreach ($search as $key => $val) {
continue;
}
$field_spec = $object->fields[$key];
if ($field_spec === null) {
continue;
}
$mode_search = (($object->isInt($field_spec) || $object->isFloat($field_spec)) ? 1 : 0);
if ((strpos($field_spec['type'], 'integer:') === 0) || (strpos($field_spec['type'], 'sellist:') === 0) || !empty($field_spec['arrayofkeyval'])) {
if ($search[$key] == '-1' || ($search[$key] === '0' && !isset($field_spec['arrayofkeyval']['0']))) {

View file

@ -9,7 +9,7 @@
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -332,7 +332,7 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes' && $userc
//$object->fetch($id);
if (!empty($object->socpeopleassigned)) {
reset($object->socpeopleassigned);
$object->contact_id = key($object->socpeopleassigned);
$object->contact_id = (int) key($object->socpeopleassigned);
}
$result = $object->createFromClone($user, GETPOSTINT('socid'));
if ($result > 0) {
@ -980,7 +980,7 @@ if (empty($reshook) && $action == 'update' && $usercancreate) {
$object->contact_id = GETPOSTINT("contactid");
if (empty($object->contact_id) && !empty($object->socpeopleassigned)) {
reset($object->socpeopleassigned);
$object->contact_id = key($object->socpeopleassigned);
$object->contact_id = (int) key($object->socpeopleassigned);
}
$object->fk_project = GETPOSTINT("projectid");
$taskid = GETPOSTINT('taskid');
@ -1583,7 +1583,7 @@ if ($action == 'create') {
*/
// limit date
$repeateventlimitdate = empty($repeateventlimitdate) ? (dol_now() + ((24 * 3600 * 365) + 1)) : $repeateventlimitdate;
$repeateventlimitdate = empty($repeateventlimitdate) ? (dol_now() + ((24 * 3600 * 365) + 1)) : $repeateventlimitdate;
print '<div class="hidden marginrightonly inline-block repeateventlimitdate">';
print $langs->trans("Until")." ";

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007-2024 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -131,11 +131,11 @@ foreach ($object->fields as $key => $val) {
if (!empty($val['visible'])) {
$visible = (int) dol_eval((string) $val['visible'], 1);
$arrayfields[$tableprefix.'.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? '0' : '1'),
'enabled'=>(string) (int) (abs($visible) != 3 && (bool) dol_eval((string) $val['enabled'], 1)),
'position'=>$val['position'],
'help'=> isset($val['help']) ? $val['help'] : ''
'label' => $val['label'],
'checked' => (($visible < 0) ? '0' : '1'),
'enabled' => (string) (int) (abs($visible) != 3 && (bool) dol_eval((string) $val['enabled'], 1)),
'position' => $val['position'],
'help' => isset($val['help']) ? $val['help'] : ''
);
}
}
@ -266,9 +266,6 @@ foreach ($search as $key => $val) {
continue;
}
$field_spec = $object->fields[$key];
if ($field_spec === null) {
continue;
}
$mode_search = (($object->isInt($field_spec) || $object->isFloat($field_spec)) ? 1 : 0);
if ((strpos($field_spec['type'], 'integer:') === 0) || (strpos($field_spec['type'], 'sellist:') === 0) || !empty($field_spec['arrayofkeyval'])) {
if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($field_spec['arrayofkeyval']) || !array_key_exists('0', $field_spec['arrayofkeyval'])))) {
@ -299,7 +296,7 @@ foreach ($search as $key => $val) {
}
} else {
if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
$columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key);
$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
if (preg_match('/_dtstart$/', $key)) {
$sql .= " AND t.".$db->sanitize($columnName)." >= '".$db->idate($search[$key])."'";
@ -468,8 +465,8 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
$permforcashfence = 1;
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permforcashfence);
@ -579,7 +576,7 @@ foreach ($object->fields as $key => $val) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -623,7 +620,7 @@ foreach ($object->fields as $key => $val) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -809,7 +806,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -1156,6 +1156,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
$objecttmp = new $objectclass($db);
$nbok = 0;
$nbignored = 0;
/** @var string[] $TMsg */
$TMsg = array();
//$toselect could contain duplicate entries, cf https://github.com/Dolibarr/dolibarr/issues/26244
@ -2008,9 +2009,15 @@ if (!$error && $action == 'createcreditnote' && $permissiontoadd) {
// We check if invoice type is supported. If not, we refuse to create credit note.
$isSupportedType = false;
if ($objecttmp->type == Facture::TYPE_STANDARD) $isSupportedType = true;
if ($objecttmp->type == Facture::TYPE_PROFORMA) $isSupportedType = true;
if ($objecttmp->type == Facture::TYPE_DEPOSIT && !getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) $isSupportedType = true;
if ($objecttmp->type == Facture::TYPE_STANDARD) {
$isSupportedType = true;
}
if ($objecttmp->type == Facture::TYPE_PROFORMA) {
$isSupportedType = true;
}
if ($objecttmp->type == Facture::TYPE_DEPOSIT && !getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
$isSupportedType = true;
}
if (!$isSupportedType) {
$listtype = array(

View file

@ -132,7 +132,7 @@ $sharedentities = getEntity(strtolower($objecttmp->element));
$filter = str_replace(
array('__ENTITY__', '__SHARED_ENTITIES__', '__USER_ID__', '$ID$'),
array($conf->entity, $sharedentities, $user->id, $id),
array((string) $conf->entity, $sharedentities, (string) $user->id, (string) $id),
$filter
);

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Charles-Fr BENKE <charles.fr@benke.fr>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_actions extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Charles-Fr BENKE <charles.fr@benke.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_actions_future extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_activity extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_birthdays extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_birthdays_members extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_boms extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -40,7 +40,7 @@ class box_bookmarks extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_clients extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_commandes extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_comptes extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -5,7 +5,7 @@
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2020 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_contacts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_contracts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_dolibarr_state_board extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
$this->db = $db;
}

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -42,7 +42,7 @@ class box_factures extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -43,7 +43,7 @@ class box_factures_fourn extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -42,7 +42,7 @@ class box_factures_fourn_imp extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@ -46,7 +46,7 @@ class box_factures_imp extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_ficheinter extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_fournisseurs extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_funnel_of_prospection extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user, $langs;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_goodcustomers extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -41,7 +41,7 @@ class box_graph_invoices_peryear extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_graph_nb_tickets_type extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_graph_orders_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_graph_product_distribution extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -43,7 +43,7 @@ class box_graph_propales_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_graph_ticket_by_severity extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -56,7 +56,7 @@ class box_last_knowledgerecord extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->loadLangs(array("boxes", "languages"));

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -56,7 +56,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->loadLangs(array("boxes", "knowledgemanagement", "languages"));

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_last_modified_ticket extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_last_ticket extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $langs;
$langs->load("boxes");

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_lastlogin extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
$this->db = $db;
}

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_members_by_tags extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -47,7 +47,7 @@ class box_members_by_type extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_members_last_modified extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;
@ -140,7 +140,7 @@ class box_members_last_modified extends ModeleBoxes
'td' => 'class="right" width="18"',
'text' => $memberstatic->LibStatut($data['status'], $data['need_subscription'], $data['date_end_subscription'], 3),
);
$line ++;
$line++;
}
if ($num == 0) {

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_members_last_subscriptions extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_mos extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -45,7 +45,7 @@ class box_produits extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -47,7 +47,7 @@ class box_produits_alerte_stock extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_project extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user, $langs;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -46,7 +46,7 @@ class box_project_opportunities extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user, $langs;

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -45,7 +45,7 @@ class box_propales extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -48,7 +48,7 @@ class box_prospect extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2017 Nicolas Zabouri <info@inovea-conseil.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_scheduled_jobs extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -44,7 +44,7 @@ class box_services_contracts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -41,7 +41,7 @@ class box_services_expired extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -44,7 +44,7 @@ class box_shipments extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -42,7 +42,7 @@ class box_supplier_orders extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -42,7 +42,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param)
public function __construct($db, $param) // @phpstan-ignore constructor.unusedParameter
{
global $user;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -48,7 +48,7 @@ class box_task extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $user, $langs;

View file

@ -5,7 +5,7 @@
* Copyright (C) 2016 Juan José Menent <jmenent@2byte.es>
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -50,7 +50,7 @@ class box_validated_projects extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
global $conf, $user, $langs;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -52,12 +52,12 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
public $param;
/**
* @var array<array{text:string,nbcol?:int,limit?:int,graph?:int<0,1>,sublink?:string,subtext?:string,picto?:string,target?:string,td?:string}>|array{text:string,nbcol?:int,limit?:int,graph?:int<0,1>,sublink?:string,subtext?:string,picto?:string,target?:string,td?:string} box info heads. Example: array('text' => $langs->trans("BoxScheduledJobs", $max), 'nbcol' => 4);
* @var array<array{text:string,nbcol?:int,limit?:int,graph?:int<0,1>,sublink?:string,subtext?:string,picto?:string,target?:string,td?:string}>|array{text:string,nbcol?:int,limit?:int,graph?:int<0,1>,sublink?:string,subtext?:string,picto?:string,target?:string,td?:string} box info heads. Example: array('text' =>->trans("BoxScheduledJobs",), 'nbcol' => 4);
*/
public $info_box_head = array();
/**
* @var array<array<array{td?:string,text:string,asis?:int<0,1>,maxlength?:int}>>|array<array{td?:string,text:string,asis?:int<0,1>,maxlength?:int}> box info content
* @var array<array<array{td?:string,text:string,asis?:int<0,1>,maxlength?:int}|array{td?:string,textnoformat:string,asis?:int<0,1>,maxlength?:int}>>|array<array{td?:string,text:string,asis?:int<0,1>,maxlength?:int}|array{td?:string,textnoformat:string,asis?:int<0,1>,maxlength?:int}> box info content
*/
public $info_box_contents = array();
@ -175,7 +175,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
public function __construct($db, $param = '')
public function __construct($db, $param = '') // @phpstan-ignore constructor.unusedParameter
{
$this->db = $db;
}
@ -487,7 +487,6 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
*
* @param ?string[] $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only.
* @return array<array{picto:string,file:string,fullpath:string,relpath:string,iscoreorexternal:'external'|'internal',version:string,status:string,info:string}> Array list of widgets
*
*/
public static function getWidgetsList($forcedirwidget = null)
{

View file

@ -4,7 +4,7 @@
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2023 Nick Fragoulis
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@ -615,7 +615,7 @@ abstract class CommonInvoice extends CommonObject
// List of payments
if (empty($mode) || $mode == 1) {
$sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".($field3 ? ", ".$this->db->sanitize($field3) : "") . ($field4 ? ", ".$this->db->sanitize($field4) : "");
$sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".($field3 ? ", ".$this->db->sanitize($field3) : "") . (", ".$this->db->sanitize($field4));
$sql .= " FROM ".$this->db->prefix().$table." as pf, ".$this->db->prefix().$table2." as p, ".$this->db->prefix()."c_paiement as t";
$sql .= " WHERE pf.".$this->db->sanitize($field)." = ".((int) $this->id);
$sql .= " AND pf.".$this->db->sanitize($field2)." = p.rowid";
@ -734,7 +734,7 @@ abstract class CommonInvoice extends CommonObject
// If not a draft invoice and not temporary invoice
if ($tmppart !== 'PROV') {
if ($this instanceOf Facture) {
if ($this instanceof Facture) {
/* @var Facture $this */
// If sent by email, we refuse
if ((int) $this->email_sent_counter > 0) {
@ -906,7 +906,7 @@ abstract class CommonInvoice extends CommonObject
// If not a draft invoice and not temporary invoice
if ($tmppart !== 'PROV') {
if ($this instanceOf Facture) {
if ($this instanceof Facture) {
/* @var Facture $this */
// If sent by email, we refuse
if ((int) $this->email_sent_counter > 0) {
@ -1253,7 +1253,7 @@ abstract class CommonInvoice extends CommonObject
'paye' => $paye,
'alreadypaid' => $alreadypaid,
'type' => $type,
'paramsBadge'=>& $paramsBadge
'paramsBadge' => & $paramsBadge
);
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook
@ -1438,7 +1438,7 @@ abstract class CommonInvoice extends CommonObject
$sql .= " AND type = 'ban'"; // To exclude record done for some online payments
$sql .= " AND traite = 0"; // Not yet in a transfer receipt
dol_syslog(get_class($this)."::demande_prelevement - get pending requests not yet in receipt", LOG_DEBUG);
$resql= $this->db->query($sql);
$resql = $this->db->query($sql);
if ($resql) {
$obj = $this->db->fetch_object($resql);
$total_already_requested += $obj ? (float) $obj->total_requested : 0;

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 Gaëtan MAISON <gm@ilad.org>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -112,7 +112,7 @@ class DolEditor
* @param array{x?:string,y?:string,find?:string} $poscursor Array for initial cursor position array('x'=>x, 'y'=>y).
* array('find'=> 'word') can be used to go to line were the word has been found
*/
public function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $notused = '', $toolbarstartexpanded = false, $uselocalbrowser = -1, $okforextendededitor = true, $rows = 0, $cols = '', $readonly = 0, $poscursor = array())
public function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $notused = '', $toolbarstartexpanded = false, $uselocalbrowser = -1, $okforextendededitor = true, $rows = 0, $cols = '', $readonly = 0, $poscursor = array()) // @phpstan-ignore constructor.unusedParameter
{
global $conf;

View file

@ -266,7 +266,7 @@ class FormMail extends Form
public $withtoccuser = array();
/**
* @var ModelMail[]
* @var CEmailTemplate[]
*/
public $lines_model;

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -569,7 +569,7 @@ class Menubase
foreach ($tabMenu as $key => $val) {
// Define menutopid of mainmenu
if (empty($menutopid) && $val['type'] == 'top' && $val['mainmenu'] == $mainmenu) {
$menutopid = $val['rowid'];
$menutopid = (int) $val['rowid'];
break;
}
}

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2011 Regis Houssin
* Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -143,7 +143,7 @@ class SMTPs
private $_msgSensitivity = 0;
/**
* @var string[] Message Sensitivity
* @var array<string|false> Message Sensitivity
*/
private $_arySensitivity = array(false,
'Personal',
@ -151,7 +151,7 @@ class SMTPs
'Company Confidential');
/**
* @var int Message Sensitivity
* @var int<0,5> Message Sensitivity
* Defaults to 3 - Normal
*/
private $_msgPriority = 3;

View file

@ -59,7 +59,7 @@ class DoliDBMysqli extends DoliDB
* @param string $name Name of database
* @param int $port Port of database server
*/
public function __construct($type, $host, $user, $pass, $name = '', $port = 0)
public function __construct($type, $host, $user, $pass, $name = '', $port = 0) // @phpstan-ignore constructor.unusedParameter
{
global $conf, $langs;
@ -1368,7 +1368,7 @@ if (class_exists('mysqli')) {
* @param int $port Port of database server
* @param string $socket Socket
*/
public function __construct($host, $user, $pass, $name, $port = 0, $socket = "")
public function __construct($host, $user, $pass, $name, $port = 0, $socket = "") // @phpstan-ignore constructor.unusedParameter
{
$flags = 0;
if (PHP_VERSION_ID >= 80100) {

View file

@ -78,7 +78,7 @@ class DoliDBPgsql extends DoliDB
* @param string $name Nom de la database
* @param int $port Port of database server
*/
public function __construct($type, $host, $user, $pass, $name = '', $port = 0)
public function __construct($type, $host, $user, $pass, $name = '', $port = 0) // @phpstan-ignore constructor.unusedParameter
{
global $conf, $langs;

View file

@ -67,7 +67,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $name Nom de la database
* @param int $port Port of database server
*/
public function __construct($type, $host, $user, $pass, $name = '', $port = 0)
public function __construct($type, $host, $user, $pass, $name = '', $port = 0) // @phpstan-ignore constructor.unusedParameter
{
global $conf;

View file

@ -37,12 +37,12 @@
* @param string $urloption More parameters on URL request
* @param int $minLength Minimum number of chars to trigger that Ajax search
* @param int $autoselect Automatic selection if just one value (trigger("change") on field is done if search return only 1 result)
* @param array<string,string|string[]> $ajaxoptions Multiple options array
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
* - Ex: array('disabled'=> )
* - Ex: array('show'=> )
* - Ex: array('update_textarea'=> )
* - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
* @param array<string,string|array<int|string,string>> $ajaxoptions Multiple options array
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
* - Ex: array('disabled'=> )
* - Ex: array('show'=> )
* - Ex: array('update_textarea'=> )
* - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
* @param string $moreparams More params provided to ajax call
* @return string Script
*/

View file

@ -4,7 +4,7 @@
* Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2024 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -31,7 +31,7 @@
/**
* Return an array with timezone values
*
* @return array<int<-11,13>,string> Array with timezone values
* @return array<int<-11,14>,string> Array with timezone values
*/
function get_tz_array()
{

View file

@ -5,7 +5,7 @@
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Nick Fragoulis
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
@ -960,7 +960,7 @@ class pdf_espadon extends ModelePdfExpedition
}
if ($this->getColumnStatus('qty_shipped') && $totalToShip) {
$this->printStdColumnContent($pdf, $tab2_top, 'qty_shipped', $totalToShip);
$this->printStdColumnContent($pdf, $tab2_top, 'qty_shipped', (string) $totalToShip);
}
if ($this->getColumnStatus('totalexcltax')) {

View file

@ -12,7 +12,7 @@
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2022-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2022-2024 Eric Seigne <eric.seigne@cap-rel.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 Nick Fragoulis
* Copyright (C) 2026 Vincent Maury <vmaury@timgroup.fr>
*
@ -1769,9 +1769,11 @@ class pdf_octopus extends ModelePDFFactures
$this->atleastoneratenotnull = 0;
if (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) {
$tvaisnull = false;
if (!empty($this->tva_array) && count($this->tva_array) == 1 ) {
if (!empty($this->tva_array) && count($this->tva_array) == 1) {
$tva_el = reset($this->tva_array);
if ($tva_el['vatrate'] == '0.000' && is_float($tva_el['amount'])) $tvaisnull = true;
if ($tva_el['vatrate'] == '0.000' && is_float($tva_el['amount'])) {
$tvaisnull = true;
}
}
if (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL') && $tvaisnull) {
// Nothing to do
@ -2818,13 +2820,17 @@ class pdf_octopus extends ModelePDFFactures
$salereparray = $object->thirdparty->getSalesRepresentatives($user);
$salerepobj = new User($this->db);
$salerepobj->fetch($salereparray[0]['id']);
if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
if (!empty($salerepobj->signature)) {
$notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
}
}
}
// Extrafields in note
$extranote = $this->getExtrafieldsInHtml($object, $outputlangs);
if (!empty($extranote)) $notetoshow = dol_concatdesc((string) $notetoshow, $extranote);
if (!empty($extranote)) {
$notetoshow = dol_concatdesc((string) $notetoshow, $extranote);
}
if ($notetoshow) {
$tab_top -= 2;
@ -3149,10 +3155,10 @@ class pdf_octopus extends ModelePDFFactures
/**
* Calculates the sum of two arrays, key by key, taking into account nested arrays
*
* @param array<int|string,int|float|mixed[]> $a [$a description]
* @param array<int|string,int|float|mixed[]> $b [$b description]
* @param array<int|string,float|Facture|array<float|Facture>> $a [$a description]
* @param array<int|string,float|Facture|array<float|Facture>> $b [$b description]
*
* @return array<int|string,int|float|mixed[]> [return description]
* @return array<int|string,float|Facture|array<float|Facture>> [return description]
*/
public function sumSituation($a, $b)
{

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2018 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -246,8 +246,8 @@ class CdavLib
* getFullCalendarObjects
*
* @param int $calendarId Calendar id
* @param int $bCalendarData Add calendar data
* @return array|string[][]
* @param int<0,1> $bCalendarData Add calendar data if not 0
* @return array<array<string,int|string|false>>
*/
public function getFullCalendarObjects($calendarId, $bCalendarData)
{

View file

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*/
/**
* Simple autoloader, so we don't need Composer just for this.
@ -13,6 +13,7 @@ spl_autoload_register(
* @return bool If class could be loaded
*/
static function ($class) {
// @phpstan-ignore argument.type
if (preg_match('/^DebugBar/', $class)) {
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
//var_dump($class.' - '.file_exists($file).' - '.$file);

View file

@ -14,7 +14,7 @@
* Copyright (C) 2021 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 Solution Libre SAS <contact@solution-libre.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2025 Noé Cendrier <noe.cendrier@altairis.fr>
*
@ -1721,7 +1721,7 @@ class CommandeFournisseur extends CommonOrder
$line->rang, // rang
$line->special_code,
isset($line->label) ? $line->label : ''
);
);
if ($result < 0) {
dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functional error
$this->db->rollback();
@ -2188,7 +2188,7 @@ class CommandeFournisseur extends CommonOrder
// VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts,
// and this is done at the line level, which has its own VAT rate
$tabprice = calcul_price_total((float) $qty, $pu, $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, (float) $pu_ht_devise);
$tabprice = calcul_price_total((float) $qty, $pu, (float) $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, (float) $pu_ht_devise);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];

View file

@ -15,7 +15,7 @@
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2023 Nick Fragoulis
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -2243,7 +2243,7 @@ class FactureFournisseur extends CommonInvoice
// VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts,
// and this is done at the line level, which has its own VAT rate
$tabprice = calcul_price_total((float) $qty, $pu, $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_devise);
$tabprice = calcul_price_total((float) $qty, $pu, (float) $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_devise);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
$total_ttc = $tabprice[2];
@ -3267,7 +3267,7 @@ class FactureFournisseur extends CommonInvoice
if (!$error) {
// Hook of thirdparty module
if (is_object($hookmanager)) {
$parameters = array('objFrom'=>$objFrom);
$parameters = array('objFrom' => $objFrom);
$action = '';
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -816,12 +816,12 @@ if (empty($reshook)) {
//exit;
// Replacement invoice
if (GETPOSTINT('type') === '') {
if (GETPOST('type') === '') {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
$error++;
}
if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) {
if (GETPOSTINT('type') == FactureFournisseur::TYPE_REPLACEMENT) {
if (empty($dateinvoice)) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
$action = 'create';
@ -876,7 +876,7 @@ if (empty($reshook)) {
}
// Credit note invoice
if (GETPOST('type') == FactureFournisseur::TYPE_CREDIT_NOTE) {
if (GETPOSTINT('type') == FactureFournisseur::TYPE_CREDIT_NOTE) {
$sourceinvoice = GETPOSTINT('fac_avoir');
if (!($sourceinvoice > 0) && !getDolGlobalString('INVOICE_CREDIT_NOTE_STANDALONE')) {
$error++;
@ -999,7 +999,7 @@ if (empty($reshook)) {
}
}
}
} elseif ($fac_recid > 0 && (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT)) {
} elseif ($fac_recid > 0 && (GETPOSTINT('type') == FactureFournisseur::TYPE_STANDARD || GETPOSTINT('type') == FactureFournisseur::TYPE_DEPOSIT)) {
// Standard invoice or Deposit invoice, created from a Predefined template invoice
if (empty($dateinvoice)) {
$error++;
@ -1019,7 +1019,7 @@ if (empty($reshook)) {
if (!$error) {
$object->socid = GETPOSTINT('socid');
$object->type = GETPOST('type', 'alphanohtml');
$object->type = GETPOSTINT('type');
$object->subtype = GETPOSTINT('subtype');
$object->ref = GETPOST('ref', 'alphanohtml');
$object->date = $dateinvoice;
@ -1046,7 +1046,7 @@ if (empty($reshook)) {
$id = $object->create($user); // This include recopy of links from recurring invoice and recurring invoice lines
}
} elseif ($fac_recid <= 0 && (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT)) {
} elseif ($fac_recid <= 0 && (GETPOSTINT('type') == FactureFournisseur::TYPE_STANDARD || GETPOSTINT('type') == FactureFournisseur::TYPE_DEPOSIT)) {
// Standard invoice or Deposit invoice, not from a Predefined template invoice
if (GETPOSTINT('socid') < 1) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors');
@ -1083,7 +1083,7 @@ if (empty($reshook)) {
// Creation invoice
$object->socid = GETPOSTINT('socid');
$object->type = GETPOST('type', 'alphanohtml');
$object->type = GETPOSTINT('type');
$object->subtype = GETPOSTINT('subtype');
$object->ref = GETPOST('ref', 'alphanohtml');
$object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml');
@ -1184,7 +1184,7 @@ if (empty($reshook)) {
// If deposit invoice - down payment with 1 line (fixed amount or percent)
$typeamount = GETPOST('typedeposit', 'alpha');
if (GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) {
if (GETPOSTINT('type') == FactureFournisseur::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) {
$valuedeposit = price2num(GETPOST('valuedeposit', 'alpha'), 'MU');
// Define the array $amountdeposit
@ -1499,7 +1499,7 @@ if (empty($reshook)) {
$type = $prod->type;
} else {
$label = GETPOST('product_desc', 'restricthtml');
$type = GETPOST("type") ? GETPOST("type") : 0;
$type = GETPOSTINT("type");
}
$date_start = dol_mktime(GETPOSTINT('date_starthour'), GETPOSTINT('date_startmin'), GETPOSTINT('date_startsec'), GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear'));
@ -1667,7 +1667,7 @@ if (empty($reshook)) {
setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPrice'), $langs->transnoentitiesnoconv('Qty')), null, 'errors');
$error++;
}
if ($prod_entry_mode == 'free' && (!GETPOST('idprodfournprice') || GETPOST('idprodfournprice') == '-1') && GETPOST('type') < 0) {
if ($prod_entry_mode == 'free' && (!GETPOST('idprodfournprice') || GETPOST('idprodfournprice') == '-1') && GETPOSTINT('type') < 0) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors');
$error++;
}
@ -2610,7 +2610,7 @@ if ($action == 'create') {
print '<!-- replacement line -->';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOSTINT('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled';
$tmp.='> ';
print '<script type="text/javascript">
@ -2681,7 +2681,7 @@ if ($action == 'create') {
}
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" id="radio_creditnote" name="type" value="2"'.(GETPOST('type') == 2 ? ' checked' : '');
$tmp = '<input type="radio" id="radio_creditnote" name="type" value="2"'.(GETPOSTINT('type') == 2 ? ' checked' : '');
if (!$optionsav && !getDolGlobalString('INVOICE_CREDIT_NOTE_STANDALONE')) {
$tmp .= ' disabled';
}

View file

@ -5,7 +5,7 @@
* Copyright (C) 2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -156,13 +156,13 @@ if (empty($reshook)) {
$typeleaves = $holiday->getTypes(1, 1);
$userID = array_keys(GETPOST('update_cp'));
$userID = $userID[0];
$userID = array_keys(GETPOST('update_cp', 'array:int'));
$userID = (int) $userID[0];
$db->begin();
foreach ($typeleaves as $key => $val) {
$userValue = GETPOST('nb_holiday_'.$val['rowid']);
$userValue = GETPOST('nb_holiday_'.$val['rowid'], 'array');
$userValue = $userValue[$userID];
if (!empty($userValue) || (string) $userValue == '0') {

View file

@ -5,7 +5,7 @@
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -266,9 +266,6 @@ foreach ($search as $key => $val) {
continue;
}
$field_spec = $object->fields[$key];
if ($field_spec === null) {
continue;
}
$mode_search = (($object->isInt($field_spec) || $object->isFloat($field_spec)) ? 1 : 0);
if ((strpos($field_spec['type'], 'integer:') === 0) || (strpos($field_spec['type'], 'sellist:') === 0) || !empty($field_spec['arrayofkeyval'])) {
if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($field_spec['arrayofkeyval']) || !array_key_exists('0', $field_spec['arrayofkeyval'])))) {

View file

@ -5,6 +5,7 @@
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -239,7 +240,7 @@ if ($object->id > 0) {
$filters['search_agenda_label'] = $search_agenda_label;
$filters['search_rowid'] = $search_rowid;
$object->fields['label'] = array(); // Useful to get only agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly)
$object->fields['label'] = array('type' => 'varchar(128)', 'label' => 'Label', 'enabled' => 0, 'position' => 30, 'visible' => -1); // Useful to get only agenda events linked to position (this object doesn't need label of ref field, but show_actions_done() needs it to work correctly) - dummy but "valid" fields entry
// TODO Replace this with same code than into list.php
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module);

View file

@ -503,7 +503,7 @@ if ($action == "set") { // Test on permission not required. Already managed by
}
//print 'x'.$file.'-'.$createdata.'<br>';
if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i', $file)) {
if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i', $file)) { // @phpstan-ignore argument.invalidPregQuote
$tablefound++;
$tabledata[] = $file;
}

View file

@ -4381,7 +4381,7 @@ function migrate_delete_old_dir($db, $langs, $conf)
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @param array<string,'noboxes'|'newboxdefonly'|'forceactivate'> $listofmodule List of modules, like array('MODULE_KEY_NAME'=>$reloadmode, ...)
* @param array<string,'noboxes'|'menuonly'|'newboxdefonly'|'forceactivate'> $listofmodule List of modules, like array('MODULE_KEY_NAME'=>$reloadmode, ...)
* @param int<0,1> $force 1=Reload module even if not already loaded
* @return int Return integer <0 if KO, >0 if OK
*/
@ -4579,7 +4579,7 @@ function migrate_productlot_path()
$resql = $db->query($sql);
if ($resql) {
$modulepart="product_batch";
$modulepart = "product_batch";
$lot = new Productlot($db);
@ -5585,7 +5585,8 @@ function migrate_apiresttokens()
while ($obj = $db->fetch_object($result)) {
if (!in_array(dolDecrypt($obj->tokenstring), $allexistingtokens)) {
// Load the object of the user of token so we can get the API_COUNT_CALL
unset($tmpuser->conf); $tmpuser->conf = new stdClass();
unset($tmpuser->conf);
$tmpuser->conf = new stdClass();
$tmpuser->fetch((int) $obj->fk_user, '', '', 1, ($obj->entity ? $obj->entity : $conf->entity));
$sqlforinsert = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, tokenstring, fk_user, datec, entity, apicount_total)";

View file

@ -345,9 +345,7 @@ foreach ($search as $key => $val) {
continue;
}
$field_spec = $object->fields[$key];
if ($field_spec === null) {
continue;
}
// Ignore false positive @phan-suppress-next-line PhanTypeMismatchArgumentNullable
$mode_search = (($object->isInt($field_spec) || $object->isFloat($field_spec)) ? 1 : 0);
if ((strpos($field_spec['type'], 'integer:') === 0) || (strpos($field_spec['type'], 'sellist:') === 0) || !empty($field_spec['arrayofkeyval'])) {
if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($field_spec['arrayofkeyval']) || !array_key_exists('0', $field_spec['arrayofkeyval'])))) {

View file

@ -427,7 +427,7 @@ if (issetAndNoEmpty('choixjourajout')) {
$nbofchoice = count($_SESSION["totalchoixjour"]);
for ($i = 0; $i < $nbofchoice; $i++) {
$choixjourajout = GETPOST("choixjourajout");
if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $choixjourajout[0], $_SESSION["annee"])) {
if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], (int) $choixjourajout[0], $_SESSION["annee"])) {
$journeuf = false;
}
}
@ -436,9 +436,9 @@ if (issetAndNoEmpty('choixjourajout')) {
// If the validation is ok, add a field to the session variables that holds all the dates
if ($journeuf && issetAndNoEmpty('choixjourajout') === true) {
$choixjourajout = GETPOST("choixjourajout");
array_push($_SESSION["totalchoixjour"], dol_mktime(0, 0, 0, $_SESSION["mois"], $choixjourajout[0], $_SESSION["annee"]));
array_push($_SESSION["totalchoixjour"], dol_mktime(0, 0, 0, $_SESSION["mois"], (int) $choixjourajout[0], $_SESSION["annee"]));
sort($_SESSION["totalchoixjour"]);
$cle = array_search(dol_mktime(0, 0, 0, $_SESSION["mois"], $choixjourajout[0], $_SESSION["annee"]), $_SESSION["totalchoixjour"]);
$cle = array_search(dol_mktime(0, 0, 0, $_SESSION["mois"], (int) $choixjourajout[0], $_SESSION["annee"]), $_SESSION["totalchoixjour"]);
//On sauvegarde les heures deja entrées
for ($i = 0; $i < $cle; $i++) {
@ -479,7 +479,7 @@ if (issetAndNoEmpty('choixjourretrait')) {
for ($i = 0; $i < $nbofchoice; $i++) {
$choixjourretrait = GETPOST('choixjourretrait');
if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $choixjourretrait[0], $_SESSION["annee"])) {
if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], (int) $choixjourretrait[0], $_SESSION["annee"])) {
for ($j = $i; $j < $nbofchoice; $j++) {
$k = $j + 1;
$_SESSION["horaires$j"] = $_SESSION["horaires$k"];

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2021 NextGestion <contact@nextgestion.com>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -1034,10 +1034,10 @@ while ($i < $imaxinloop) {
} else {
print $object->thirdparty->town;
}
} elseif ($key == 'fk_soc_member' && $adherent->id > 0) {
} elseif ($key == 'fk_soc_member' && $adherent->id > 0) { // @phpstan-ignore greater.alwaysFalse,booleanAnd.alwaysFalse
print $adherent->getNomUrl(1);
} elseif ($key == 'fk_soc_dateend') {
if ($adherent->id > 0) {
if ($adherent->id > 0) { // @phpstan-ignore greater.alwaysFalse
$datefin = $adherent->datefin;
if ($datefin) {
print dol_print_date($datefin, 'day');

View file

@ -152,7 +152,23 @@ class FormProduct
$sql .= " HAVING sum(ps.reel) > ".((float) $stockMin);
}
}
$sql .= $this->db->order($orderBy);
$reorderBy = explode(',', $orderBy);
$arraysortfield = array();
$arraysortorder = array();
foreach ($reorderBy as $element) {
$elementKey = explode(' ', $element)[0];
if ($elementKey) {
$arraysortfield[] = $elementKey;
if (isset($element[1])) {
$arraysortorder[] = $element[1];
} else {
$arraysortorder[] = 'ASC';
}
}
}
$sortfield = implode(',', $arraysortfield);
$sortorder = implode(',', $arraysortorder);
$sql .= $this->db->order($sortfield, $sortorder);
dol_syslog(get_class($this).'::loadWarehouses', LOG_DEBUG);
$resql = $this->db->query($sql);

View file

@ -7,7 +7,7 @@
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -354,7 +354,7 @@ if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypa
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe')) {
require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/stripe-php/init.php, ...
/**
* @var array<strint,mixed> $stripearrayofkeys
* @var array<string,mixed> $stripearrayofkeys
* @var array<int,mixed> $stripearrayofkeysbyenv
*/
}
@ -1807,7 +1807,7 @@ if ($source == 'member' || $source == 'membersubscription') {
}
// Add hook to complete the form
// Add hook to complete the form
$parameters = array('mode' => 'renewal');
$reshook = $hookmanager->executeHooks('membershipNewSubscriptionPublicForm', $parameters, $object, $action);
if ($reshook < 0) {
@ -1818,7 +1818,7 @@ if ($source == 'member' || $source == 'membersubscription') {
// TODO Move this into previous hook
if (getDolGlobalString('MEMBER_NEWFORM_DOLIBARRTURNOVER') && $action != 'dopayment') {
$country_id = 0;
if ($member->thirdparty instanceOf Societe) {
if ($member->thirdparty instanceof Societe) {
$country_id = $member->thirdparty->country_id;
}
$checkednature = $member->morphy;
@ -1848,7 +1848,7 @@ if ($source == 'member' || $source == 'membersubscription') {
print '<input type="text" name="budget" id="budget" class="flat turnover right width100" value="'.GETPOST('budget').'"'.($action != 'dopayment' ? ' required autofocus' : '').'>';
} else {
$arraybudget = array('50' => '<= 100 000', '100' => '<= 200 000', '200' => '<= 500 000', '300' => '<= 1 500 000', '600' => '<= 3 000 000', '1000' => '<= 5 000 000', '2000' => '5 000 000+');
print $form->selectarray('budget', $arraybudget, GETPOSTINT('budget'), 1, 0, 0, ($checkednature === 'mor' ? 'required' :''), 0, 0, 0, '');
print $form->selectarray('budget', $arraybudget, GETPOSTINT('budget'), 1, 0, 0, ($checkednature === 'mor' ? 'required' : ''), 0, 0, 0, '');
}
print ' € or $';

View file

@ -2,6 +2,7 @@
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 Alice Adminson <myemail@mycompany.com>
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -270,9 +271,6 @@ foreach ($search as $key => $val) {
continue;
}
$field_spec = $object->fields[$key];
if ($field_spec === null) {
continue;
}
$mode_search = (($object->isInt($field_spec) || $object->isFloat($field_spec)) ? 1 : 0);
if ((strpos($field_spec['type'], 'integer:') === 0) || (strpos($field_spec['type'], 'sellist:') === 0) || !empty($field_spec['arrayofkeyval'])) {
if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($field_spec['arrayofkeyval']) || !array_key_exists('0', $field_spec['arrayofkeyval'])))) {