From e2c389a4a99fa9c7431b819186bc799e9000dfda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Sep 2021 14:23:21 +0200 Subject: [PATCH] Fix delete invoice --- htdocs/compta/facture/class/facture.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 08ca9b6bb53..a28838756d9 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2278,8 +2278,8 @@ class Facture extends CommonInvoice // Remove other links to the deleted invoice $sql = 'UPDATE '.MAIN_DB_PREFIX.'eventorganization_conferenceorboothattendee'; - $sql .= ' SET fk_facture = NULL'; - $sql .= ' WHERE fk_facture = '.((int) $rowid); + $sql .= ' SET fk_invoice = NULL'; + $sql .= ' WHERE fk_invoice = '.((int) $rowid); if (!$this->db->query($sql)) { $this->error = $this->db->error()." sql=".$sql;