Skip to content

Commit

Permalink
Fix autoadd in basket after a search (only if search on barcode)
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 12, 2022
1 parent dde3b71 commit cad8b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/takepos/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ function Search2(keyCodeForEnter, moreorless) {
console.log("There is only 1 answer with barcode matching the search, so we change the thirdparty "+data[0]['rowid']);
ChangeThirdparty(data[0]['rowid']);
}
else if ('product' == data[0]['object']) {
console.log("There is only 1 answer matching the search, so we add the product in basket, qty="+data[0]['qty']);
else if ($('#search').val() == data[0]['barcode'] && 'product' == data[0]['object']) {
console.log("There is only 1 answer and we found search on a barcode, so we add the product in basket, qty="+data[0]['qty']);
ClickProduct(0, data[0]['qty']);
}
}
Expand Down

0 comments on commit cad8b1e

Please sign in to comment.