From 61ee3a9942838eb2aa63047dfc160c64dc4e4e68 Mon Sep 17 00:00:00 2001 From: Christian Humpel Date: Sun, 11 Dec 2022 16:32:48 +0100 Subject: [PATCH] Fix #23179 Fix sql updating query for private and public note. --- htdocs/product/class/product.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bebe5d5a98d..73c1ec92732 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -985,7 +985,8 @@ class Product extends CommonObject $this->ref = dol_string_nospecial(trim($this->ref)); $this->label = trim($this->label); $this->description = trim($this->description); - $this->note = (isset($this->note) ? trim($this->note) : null); + $this->note_private = (isset($this->note_private) ? trim($this->note_private) : null); + $this->note_public = (isset($this->note_public) ? trim($this->note_public) : null); $this->net_measure = price2num($this->net_measure); $this->net_measure_units = trim($this->net_measure_units); $this->weight = price2num($this->weight); @@ -1180,7 +1181,8 @@ class Product extends CommonObject $sql .= ", fk_state = ".($this->state_id > 0 ? (int) $this->state_id : 'null'); $sql .= ", lifetime = ".($this->lifetime > 0 ? (int) $this->lifetime : 'null'); $sql .= ", qc_frequency = ".($this->qc_frequency > 0 ? (int) $this->qc_frequency : 'null'); - $sql .= ", note = ".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : 'null'); + $sql .= ", note = ".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : 'null'); + $sql .= ", note_public = ".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : 'null'); $sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'"; if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";