From ab2d65ac778b57a09650d838e8ef67b0164ed2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 29 Nov 2022 22:42:47 +0100 Subject: [PATCH] Update line.php --- htdocs/compta/bank/line.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index cb10a7310c6..fb36378338d 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -7,7 +7,7 @@ * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify @@ -35,6 +35,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'compta', 'bills', 'other')); @@ -77,7 +78,7 @@ if (empty($user->rights->banque->lire) && empty($user->rights->banque->consolida } $hookmanager->initHooks(array('bankline')); - +$extrafields = new ExtraFields($db); /* * Actions @@ -302,6 +303,7 @@ if ($result) { $account = $acct->id; $bankline = new AccountLine($db); + $extrafields->fetch_name_optionals_label($bankline->element); $bankline->fetch($rowid, $ref); $links = $acct->get_url($rowid); @@ -601,6 +603,13 @@ if ($result) { print ""; } + // Other attributes + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $bankline, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook)) { + print $bankline->showOptionals($extrafields, 'create', $parameters); + } print ""; // Code to adjust value date with plus and less picto using an Ajax call instead of a full reload of page