Skip to content

Commit

Permalink
Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 17, 2016
2 parents a102dc2 + bbcc7d8 commit 404ac60
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 250 deletions.
25 changes: 13 additions & 12 deletions htdocs/product/list.php
Expand Up @@ -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
Expand Down Expand Up @@ -79,6 +80,7 @@
// 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');
Expand Down Expand Up @@ -120,6 +122,15 @@
$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),
Expand Down Expand Up @@ -176,7 +187,6 @@
*/

$htmlother=new FormOther($db);
$form=new Form($db);

if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
{
Expand Down Expand Up @@ -402,16 +412,7 @@
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":"").'">';
Expand All @@ -423,7 +424,7 @@
if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,"",$sortfield,$sortorder);
if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"],"p.desirestock","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"],"p.desiredstock","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.tobatch']['checked'])) print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"],"p.tobatch","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['p.stock']['checked'])) print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"],"p.stock","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"],"p.accountancy_code_sell","",$param,'',$sortfield,$sortorder);
Expand Down

0 comments on commit 404ac60

Please sign in to comment.