From ec20eb96df722aec0e583813fd551df8dadb2a1a Mon Sep 17 00:00:00 2001 From: jekkos Date: Fri, 20 May 2016 17:27:28 +0200 Subject: [PATCH] Add refresh after enter in sales and receivings register (#572) --- application/views/receivings/receiving.php | 8 ++++++++ application/views/sales/register.php | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index b1c8d55b6..7db42ad01 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -459,6 +459,14 @@ $(document).ready(function() } }); + $("#cart_contents input").keypress(function(event) + { + if (event.which == 13) + { + $('#cart_' + (1 + $(this).index() / 2 )).submit(); + } + }); + table_support.handle_submit = function(resource, response, stay_open) { if(response.success) diff --git a/application/views/sales/register.php b/application/views/sales/register.php index b8a5afb30..51a67d201 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -641,8 +641,16 @@ $(document).ready(function() $('#add_payment_form').submit(); }); - $("#payment_types").change(check_payment_type_giftcard).ready(check_payment_type_giftcard) - + $("#payment_types").change(check_payment_type_giftcard).ready(check_payment_type_giftcard); + + $("#cart_contents input").keypress(function(event) + { + if (event.which == 13) + { + $('#cart_' + (1 + $(this).index() / 2 )).submit(); + } + }); + $("#amount_tendered").keypress(function(event) { if( event.which == 13 )