diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index de6cacff1753ecbf8fbb53b69b41f4c6a65f159b..cbd7d308f07eef2c1a55b2697cf52b617772ccf4 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 1d7ece0c98de824b7e96399f6e3f40c832a9fed7..140cbab05d309100727361f4cedddb7bc7f4f289 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 7a5f9d555202d4876a92dc5457475bcc1885b938..c8105c8b61ac7fc5baede58fa4ead6e06394d126 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -440,6 +440,7 @@ print '</tr>'; print '</form>'; // 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 '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; @@ -452,7 +453,7 @@ print '</td><td align="right">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</td>'; print '</tr>'; -print '</form>'; +print '</form>';*/ // Use units $var=!$var; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 6809e3d3a5212e7ccb3e83171e99be97408d184e..bd878c4ce9de4dc873849ef058ca8e9719db7cf3 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -290,7 +290,7 @@ if ($id > 0 || ! empty($ref)) } else { - print '<tr>'; + print '<tr clas="impair">'; print '<td colspan="3">'.$langs->trans("None").'</td>'; print '</tr>'; } @@ -436,7 +436,7 @@ if ($id > 0 || ! empty($ref)) $colspan=6; if (! empty($conf->stock->enabled)) $colspan++; - print '<tr>'; + print '<tr class="impair">'; print '<td colspan="'.$colspan.'">'.$langs->trans("None").'</td>'; print '</tr>'; } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 3c68f2617329fe201919fc255e2a3bcbc6930c1c..0b7e1b0c733cbe35ff613d14fec1f71958081a18 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 '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>'; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>'; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>'; 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 '<td width="1%"> </td>'; + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', $param, ''); print "</tr>\n"; // Lignes des champs de filtre @@ -350,8 +358,7 @@ else // Sell price if (empty($conf->global->PRODUIT_MULTIPRICES)) { - print '<td class="liste_titre">'; - print ' '; + print '<td class="liste_titre" align="right">'; print '</td>'; } diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 60e3cba31e321728f97304e3b7e7ec45ebaba5d0..d8ca1fa15d079f303918e6908233adcab5d0d0fa 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (c) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (c) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es> @@ -229,7 +229,7 @@ if (! empty($id) || ! empty($ref)) print $graphfiles[$key]['label']; print '</td></tr>'; // Image - print '<tr><td colspan="2" align="center">'; + print '<tr class="impair"><td colspan="2" class="nohover" align="center">'; print $graphfiles[$key]['output']; print '</td></tr>'; // Date generation diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 501272983cd752c6c28177270e04370033995b7d..dc102d8eb052b7390d6c38b14f61a52ecd256c8c 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -39,7 +39,9 @@ $langs->load("productbatch"); }); </script>'; - print_titre($langs->trans("StockCorrection")); + + print load_fiche_titre($langs->trans("StockCorrection"),'','title_generic.png'); + print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'."\n"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="correct_stock">'; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 556e924b07d254a7fbbf11b856b34c39637f711d..de947a7501473490673856de49ee85da5a3d59a5 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -38,7 +38,8 @@ } } - print_titre($langs->trans("StockTransfer")); + print load_fiche_titre($langs->trans("StockTransfer"),'','title_generic.png'); + print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'" method="post">'."\n"; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="action" value="transfert_stock">'; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index eacc44cb3dd8fddcbf47fa3cbc2d7f8fd2e245c7..704b5413b4f8c6c7506110a0fd511752704aa2c7 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -274,10 +274,10 @@ if ($resql) print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">'; print '</td>'; print '<td class="liste_titre">'; - print '<input type="text" class="flat" name="search_label" value="'.$search_label.'">'; + print '<input type="text" class="flat" name="search_label" size="8" value="'.$search_label.'">'; print '</td>'; print '<td class="liste_titre">'; - print '<input type="text" class="flat" name="search_societe" value="'.$search_societe.'">'; + print '<input type="text" class="flat" name="search_societe" size="8" value="'.$search_societe.'">'; print '</td>'; // Sale representative print '<td class="liste_titre"> </td>'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 863863811e003441ae3f7e6db0d3e368e955ef72..654b5aa7b4b1965b92d597e598be23eba3a23442 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1294,9 +1294,6 @@ else $head = societe_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); - - // Load object modCodeTiers $module=(! empty($conf->global->SOCIETE_CODECLIENT_ADDON)?$conf->global->SOCIETE_CODECLIENT_ADDON:'mod_codeclient_leopard'); if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') @@ -1465,6 +1462,10 @@ else print '<input type="hidden" name="socid" value="'.$object->id.'">'; if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print '<input type="hidden" name="code_auto" value="1">'; + + dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); + + print '<table class="border" width="100%">'; // Name @@ -1818,7 +1819,8 @@ else print '</tr>'; print '</table>'; - print '<br>'; + + dol_fiche_end(); print '<div align="center">'; print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; @@ -1827,8 +1829,6 @@ else print '</div>'; print '</form>'; - - dol_fiche_end(); } } else diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 64b4236e6e9be514da3a17f7852f445cb21fb3ab..94a5b0f9dd13acf2069b4a8285f73f5fd17c5e86 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 { <?php if ($colorbacklinepairhover) { ?> background: rgb(<?php echo $colorbacklinepairhover; ?>) !important; @@ -2156,7 +2156,7 @@ div.pagination li.paginationafterarrows { <?php } ?> } -.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: <?php print $fontlist ?>; margin-bottom: 1px;