Changed so Customer's Reference is printed on all sales documents (you can f.i. enter...
[fa-stable.git] / taxes / tax_types.php
index f0cf4c8140bd89bd763b2f445ab130d7856a98ba..55e40950d43ff4534c5a5272aae4d9c21087507b 100644 (file)
@@ -23,11 +23,13 @@ function can_process()
        if (strlen($_POST['name']) == 0)
        {
                display_error(_("The tax type name cannot be empty."));
+               set_focus('name');
                return false;
        }
        elseif (!check_num('rate', 0))
        {
                display_error( _("The default tax rate must be numeric and not less than zero."));
+               set_focus('rate');
                return false;
        }
 
@@ -40,7 +42,7 @@ if (isset($_POST['ADD_ITEM']) && can_process())
 {
 
        add_tax_type($_POST['name'], $_POST['sales_gl_code'],
-               $_POST['purchasing_gl_code'], imput_num('rate'));
+               $_POST['purchasing_gl_code'], input_num('rate'));
        meta_forward($_SERVER['PHP_SELF']);
 }
 
@@ -64,6 +66,7 @@ function can_delete($selected_id)
        if ($myrow[0] > 0)
        {
                display_error(_("Cannot delete this tax type because tax groups been created referring to it."));
+
                return false;
        }