From 31ffa6bc69aa8b16cce3bba4f1534e0cee8ff8df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 18:43:16 +0200 Subject: [PATCH] FIX #11218 #11150 --- htdocs/core/class/discount.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 479a7a48367..678cfe446a0 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -230,6 +230,7 @@ class DiscountAbsolute $userid = $user->id; if (! ($userid > 0)) // For example when record is saved into an anonymous context with a not loaded object $user. { + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $tmpinvoice = new Facture($this->db); $tmpinvoice->fetch($this->fk_facture_source); $userid = $tmpinvoice->fk_user_author; // We use the author of invoice