Merge pull request #4059 from fappels/develop_fix_defineBuyPrice

Fix defineBuyPrice no min price is not error
This commit is contained in:
Laurent Destailleur 2015-11-21 17:53:59 +01:00
commit c8cf06c14b

View File

@ -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;
} }
} }
} }