forked from Wavyzz/dolibarr
Fix: Add constant to hide an obscur feature
This commit is contained in:
@@ -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 '</tr>';
|
||||
|
||||
// Charges ????
|
||||
if (! empty($conf->margin->enabled))
|
||||
if ($conf->global->PRODUCT_CHARGES)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Charges").'</td>';
|
||||
print '<td><input class="flat" name="charges" size="8" value="'.(GETPOST('charges')?price(GETPOST('charges')):(isset($product->fourn_charges)?price($product->fourn_charges):'')).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Charges").'</td>';
|
||||
print '<td><input class="flat" name="charges" size="8" value="'.(GETPOST('charges')?price(GETPOST('charges')):(isset($product->fourn_charges)?price($product->fourn_charges):'')).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$product->id);
|
||||
@@ -444,11 +446,17 @@ if ($id || $ref)
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("VATRate").'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("PriceQtyMinHT").'</td>';
|
||||
// Charges ????
|
||||
if (! empty($conf->margin->enabled)) print '<td align="right">'.$langs->trans("Charges").'</td>';
|
||||
if ($conf->global->PRODUCT_CHARGES)
|
||||
{
|
||||
if (! empty($conf->margin->enabled)) print '<td align="right">'.$langs->trans("Charges").'</td>';
|
||||
}
|
||||
print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("DiscountQtyMin").'</td>';
|
||||
// Charges ????
|
||||
if (! empty($conf->margin->enabled)) print '<td align="right">'.$langs->trans("UnitCharges").'</td>';
|
||||
if ($conf->global->PRODUCT_CHARGES)
|
||||
{
|
||||
if (! empty($conf->margin->enabled)) print '<td align="right">'.$langs->trans("UnitCharges").'</td>';
|
||||
}
|
||||
print '<td class="liste_titre"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -494,13 +502,16 @@ if ($id || $ref)
|
||||
print '</td>';
|
||||
|
||||
// Charges ????
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print $productfourn->fourn_charges?price($productfourn->fourn_charges):"";
|
||||
print '</td>';
|
||||
if ($conf->global->PRODUCT_CHARGES)
|
||||
{
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print $productfourn->fourn_charges?price($productfourn->fourn_charges):"";
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Unit price
|
||||
print '<td align="right">';
|
||||
print price($productfourn->fourn_unitprice);
|
||||
@@ -512,14 +523,17 @@ if ($id || $ref)
|
||||
print price2num($productfourn->fourn_remise_percent).'%';
|
||||
print '</td>';
|
||||
|
||||
// Unit Charges ???
|
||||
if (! empty($conf->margin->enabled))
|
||||
// Charges ????
|
||||
if ($conf->global->PRODUCT_CHARGES)
|
||||
{
|
||||
print '<td align="right">';
|
||||
print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" ");
|
||||
print '</td>';
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" ");
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$product->id);
|
||||
|
||||
Reference in New Issue
Block a user