';
if ($show_empty && !$multiple) {
- $out .= ' '."\n";
+ $textforempty = ' ';
+ if (!empty($conf->use_javascript_ajax)) {
+ $textforempty = ' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small.
+ }
+ if (!is_numeric($show_empty)) {
+ $textforempty = $show_empty;
+ }
+ $out .= ''.$textforempty.' '."\n";
}
if ($show_every) {
$out .= '-- '.$langs->trans("Everybody").' -- '."\n";
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index a4a09e06808..365964857a2 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -511,31 +511,37 @@ $moreforfilter = '';
if ($user->rights->societe->client->voir || $socid) {
$langs->load("commercial");
$moreforfilter .= '';
- $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
- $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
+ $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
+ $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
$moreforfilter .= '
';
}
// If the user can view other users
if ($user->rights->user->user->lire) {
$moreforfilter .= '';
- $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': ';
- $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
+ $tmptitle = $langs->trans('LinkedToSpecificUsers');
+ $moreforfilter .= img_picto($tmptitle, 'user');
+ $moreforfilter .= $form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
$moreforfilter .= '
';
}
// If the user can view prospects other than his'
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '';
- $moreforfilter .= $langs->trans('IncludingProductWithTag').': ';
- $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
- $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
+ $tmptitle = $langs->trans('IncludingProductWithTag');
+ $moreforfilter .= img_picto($tmptitle, 'category');
+ //$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
+ //$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
+ $moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'parent', 1, $tmptitle);
+
$moreforfilter .= '
';
}
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$moreforfilter .= '';
- $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
- $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
+ $tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
+ $moreforfilter .= img_picto($tmptitle, 'category');
+ $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
$moreforfilter .= '
';
}
$parameters = array();
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 94ba5cd4e1d..a7cbc76b103 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -1491,9 +1491,9 @@ if ($resql) {
print '';
if ($obj->tosell) {
if ($obj->price_base_type == 'TTC') {
- print price($obj->price_ttc).' '.$langs->trans("TTC");
+ print ''.price($obj->price_ttc).' '.$langs->trans("TTC").' ';
} else {
- print price($obj->price).' '.$langs->trans("HT");
+ print ''.price($obj->price).' '.$langs->trans("HT").' ';
}
}
print ' ';
@@ -1546,9 +1546,9 @@ if ($resql) {
print '';
if (!empty($productpricescache[$obj->rowid])) {
if ($productpricescache[$obj->rowid][$key]['price_base_type'] == 'TTC') {
- print price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC");
+ print ''.price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC").' ';
} else {
- print price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT");
+ print ''.price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT").' ';
}
}
print ' ';
@@ -1568,9 +1568,9 @@ if ($resql) {
if ($product_fourn->product_fourn_price_id > 0) {
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) {
$htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1);
- print $form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext);
+ print ''.$form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext).' ';
} else {
- print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
+ print ''.price($product_fourn->fourn_unitprice).' '.$langs->trans("HT").' ';
}
}
}
@@ -1606,14 +1606,14 @@ if ($resql) {
// WAP
if (!empty($arrayfields['p.pmp']['checked'])) {
print '';
- print price($product_static->pmp, 1, $langs);
+ print ''.price($product_static->pmp, 1, $langs)." ";
print ' ';
}
// Cost price
if (!empty($arrayfields['p.cost_price']['checked'])) {
print '';
//print $obj->cost_price;
- print price($obj->cost_price).' '.$langs->trans("HT");
+ print ''.price($obj->cost_price).' '.$langs->trans("HT").' ';
print ' ';
}
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 1aafe3c6ae2..c8054683e52 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -280,14 +280,14 @@ if ($result) {
$line = $total = $totalsell = $totalStock = 0;
while ($line < $totalnboflines) {
$objp = $db->fetch_object($result);
- $total += price2num($objp->estimatedvalue, 'MU');
- $totalsell += price2num($objp->sellvalue, 'MU');
+ $total += $objp->estimatedvalue;
+ $totalsell += $objp->sellvalue;
$totalStock += $objp->stockqty;
$line++;
}
- $totalarray['val']['stockqty'] = $totalStock;
- $totalarray['val']['estimatedvalue'] = $total;
- $totalarray['val']['estimatedstockvaluesell'] = $totalsell;
+ $totalarray['val']['stockqty'] = price2num($totalStock, 'MS');
+ $totalarray['val']['estimatedvalue'] = price2num($total, 'MT');
+ $totalarray['val']['estimatedstockvaluesell'] = price2num($totalsell, 'MT');
}
$sql .= $db->order($sortfield, $sortorder);
@@ -633,7 +633,7 @@ if ($num) {
if (!empty($arrayfields["estimatedvalue"]['checked'])) {
print '';
if (price2num($obj->estimatedvalue, 'MT')) {
- print price(price2num($obj->estimatedvalue, 'MT'), 1);
+ print ''.price(price2num($obj->estimatedvalue, 'MT'), 1).' ';
} else {
print '';
}
@@ -650,7 +650,9 @@ if ($num) {
if (!empty($arrayfields["estimatedstockvaluesell"]['checked'])) {
print ' ';
if (empty($conf->global->PRODUIT_MULTIPRICES)) {
- print price(price2num($obj->sellvalue, 'MT'), 1);
+ if ($obj->sellvalue) {
+ print ''.price(price2num($obj->sellvalue, 'MT'), 1).' ';
+ }
} else {
$htmltext = $langs->trans("OptionMULTIPRICESIsOn");
print $form->textwithtooltip($langs->trans("Variable"), $htmltext);