From e4aafcf91e73c88fe4f309211e415dbd2e0dd352 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Aug 2021 18:43:33 +0200 Subject: [PATCH] Code comment --- htdocs/product/class/product.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 9bc127fdf14..773a10164ca 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2228,7 +2228,7 @@ class Product extends CommonObject * @param string $ref Ref of product/service to load * @param string $ref_ext Ref ext of product/service to load * @param string $barcode Barcode of product/service to load - * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead + * @param int $ignore_expression When module dynamicprices is on, ignores the math expression for calculating price and uses the db value instead * @param int $ignore_price_load Load product without loading prices arrays (when we are sure we don't need them) * @param int $ignore_lang_load Load product without loading language arrays (when we are sure we don't need them) * @return int <0 if KO, 0 if not found, >0 if OK @@ -2446,8 +2446,8 @@ class Product extends CommonObject $sql .= " WHERE entity IN (".getEntity('productprice').")"; $sql .= " AND price_level=".((int) $i); $sql .= " AND fk_product = ".((int) $this->id); - $sql .= " ORDER BY date_price DESC, rowid DESC"; - $sql .= " LIMIT 1"; + $sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line + $sql .= " LIMIT 1"; // Only the first one $resql = $this->db->query($sql); if ($resql) { $result = $this->db->fetch_array($resql);