mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #12062 from frederic34/patch-13
remove stock data from getsupplierprice
This commit is contained in:
commit
71c18b7d65
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user