From e9aa0068fe359ebe1139ed2a7b8c4e47383b6a5a Mon Sep 17 00:00:00 2001 From: jekkos Date: Thu, 23 Feb 2017 08:03:37 +0100 Subject: [PATCH] Enable auto refresh for serialnumber and description (#1154) --- application/views/receivings/receiving.php | 3 ++- application/views/sales/register.php | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index d862f5e3a..24258435e 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -516,7 +516,8 @@ $(document).ready(function() } } } - $('[name="price"],[name="quantity"],[name="discount"]').focusout(function() { + + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { var index = $(this).parents("tr").index() - 1; $("#cart_" + index).submit(); }); diff --git a/application/views/sales/register.php b/application/views/sales/register.php index bf3012a42..b7947bb00 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -696,9 +696,8 @@ $(document).ready(function() } } - $('[name="price"],[name="quantity"],[name="discount"]').focusout(function() { - var index = $(this).parents("tr").index() - 1; - $("#cart_" + index).submit(); + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { + $(this).parents("tr").prevAll("form:first").submit() }); });