Merge pull request #4831 from fmarcet/3.9
FIX: Not showing sellprice properly on product list
This commit is contained in:
commit
22f6e0e92d
@ -10,6 +10,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Adolfo segura <adolfo.segura@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -79,6 +80,7 @@ if ($type === '0') { $contextpage='productlist'; if ($search_type=='') $search_t
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array($contextpage));
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form=new Form($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('product');
|
||||
@ -120,6 +122,15 @@ if (! empty($conf->barcode->enabled)) {
|
||||
$fieldstosearchall['p.barcode']='Gencod';
|
||||
}
|
||||
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
$titlesellprice=$langs->trans("SellingPrice");
|
||||
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
$titlesellprice=$form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
|
||||
}
|
||||
}
|
||||
|
||||
// Definition of fields for lists
|
||||
$arrayfields=array(
|
||||
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
@ -176,7 +187,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
||||
*/
|
||||
|
||||
$htmlother=new FormOther($db);
|
||||
$form=new Form($db);
|
||||
|
||||
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
{
|
||||
@ -402,16 +412,7 @@ else
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
$titlesellprice=$langs->trans("SellingPrice");
|
||||
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
$titlesellprice=$form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
|
||||
}
|
||||
}
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user