diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index af3d728dc78..817f83f7ab6 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -78,12 +78,6 @@ if ($idprod > 0) $title.= price($unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); $price = $unitprice; } - if ($productSupplier->fourn_unitcharges > 0 && ($conf->global->MARGIN_TYPE == "2")) - { - $title.=" + "; - $title.= price($productSupplier->fourn_unitcharges,0,$langs,0,0,-1,$conf->currency); - $price += $productSupplier->fourn_unitcharges; - } $label = price($price,0,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); if ($productSupplier->fourn_ref) $label.=' ('.$productSupplier->fourn_ref.')'; diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index eaff46ddc2c..4f576148099 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -229,12 +229,12 @@ class ProductFournisseur extends Product $sql.= " remise_percent = ".$remise_percent.","; $sql.= " remise = ".$remise.","; $sql.= " unitprice = ".$unitBuyPrice.","; - $sql.= " unitcharges = ".$unitCharges.","; + $sql.= " unitcharges = ".$unitCharges.","; // deprecated $sql.= " tva_tx = ".$tva_tx.","; $sql.= " fk_availability = ".$availability.","; $sql.= " entity = ".$conf->entity.","; $sql.= " info_bits = ".$newnpr.","; - $sql.= " charges = ".$charges.","; + $sql.= " charges = ".$charges.","; // deprecated $sql.= " delivery_time_days = ".($delivery_time_days != '' ? $delivery_time_days : 'null').","; $sql.= " supplier_reputation = ".(empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'"); $sql.= " WHERE rowid = ".$this->product_fourn_price_id; diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index d7dbd5d81eb..e1c2d59b7b8 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -124,8 +124,6 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta if ($product->fetch_product_fournisseur_price($fk_pa)) { $paht_ret = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100); - if ($conf->global->MARGIN_TYPE == "2" && $product->fourn_unitcharges > 0) - $paht_ret += $product->fourn_unitcharges; } else { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 546d94773a3..2c0a5cd15d7 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -678,6 +678,7 @@ if ($id > 0 || $ref) print''; // Charges ???? + /* if ($conf->global->PRODUCT_CHARGES) { if (! empty($conf->margin->enabled)) @@ -686,7 +687,7 @@ if ($id > 0 || $ref) print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" "); print ''; } - } + }*/ if (is_object($hookmanager)) {