mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New hook to print tags defined by module in receiptprinter.php (#29748)
New hook to print tags defined by module in receipt printer configuration page Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
b6801ba213
commit
2ced3a33df
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Abbes Bahfir <contact@ab1consult.com><bafbes@gmail.com>
|
||||
*
|
||||
* 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 '<td>{'.$key.'}</td><td>'.$langs->trans($val).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$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 '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user