From 54256773c558f5599a2111c6010fc1ab1a8f6335 Mon Sep 17 00:00:00 2001 From: hugome Date: Fri, 21 Apr 2017 10:27:48 +0200 Subject: [PATCH 1/3] FIX: length_accounta return variable name --- htdocs/core/lib/accounting.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 8ec0713b01a..4d32aa899b3 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -151,7 +151,7 @@ function length_accounta($accounta) if ($accounta < 0 || empty($accounta)) return ''; - if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $account; + if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $accounta; $a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT; if (! empty($a)) { From 8f97177dae03aca9df07fc2171d32df608f04bee Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 24 Apr 2017 14:44:44 +0200 Subject: [PATCH 2/3] FIX 6614 --- htdocs/compta/facture/fiche-rec.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 7217e1eedf7..4adfc24b4dc 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -889,7 +889,6 @@ if ($action == 'create') $object = new Facture($db); // Source invoice $product_static = new Product($db); - $formproject = new FormProjets($db); if ($object->fetch($id, $ref) > 0) { From 4ab5674ffbbeb8af8ada5cc8c2a5b4b7ccd39bee Mon Sep 17 00:00:00 2001 From: Quentin Vial-Gouteyron Date: Tue, 25 Apr 2017 15:10:46 +0200 Subject: [PATCH 3/3] FIX ajax autocomplete on clone --- htdocs/core/class/html.form.class.php | 13 +++++++++---- htdocs/core/lib/ajax.lib.php | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0b5778a512a..b29f7bc5bf3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -965,18 +965,23 @@ class Form } // mode 1 $urloption='htmlname='.$htmlname.'&outjson=1&filter='.$filter; - print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); + $out.= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); + $out.=''; if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : '; else if ($hidelabel > 1) { if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; else $placeholder=' title="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { - print img_picto($langs->trans("Search"), 'search'); + $out.= img_picto($langs->trans("Search"), 'search'); } } - print 'global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; + $out.= 'global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; if ($hidelabel == 3) { - print img_picto($langs->trans("Search"), 'search'); + $out.= img_picto($langs->trans("Search"), 'search'); } } else diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 0193a33b305..e7d8a7cf538 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -181,10 +181,12 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt }); } console.log("ajax_autocompleter new value selected, we trigger change on original component so field #search_'.$htmlname.'"); + $("#search_'.$htmlname.'").trigger("change"); // We have changed value of the combo select, we must be sure to trigger all js hook binded on this event. This is required to trigger other javascript change method binded on original field by other code. } ,delay: 500 }).data("ui-autocomplete")._renderItem = function( ul, item ) { + return $("
  • ") .data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0 .append( \'\' + item.label + "" )