From fc2786cd35197ff6fc53ef6cd30221b47c360fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 26 Aug 2025 04:34:21 +0200 Subject: [PATCH] fix missing fetch entity in don.class.php (#35075) --- htdocs/don/class/don.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index f8431d7130d..c5a1379668e 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -668,7 +668,7 @@ class Don extends CommonObject */ public function fetch($id, $ref = '') { - $sql = "SELECT d.rowid, d.datec, d.date_valid, d.tms as datem, d.datedon,"; + $sql = "SELECT d.rowid, d.entity, d.datec, d.date_valid, d.tms as datem, d.datedon,"; $sql .= " d.fk_soc as socid, d.firstname, d.lastname, d.societe, d.amount, d.fk_statut as status, d.address, d.zip, d.town, "; $sql .= " d.fk_country, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, d.email, d.phone, "; $sql .= " d.phone_mobile, d.fk_projet as fk_project, d.model_pdf,"; @@ -692,7 +692,8 @@ class Don extends CommonObject if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; + $this->id = $obj->rowid; + $this->entity = $obj->entity; $this->ref = $obj->rowid; $this->date_creation = $this->db->jdate($obj->datec); $this->datec = $this->db->jdate($obj->datec);