Clean dead code

This commit is contained in:
Laurent Destailleur 2017-05-17 14:52:27 +02:00
parent 7931c548c7
commit e2a7b0943f
4 changed files with 4 additions and 11 deletions

View File

@ -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.')';

View File

@ -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;

View File

@ -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
{

View File

@ -678,6 +678,7 @@ if ($id > 0 || $ref)
print'</td>';
// 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):"&nbsp;");
print '</td>';
}
}
}*/
if (is_object($hookmanager))
{