Improving TakePOS search informing the user if there is no record or clearing the box if it exists avoiding manually clear every scan

This commit is contained in:
jove@bisquerra.com 2020-08-04 08:11:44 +02:00
parent bf1f295602
commit 6d957c276c

View File

@ -529,8 +529,19 @@ function Search2(keyCodeForEnter) {
ClickProduct(0);
}
}
if (eventKeyCode == keyCodeForEnter){
ClearSearch();
if (data.length == 0) {
$('#search').val('<?php
$langs->load('errors');
echo dol_escape_js($langs->trans("ErrorRecordNotFound"));
?>');
$('#search').select();
}
}
});
}
}
function Edit(number) {