Adding an already existing GL Account Code does not report as error
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 11 Sep 2012 06:27:26 +0000 (08:27 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 11 Sep 2012 06:27:26 +0000 (08:27 +0200)
gl/manage/gl_accounts.php

index 221a76cd28e8d7944f1fc84157fa7c12372f8f6f..d211a491798cbbc7d0f60efa4f972ff9de54dfb1 100644 (file)
@@ -65,7 +65,6 @@ if (isset($_POST['add']) || isset($_POST['update']))
            display_error( _("The account code must be numeric."));
                set_focus('account_code');
        }
-
        if ($input_error != 1)
        {
                if ($accounts_alpha == 2)
@@ -99,6 +98,8 @@ if (isset($_POST['add']) || isset($_POST['update']))
                                        display_notification(_("New account has been added."));
                                        $selected_account = $_POST['AccountList'] = $_POST['account_code'];
                                }
+                       else
+                 display_error(_("Account not added, possible duplicate Account Code."));
                }
                $Ajax->activate('_page_body');
        }