mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix: for avoid errors
This commit is contained in:
@@ -3105,12 +3105,16 @@ function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
|||||||
|
|
||||||
if ($idprodfournprice > 0)
|
if ($idprodfournprice > 0)
|
||||||
{
|
{
|
||||||
|
if (! class_exists('ProductFournisseur'))
|
||||||
|
require DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php';
|
||||||
$prodprice = new ProductFournisseur($db);
|
$prodprice = new ProductFournisseur($db);
|
||||||
$prodprice->fetch_product_fournisseur_price($idprodfournprice);
|
$prodprice->fetch_product_fournisseur_price($idprodfournprice);
|
||||||
return $prodprice->fourn_tva_npr;
|
return $prodprice->fourn_tva_npr;
|
||||||
}
|
}
|
||||||
elseif ($idprod > 0)
|
elseif ($idprod > 0)
|
||||||
{
|
{
|
||||||
|
if (! class_exists('Product'))
|
||||||
|
require DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->fetch($idprod);
|
$prod->fetch($idprod);
|
||||||
return $prod->tva_npr;
|
return $prod->tva_npr;
|
||||||
|
|||||||
Reference in New Issue
Block a user