From 6d957c276c3df287f835bc414329c6808360c98f Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Tue, 4 Aug 2020 08:11:44 +0200 Subject: [PATCH] Improving TakePOS search informing the user if there is no record or clearing the box if it exists avoiding manually clear every scan --- htdocs/takepos/index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index ab5acc1ac50..36dcbbe3d55 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -529,8 +529,19 @@ function Search2(keyCodeForEnter) { ClickProduct(0); } } + if (eventKeyCode == keyCodeForEnter){ + ClearSearch(); + if (data.length == 0) { + $('#search').val('load('errors'); + echo dol_escape_js($langs->trans("ErrorRecordNotFound")); + ?>'); + $('#search').select(); + } + } }); } + } function Edit(number) {