Focus set to invalid field after submit check fail
[fa-stable.git] / sales / allocations / customer_allocate.php
index e1fd9ea2cac4bb3e9826bff7134380fa3f35a8dc..d1401e3ee758ec60a548c0c6d1b95fb05a599015 100644 (file)
@@ -41,12 +41,14 @@ function check_data()
                if (!check_num('amount' . $counter))
                {
                        display_error(_("The entry for one or more amounts is invalid."));
+                       set_focus('amount'.$counter);
                        return false;
                }
 
                if (!check_num('amount' . $counter,0))
                {
                        display_error(_("The entry for an amount to allocate was negative. A positive allocation amount is expected."));
+               set_focus('amount'.$counter);
                        return false;
                }