Merged changes from main CVS up to 2.1.5
[fa-stable.git] / gl / includes / db / gl_db_accounts.inc
index 474ea713b633cfdc151397eae39589b7f1ff02d6..26612b58225cfd95eb7c9b4b84e9c3f1031b5133 100644 (file)
@@ -56,6 +56,10 @@ function get_gl_accounts_all($balance=-1)
        elseif ($balance == 0)  
                $where ="WHERE ctype>".CL_EQUITY." OR ctype=0"; // backwards compatibility
        $sql = "SELECT ".TB_PREF."chart_master.account_code, ".TB_PREF."chart_master.account_code2, ".TB_PREF."chart_master.account_name, 
+               ".TB_PREF."chart_types.name AS AccountTypeName,".TB_PREF."chart_types.id AS AccountType
+               $where";
+
+       $sql = "SELECT ".TB_PREF."chart_master.account_code, ".TB_PREF."chart_master.account_name, ".TB_PREF."chart_master.account_code2,
                ".TB_PREF."chart_types.name AS AccountTypeName,".TB_PREF."chart_types.id AS AccountType,
                ".TB_PREF."chart_types.parent, ".TB_PREF."chart_class.class_name AS AccountClassName, ".TB_PREF."chart_class.cid AS ClassID, 
                ".TB_PREF."chart_class.ctype AS ClassType