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() }); });