Fixed debit/credit entry check.
[fa-stable.git] / gl / gl_journal.php
index 31a4da95d3ec962aa6293c5224a8be74e00adee4..e6f1bcc6b0db243d615090de2e3e27e52a551d59 100644 (file)
@@ -137,8 +137,7 @@ function check_item_data()
                        return false;
        }
 
-//     if (!(!strlen($_POST['AmountDebit']) ^ !strlen($_POST['AmountCredit'])))
-       if (input_num('AmountDebit')!=0 && input_num('AmountCredit')!=0)
+       if (!(input_num('AmountDebit')!=0 ^ input_num('AmountCredit')!=0) )
        {
                display_error(_("You must enter either a debit amount or a credit amount."));
                return false;