Skip to content

Commit

Permalink
FIX: Not returning the correct multilevel price
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarcet committed Jan 27, 2016
1 parent 0f70cca commit eec8d30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/product/class/product.class.php
Expand Up @@ -12,6 +12,7 @@
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1673,7 +1674,7 @@ function fetch($id='', $ref='', $ref_ext='', $ignore_expression = 0)
$sql.= " WHERE entity IN (".getEntity('productprice', 1).")";
$sql.= " AND price_level=".$i;
$sql.= " AND fk_product = '".$this->id."'";
$sql.= " ORDER BY date_price, rowid DESC";
$sql.= " ORDER BY date_price DESC, rowid DESC";
$sql.= " LIMIT 1";
$resql = $this->db->query($sql);
if ($resql)
Expand Down

0 comments on commit eec8d30

Please sign in to comment.