Corrected typo of PR #4444
This commit is contained in:
parent
9fd56df03f
commit
83263e242e
@ -1510,7 +1510,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " WHERE entity IN (".getEntity('productprice', 1).")";
|
$sql.= " WHERE entity IN (".getEntity('productprice', 1).")";
|
||||||
$sql.= " AND price_level=".$i;
|
$sql.= " AND price_level=".$i;
|
||||||
$sql.= " AND fk_product = '".$this->id."'";
|
$sql.= " AND fk_product = '".$this->id."'";
|
||||||
$sql.= " ORDER BY date_price, rowid DESC";
|
$sql.= " ORDER BY date_price DESC, rowid DESC";
|
||||||
$sql.= " LIMIT 1";
|
$sql.= " LIMIT 1";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -1571,7 +1571,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " price_base_type, tva_tx, tosell, price_by_qty, rowid";
|
$sql.= " price_base_type, tva_tx, tosell, price_by_qty, rowid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_price";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_price";
|
||||||
$sql.= " WHERE fk_product = '".$this->id."'";
|
$sql.= " WHERE fk_product = '".$this->id."'";
|
||||||
$sql.= " ORDER BY date_price, rowid DESC";
|
$sql.= " ORDER BY date_price DESC, rowid DESC";
|
||||||
$sql.= " LIMIT 1";
|
$sql.= " LIMIT 1";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -687,7 +687,7 @@ $sql .= " WHERE fk_product = " . $object->id;
|
|||||||
$sql .= " AND p.entity IN (" . getEntity('productprice', 1) . ")";
|
$sql .= " AND p.entity IN (" . getEntity('productprice', 1) . ")";
|
||||||
$sql .= " AND p.fk_user_author = u.rowid";
|
$sql .= " AND p.fk_user_author = u.rowid";
|
||||||
if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " AND p.price_level = " . $soc->price_level;
|
if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " AND p.price_level = " . $soc->price_level;
|
||||||
$sql .= " ORDER BY p.date_price, p.rowid DESC, p.price_level ASC";
|
$sql .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC";
|
||||||
// $sql .= $db->plimit();
|
// $sql .= $db->plimit();
|
||||||
|
|
||||||
dol_syslog("sql=" . $sql);
|
dol_syslog("sql=" . $sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user