Skip to content

Commit

Permalink
Update ajax.lib.php
Browse files Browse the repository at this point in the history
V13 fix reported on V12 branch
Enhanced behaviour to select product on customer/supplier order to be able to use barcode reader efficiently Feature request Dolibarr#15565
  • Loading branch information
zuiko committed Dec 31, 2020
1 parent 65edc37 commit 793cde2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions htdocs/core/lib/ajax.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
$("input#search_'.$htmlname.'").keydown(function(e) {
if (e.keyCode != 9) /* If not "Tab" key */
{
if (e.keyCode == 13) {return false;} /* isable "ENTER" key */
console.log("Clear id previously selected for field '.$htmlname.'");
$("#'.$htmlname.'").val("");
}
Expand Down

1 comment on commit 793cde2

@catrielr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make optional the use of e.keyCode == 13) {return false; } ???
Because I use a barcode that comes from a scale where I process them with "doAcctions" and rewrite the $ _POST array with the quantity data and the product code. That is, the barcode contains the product code and the amount it weighs.

EJ: 2000026064657

20 = Indicates that it is a scale.
00026 = Product code.
06465 = Amount in Grams.
7 = CRC

Saludos, Catriel

Please sign in to comment.