diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 74ae94c98ff05..45bc62aa1726f 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2017 Florian Henry * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -52,11 +52,11 @@ $accountingjournal = new AccountingJournal($db); $accountingaccount_number = GETPOST('accountingaccount_number', 'alphanohtml'); -$accountingaccount->fetch(null, $accountingaccount_number, true); +$accountingaccount->fetch(0, $accountingaccount_number, true); $accountingaccount_label = $accountingaccount->label; $journal_code = GETPOST('code_journal', 'alpha'); -$accountingjournal->fetch(null, $journal_code); +$accountingjournal->fetch(0, $journal_code); $journal_label = $accountingjournal->label; $subledger_account = GETPOST('subledger_account', 'alphanohtml'); diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index f9fc361d91d2b..3d55890919dbf 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -106,11 +106,11 @@ public function __construct($db) /** * Load an object from database * - * @param int $rowid Id of record to load - * @param string $journal_code Journal code + * @param int $rowid Id of record to load + * @param string|null $journal_code Journal code * @return int Return integer <0 if KO, Id of record if OK and found */ - public function fetch($rowid = null, $journal_code = null) + public function fetch($rowid = 0, $journal_code = null) { global $conf; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index fd8b669611781..fe70152b82b08 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -738,10 +738,10 @@ public function createStd(User $user, $notrigger = 0, $mode = '') /** * Load object in memory from the database * - * @param int $id Id object - * @param string $ref Ref - * @param string $mode Mode ('' or 'tmp_') - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param string|null $ref Ref + * @param string $mode Mode ('' or 'tmp_') + * @return int Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetch($id, $ref = null, $mode = '') { diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 14eb3942bf9de..f65e31ee823e2 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Regis Houssin * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2016 ATM Consulting - * Copyright (C) 2019-2021 Frédéric France + * Copyright (C) 2019-2024 Frédéric France * * 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 @@ -470,7 +470,7 @@ if ($num) { print '

'; print '