diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 346aef06a91..2a9f407bf54 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -607,7 +607,6 @@ class Products extends DolibarrApi * @param string $ref Ref of element * @param string $ref_ext Ref ext of element * @param string $barcode Barcode of element - * @param int $includestockdata Load also information about stock (slower) * @return array|mixed Data without useless information * * @url GET {id}/purchase_prices @@ -617,7 +616,7 @@ class Products extends DolibarrApi * @throws 404 * */ - public function getPurchasePrices($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0) + public function getPurchasePrices($id, $ref = '', $ref_ext = '', $barcode = '') { if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); @@ -638,10 +637,6 @@ class Products extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includestockdata) { - $this->product->load_stock(); - } - if ($result) { $this->productsupplier->fetch($id, $ref); $this->productsupplier->list_product_fournisseur_price($id, '', '', 0, 0);