From fe4b1ff34dd5fbafca706271cf41109d7f0dfaec Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Tue, 27 May 2025 20:16:41 +0200 Subject: [PATCH] =?UTF-8?q?FIX=20modification=20de=20dates=20de=20pi=C3=A8?= =?UTF-8?q?ces=20comptables=20sur=20plusieurs=20entit=C3=A9s=20diff=C3=A9r?= =?UTF-8?q?entes=20(#34226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/accountancy/class/bookkeeping.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index db98ac28177..fc210f0310e 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1399,6 +1399,7 @@ class BookKeeping extends CommonObject */ public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '') { + global $conf; $error = 0; $this->db->begin(); @@ -1406,6 +1407,7 @@ class BookKeeping extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element.$mode; $sql .= " SET ".$field." = ".(is_numeric($value) ? ((float) $value) : "'".$this->db->escape($value)."'"); $sql .= " WHERE piece_num = ".((int) $piece_num); + $sql .= " AND entity = " . ((int) $conf->entity); $resql = $this->db->query($sql);