X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=taxes%2Ftax_types.php;h=55e40950d43ff4534c5a5272aae4d9c21087507b;hb=df0fd2e5ff26de79e7d86c4206582012833bcef5;hp=1ab9f95576a3fc6c2abd82099a546854c26af6d1;hpb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;p=fa-stable.git diff --git a/taxes/tax_types.php b/taxes/tax_types.php index 1ab9f955..55e40950 100644 --- a/taxes/tax_types.php +++ b/taxes/tax_types.php @@ -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; } @@ -136,7 +139,7 @@ if (isset($selected_id)) hidden('selected_id', $selected_id); } text_row_ex(_("Description:"), 'name', 50); -small_amount_row(_("Default Rate:"), 'rate', '', "", "%"); +small_amount_row(_("Default Rate:"), 'rate', '', "", "%", user_percent_dec()); gl_all_accounts_list_row(_("Sales GL Account:"), 'sales_gl_code', null); gl_all_accounts_list_row(_("Purchasing GL Account:"), 'purchasing_gl_code', null);