From c582f060ec671d065241a3b8bbff67aaa65b98b5 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 21 Aug 2022 12:28:00 +0200 Subject: [PATCH] Fix hook in takepos.pay.php --- htdocs/takepos/pay.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index af6a4f79d71..7724deac838 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -1,6 +1,6 @@ - * Copyright (C) 2021 Thibault FOUCART +/* Copyright (C) 2018 Andreu Bisquerra + * Copyright (C) 2021-2022 Thibault FOUCART * * 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 @@ -42,6 +42,7 @@ if (!defined('NOREQUIREHTML')) { require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $langs->loadLangs(array("main", "bills", "cashdesk", "banks")); @@ -49,6 +50,8 @@ $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'); // $place $invoiceid = GETPOST('invoiceid', 'int'); +$hookmanager->initHooks(array('takepospay')); + if (empty($user->rights->takepos->run)) { accessforbidden(); }