diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index de6cacff175..cbd7d308f07 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -5022,7 +5022,9 @@ function dol_getmypid()
*
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR)
* @param string $value The value to look for.
- * If param $mode is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
+ * If param $mode is 0, can contains several keywords separated with a space or |
+ * like "keyword1 keyword2" = We want record field like keyword1 AND field like keyword2
+ * or like "keyword1|keyword2" = We want record field like keyword1 OR field like keyword2
* If param $mode is 1, can contains an operator <, > or = like "<10" or ">=100.5 < 1000"
* If param $mode is 2, can contains a list of id separated by comma like "1,3,4"
* @param integer $mode 0=value is list of keywords, 1=value is a numeric test (Example ">5.5 <10"), 2=value is a list of id separated with comma (Example '1,3,4')
@@ -5081,8 +5083,15 @@ function natural_search($fields, $value, $mode=0, $nofinaland=0)
}
else
{
- $newres .= ($i2 > 0 ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($crit)) . "%'";
- $i2++; // a criteria was added to string
+ $textcrit = '';
+ $tmpcrits = explode('|',$crit);
+ $i3 = 0;
+ foreach($tmpcrits as $tmpcrit)
+ {
+ $newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($tmpcrit)) . "%'";
+ $i3++;
+ }
+ $i2++; // a criteria was added to string
}
$i++;
}
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 1d7ece0c98d..140cbab05d3 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -294,4 +294,5 @@ LastUpdated=Last updated
CorrectlyUpdated=Correctly updated
PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is
PropalMergePdfProductChooseFile=Select PDF files
-IncludingProductWithTag=Including product with tag
\ No newline at end of file
+IncludingProductWithTag=Including product with tag
+DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index 7a5f9d55520..c8105c8b61a 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -440,6 +440,7 @@ print '';
print '';
// Activate propal merge produt card
+/* disabled. PRODUIT_PDF_MERGE_PROPAL can be added manually. Still did not understand how this feature works.
$var=!$var;
print '
';
+print '';*/
// Use units
$var=!$var;
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index 6809e3d3a52..bd878c4ce9d 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -290,7 +290,7 @@ if ($id > 0 || ! empty($ref))
}
else
{
- print '';
+ print '
';
print '| '.$langs->trans("None").' | ';
print '
';
}
@@ -436,7 +436,7 @@ if ($id > 0 || ! empty($ref))
$colspan=6;
if (! empty($conf->stock->enabled)) $colspan++;
- print '';
+ print '
';
print '| '.$langs->trans("None").' | ';
print '
';
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 3c68f261732..0b7e1b0c733 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -310,13 +310,21 @@ else
if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,'','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
if (! empty($conf->service->enabled) && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
- if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
+ if (empty($conf->global->PRODUIT_MULTIPRICES))
+ {
+ $titlefield=$langs->trans("SellingPrice");
+ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
+ {
+ $titlefields=$form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
+ }
+ print_liste_field_titre($titlefields, $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
+ }
if ($user->rights->fournisseur->lire) print ''.$langs->trans("BuyingPriceMinShort").' | ';
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("DesiredStock").' | ';
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("PhysicalStock").' | ';
print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="center"',$sortfield,$sortorder);
- print ' | ';
+ print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, '');
print "\n";
// Lignes des champs de filtre
@@ -350,8 +358,7 @@ else
// Sell price
if (empty($conf->global->PRODUIT_MULTIPRICES))
{
- print '';
- print ' ';
+ print ' | ';
print ' | ';
}
diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php
index 60e3cba31e3..d8ca1fa15d0 100644
--- a/htdocs/product/stats/card.php
+++ b/htdocs/product/stats/card.php
@@ -1,6 +1,6 @@
- * Copyright (c) 2004-2013 Laurent Destailleur
+ * Copyright (c) 2004-2015 Laurent Destailleur
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2005 Eric Seigne
* Copyright (C) 2013 Juanjo Menent
@@ -229,7 +229,7 @@ if (! empty($id) || ! empty($ref))
print $graphfiles[$key]['label'];
print '';
// Image
- print '| ';
+ print ' |
| ';
print $graphfiles[$key]['output'];
print ' |
';
// Date generation
diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php
index 501272983cd..dc102d8eb05 100644
--- a/htdocs/product/stock/tpl/stockcorrection.tpl.php
+++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php
@@ -39,7 +39,9 @@ $langs->load("productbatch");
});
';
- print_titre($langs->trans("StockCorrection"));
+
+ print load_fiche_titre($langs->trans("StockCorrection"),'','title_generic.png');
+
print '';
-
- dol_fiche_end();
}
}
else
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 64b4236e6e9..94a5b0f9dd1 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -2147,7 +2147,7 @@ div.pagination li.paginationafterarrows {
*/
/* Set the color for hover lines */
-.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover
+.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover, .box_pair:hover, .box_impair:hover
{
background: rgb() !important;
@@ -2156,7 +2156,7 @@ div.pagination li.paginationafterarrows {
}
-.odd, .impair, .nohover .odd:hover, .nohover .impair:hover, tr.odd td.nohover, tr.impair td.nohover
+.odd, .impair, .nohover .odd:hover, .nohover .impair:hover, tr.odd td.nohover, tr.impair td.nohover, tr.box_pair td.nohover, tr.box_impair td.nohover
{
font-family: ;
margin-bottom: 1px;