Skip to content

Commit

Permalink
api supplier get purchase prices
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Oct 5, 2019
1 parent 10671e3 commit b895f8a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions htdocs/product/class/api_products.class.php
Expand Up @@ -642,13 +642,12 @@ public function getPurchasePrices($id, $ref = '', $ref_ext = '', $barcode = '',
$this->product->load_stock();
}

if($result) {
$this->product = new ProductFournisseur($this->db);
$this->product->fetch($id, $ref);
$this->product->list_product_fournisseur_price($id, '', '', 0, 0);
if ($result) {
$this->productsupplier->fetch($id, $ref);
$this->productsupplier->list_product_fournisseur_price($id, '', '', 0, 0);
}

return $this->_cleanObjectDatas($this->product);
return $this->_cleanObjectDatas($this->productsupplier);
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
Expand Down

0 comments on commit b895f8a

Please sign in to comment.