From 37d158f15915aba6ea96823b6bef0a5a30bc5f2a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Jan 2017 21:33:13 +0100 Subject: [PATCH 1/9] FIX Accept spaces around the | criteria --- htdocs/core/lib/functions.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bb268ffa2d0..d38f765c6f5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5737,7 +5737,9 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) else // $mode=0 { $textcrit = ''; - $tmpcrits = explode('|',$crit); + $tmpcrit = preg_replace('/\s+|/','|',$tmpcrit); + $tmpcrit = preg_replace('/|\s+/','|',$tmpcrit); + $tmpcrits = explode('|',$tmpcrit); $i3 = 0; foreach($tmpcrits as $tmpcrit) { From 2c1477ecea93d534b62d8bcce05e27c6c8007f6e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Jan 2017 21:50:14 +0100 Subject: [PATCH 2/9] Revert "FIX Accept spaces around the | criteria" This reverts commit 37d158f15915aba6ea96823b6bef0a5a30bc5f2a. --- htdocs/core/lib/functions.lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d38f765c6f5..bb268ffa2d0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5737,9 +5737,7 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) else // $mode=0 { $textcrit = ''; - $tmpcrit = preg_replace('/\s+|/','|',$tmpcrit); - $tmpcrit = preg_replace('/|\s+/','|',$tmpcrit); - $tmpcrits = explode('|',$tmpcrit); + $tmpcrits = explode('|',$crit); $i3 = 0; foreach($tmpcrits as $tmpcrit) { From 76a53dfb7d32739171e31495e85939477549dec2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Jan 2017 01:00:47 +0100 Subject: [PATCH 3/9] FIX Accept spaces around the | criteria --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bb268ffa2d0..2ce0bd1a524 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5677,7 +5677,7 @@ function dol_getmypid() * 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') - * @param integer $nofirstand 1=Do now output the first 'AND' + * @param integer $nofirstand 1=Do not output the first 'AND' * @return string $res The statement to append to the SQL query */ function natural_search($fields, $value, $mode=0, $nofirstand=0) @@ -5692,6 +5692,9 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) { $value=preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"),'/').'\-])/','\1\2',$value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do } + + $value = preg_replace('/\s*\|\s*/','|', $value); + $crits = explode(' ', $value); $res = ''; if (! is_array($fields)) $fields = array($fields); From 41832a0c2657087d8eeea72fff1cc886e7e19585 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Jan 2017 11:20:29 +0100 Subject: [PATCH 4/9] Fix neutral color on login (no theme yet selected) --- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index d72d303aa32..6da8a7cf935 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -262,7 +262,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla input:focus, textarea:focus, button:focus, select:focus { /* box-shadow: 0 0 4px #8091BF; */ - border-bottom: 1px solid #8091BF !important; + border-bottom: 1px solid #aaa !important; } textarea.cke_source:focus { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 409a902648e..a66727cb3db 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -262,7 +262,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla input:focus, textarea:focus, button:focus, select:focus { /* box-shadow: 0 0 4px #8091BF; */ - border-bottom: 1px solid #8091BF !important; + border-bottom: 1px solid #aaa !important; } textarea.cke_source:focus { From 913df73ed918589d6e28fb05f9dc9abb5b677af9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Jan 2017 11:31:39 +0100 Subject: [PATCH 5/9] Fix css --- htdocs/theme/eldy/style.css.php | 4 ++-- htdocs/theme/md/style.css.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 6da8a7cf935..02460670217 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -261,8 +261,8 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla } input:focus, textarea:focus, button:focus, select:focus { - /* box-shadow: 0 0 4px #8091BF; */ - border-bottom: 1px solid #aaa !important; + box-shadow: 0 0 4px #8091BF; + /* TODO Remove shadow on focus. Use instead border-bottom: 1px solid #aaa !important; To disable with select2 too. */ } textarea.cke_source:focus { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index a66727cb3db..7a0d16e4743 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -261,8 +261,8 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla } input:focus, textarea:focus, button:focus, select:focus { - /* box-shadow: 0 0 4px #8091BF; */ - border-bottom: 1px solid #aaa !important; + box-shadow: 0 0 4px #8091BF; + /* TODO Remove shadow on focus. Use instead border-bottom: 1px solid #aaa !important; To disable with select2 too. */ } textarea.cke_source:focus { From 1856b5cfb8790b47472295da1ddacbc62cbacb52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Jan 2017 11:50:43 +0100 Subject: [PATCH 6/9] Fix filter on status for third parties --- htdocs/societe/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 9506c5ad6bd..8982d2db32d 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -226,7 +226,7 @@ if (empty($reshook)) $search_idprof6=''; $search_type=''; $search_type_thirdparty=''; - $search_status=''; + $search_status=-1; $search_stcomm=''; $search_level_from=''; $search_level_to=''; @@ -413,7 +413,7 @@ if ($search_idprof6) $sql.= natural_search("s.idprof6",$search_idprof6); if ($search_type > 0 && in_array($search_type,array('1,3','2,3'))) $sql .= " AND s.client IN (".$db->escape($search_type).")"; if ($search_type > 0 && in_array($search_type,array('4'))) $sql .= " AND s.fournisseur = 1"; if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0"; -if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); +if ($search_status!='' && $search_status >= 0) $sql .= " AND s.status = ".$db->escape($search_status); if (!empty($conf->barcode->enabled) && $search_barcode) $sql.= " AND s.barcode LIKE '%".$db->escape($search_barcode)."%'"; if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; if ($search_levels) $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')'; @@ -878,7 +878,7 @@ if (! empty($arrayfields['s.tms']['checked'])) if (! empty($arrayfields['s.status']['checked'])) { print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $search_status, 1); print ''; } // Action column From dba777c57b1444737a95396aab33ee3e4b35f34f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Jan 2017 12:10:07 +0100 Subject: [PATCH 7/9] Fix missing field alias --- htdocs/societe/soc.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 06413548d9a..020d0aad63f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -290,9 +290,8 @@ if (empty($reshook)) else { $object->name = GETPOST('name', 'alpha'); - $object->name_alias = GETPOST('name_alias'); } - + $object->name_alias = GETPOST('name_alias'); $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); @@ -920,7 +919,6 @@ else $("#radiocompany").click(function() { $(".individualline").hide(); $("#typent_id").val(0); - $("#name_alias").show(); $("#effectif_id").val(0); $("#TypeName").html(document.formsoc.ThirdPartyName.value); document.formsoc.private.value=0; @@ -928,7 +926,6 @@ else $("#radioprivate").click(function() { $(".individualline").show(); $("#typent_id").val(id_te_private); - $("#name_alias").hide(); $("#effectif_id").val(id_ef15); $("#TypeName").html(document.formsoc.LastName.value); document.formsoc.private.value=1; @@ -970,7 +967,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print ''; @@ -982,11 +979,11 @@ else print ''; if ($object->particulier || $private) { - print ''.$langs->trans('LastName','name').''; + print ''.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName','name').''; } else { - print ''.fieldLabel('ThirdPartyName','name').''; + print ''.fieldLabel('ThirdPartyName','name').''; } print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; print ''; From 62a668d8997a7eb26375f618f425da73f91c6415 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Jan 2017 10:02:17 +0100 Subject: [PATCH 8/9] Fix https link --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b6a5d904c34..92df8f48f05 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1025,7 +1025,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser')) print ''."\n"; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser')) print ''."\n"; - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser')) print ''."\n"; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && ! GETPOST('textbrowser')) print ''."\n"; // Displays title $appli=constant('DOL_APPLICATION_TITLE'); From 03aa8343fd1486733b657865b176a506bcd293e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Jan 2017 10:21:35 +0100 Subject: [PATCH 9/9] Fix css --- htdocs/cashdesk/tpl/facturation1.tpl.php | 18 +++++++++--------- htdocs/theme/eldy/style.css.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index d20eb4c3299..208727a7644 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -106,23 +106,23 @@ $langs->load("cashdesk"); trans("VATRate"); ?> - + - + - + - + - + @@ -155,17 +155,17 @@ $langs->load("cashdesk");
trans("Amount"); ?> - +
- + - - +
trans("TotalTicket"); ?>trans("Received"); ?>trans("Change"); ?>
+
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 02460670217..1b5c36bb000 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -4463,7 +4463,7 @@ border-top-right-radius: 6px; color: #fff; text-decoration: none; padding-top: 18px; - : 54px; + padding-left: 54px; font-size: 14px; height: 38px; }