diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 593f511a41a..9958ff648de 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -4,6 +4,7 @@ * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2020 Andreu Bisquerra Gaya * Copyright (C) 2024 MDW + * Copyright (C) 2024 Abbes Bahfir * * 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 @@ -52,7 +53,7 @@ $templatename = GETPOST('templatename', 'alpha'); $templateid = GETPOSTINT('templateid'); $printer = new dolReceiptPrinter($db); - +$hookmanager->initHooks(array('receiptPrinter', 'globalcard')); if (!$mode) { $mode = 'config'; } @@ -530,6 +531,10 @@ if ($mode == 'template' && $user->admin) { print '{'.$key.'}'.$langs->trans($val).''; print ''; } + $reshook = $hookmanager->executeHooks('listReceiptPrinterTags', array(), $printer, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print ''; print ''; }