Merge pull request #4503 from fmarcet/3.9
FIX: Not returning the correct multilevel price
This commit is contained in:
commit
c77fcfd291
@ -12,6 +12,7 @@
|
|||||||
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Ion agorria <ion@agorria.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1673,7 +1674,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)
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -46,7 +47,7 @@ $rowid=GETPOST('rowid','int');
|
|||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
$cancel=GETPOST('cancel', 'alpha');
|
$cancel=GETPOST('cancel', 'alpha');
|
||||||
$socid=GETPOST('socid', 'int');
|
$socid=GETPOST('socid', 'int');
|
||||||
$cost_price=GETPOST('cost_price', 'int');
|
$cost_price=GETPOST('cost_price', 'alpha');
|
||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user