From 38da445ff73e290d7ba4b9aa000835d0f5419ab9 Mon Sep 17 00:00:00 2001 From: Zephyriony <142790847+zephyriony@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:08:50 +0100 Subject: [PATCH] FIX loading object (#32114) Useless and unoptimized code: - Object already loaded at top of page, reloads a second time - Prevents object from being loaded with doActions hook, since it overwrites it --- htdocs/compta/facture/card.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 251485126bb94..027443ade23f4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4254,15 +4254,6 @@ function setRadioForTypeOfInvoice() { * Show object in view mode */ - $result = $object->fetch($id, $ref); - if ($result <= 0) { - dol_print_error($db, $object->error, $object->errors); - exit(); - } - - // fetch optionals attributes and labels - $extrafields->fetch_name_optionals_label($object->table_element); - if ($user->socid > 0 && $user->socid != $object->socid) { accessforbidden('', 0, 1); }