Fix defineBuyPrice no min price is not error
No min buy price is not error, return 0 if no buyprice set
This commit is contained in:
parent
0892724ffe
commit
ecd3114683
@ -4221,7 +4221,7 @@ abstract class CommonObject
|
|||||||
$result = $product->fetch($fk_product);
|
$result = $product->fetch($fk_product);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$this->error='ErrorProductIdDoesNotExists';
|
$this->errors[] = 'ErrorProductIdDoesNotExists';
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (($product->pmp > 0))
|
if (($product->pmp > 0))
|
||||||
@ -4238,10 +4238,10 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
$buyPrice = $productFournisseur->fourn_price;
|
$buyPrice = $productFournisseur->fourn_price;
|
||||||
}
|
}
|
||||||
else
|
else if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error = $productFournisseur->error;
|
$this->errors[] = $productFournisseur->error;
|
||||||
return -1;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user