Skip to content

Commit

Permalink
FIX loading object (#32114)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zephyriony authored Nov 28, 2024
1 parent fc0e5c5 commit 38da445
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions htdocs/compta/facture/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 38da445

Please sign in to comment.