diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 9832e57eb6d..7e58a8e11b9 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -34,7 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$langs->load("products");
$langs->load("suppliers");
$langs->load("bills");
-// Charges ????
if (! empty($conf->margin->enabled)) $langs->load("margins");
$id = GETPOST('id', 'int');
@@ -383,15 +382,18 @@ if ($id || $ref)
print '';
// Charges ????
- if (! empty($conf->margin->enabled))
+ if ($conf->global->PRODUCT_CHARGES)
{
- print '
';
- print '| '.$langs->trans("Charges").' | ';
- print '';
- print ' | ';
- print '
';
+ if (! empty($conf->margin->enabled))
+ {
+ print '';
+ print '| '.$langs->trans("Charges").' | ';
+ print '';
+ print ' | ';
+ print '
';
+ }
}
-
+
if (is_object($hookmanager))
{
$parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$product->id);
@@ -444,11 +446,17 @@ if ($id || $ref)
print ''.$langs->trans("VATRate").' | ';
print ''.$langs->trans("PriceQtyMinHT").' | ';
// Charges ????
- if (! empty($conf->margin->enabled)) print ''.$langs->trans("Charges").' | ';
+ if ($conf->global->PRODUCT_CHARGES)
+ {
+ if (! empty($conf->margin->enabled)) print ''.$langs->trans("Charges").' | ';
+ }
print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder);
print ''.$langs->trans("DiscountQtyMin").' | ';
// Charges ????
- if (! empty($conf->margin->enabled)) print ''.$langs->trans("UnitCharges").' | ';
+ if ($conf->global->PRODUCT_CHARGES)
+ {
+ if (! empty($conf->margin->enabled)) print ''.$langs->trans("UnitCharges").' | ';
+ }
print ' | ';
print "\n";
@@ -494,13 +502,16 @@ if ($id || $ref)
print '';
// Charges ????
- if (! empty($conf->margin->enabled))
- {
- print '';
- print $productfourn->fourn_charges?price($productfourn->fourn_charges):"";
- print ' | ';
+ if ($conf->global->PRODUCT_CHARGES)
+ {
+ if (! empty($conf->margin->enabled))
+ {
+ print '';
+ print $productfourn->fourn_charges?price($productfourn->fourn_charges):"";
+ print ' | ';
+ }
}
-
+
// Unit price
print '';
print price($productfourn->fourn_unitprice);
@@ -512,14 +523,17 @@ if ($id || $ref)
print price2num($productfourn->fourn_remise_percent).'%';
print ' | ';
- // Unit Charges ???
- if (! empty($conf->margin->enabled))
+ // Charges ????
+ if ($conf->global->PRODUCT_CHARGES)
{
- print '';
- print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" ");
- print ' | ';
+ if (! empty($conf->margin->enabled))
+ {
+ print '';
+ print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" ");
+ print ' | ';
+ }
}
-
+
if (is_object($hookmanager))
{
$parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$product->id);