diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 33ec278f6465d..2371f6ff59a71 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-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 @@ -314,7 +314,9 @@ } $author = new User($db); - if ($object->fk_user_author) { + if (!empty($object->user_creation_id)) { + $author->fetch($object->user_creation_id); + } elseif (!empty($object->fk_user_author)) { $author->fetch($object->fk_user_author); }