diff --git a/application/core/MY_Lang.php b/application/core/MY_Lang.php index 32c5b94c9..5b82d84b0 100644 --- a/application/core/MY_Lang.php +++ b/application/core/MY_Lang.php @@ -53,7 +53,7 @@ class MY_Lang extends CI_Lang } else { - if(!empty($this->language[$line] || strstr($line, 'common_you_are_using'))) + if(isset($this->language[$line]) && $this->language[$line] != '') { $line = $this->language[$line]; //if the line exists and more function arguments remain diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index d11d08115..ade9424a0 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -517,7 +517,7 @@ $(document).ready(function() } } - $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').change(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 3714bd81d..8a6e1dfad 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -770,7 +770,7 @@ $(document).ready(function() } } - $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').change(function() { $(this).parents("tr").prevAll("form:first").submit() });