Fix: bad sql result name
This commit is contained in:
parent
e8fd068cb0
commit
d7d26b9375
@ -61,11 +61,13 @@ if ($action == 'convert')
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$object->fetch($obj->rowid);
|
|
||||||
|
|
||||||
|
$ret=$object->fetch($obj->rowid);
|
||||||
|
if ($ret)
|
||||||
|
{
|
||||||
if ($price_base_type == 'TTC')
|
if ($price_base_type == 'TTC')
|
||||||
{
|
{
|
||||||
$newprice=price2num($object->price_ttc,'MU');
|
$newprice=price2num($object->price_ttc,'MU');
|
||||||
@ -79,6 +81,7 @@ if ($action == 'convert')
|
|||||||
|
|
||||||
$ret=$object->updatePrice($object->id, $newprice, $price_base_type, $user, $newvat);
|
$ret=$object->updatePrice($object->id, $newprice, $price_base_type, $user, $newvat);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user