Much better presentation of new Balance Sheet, P&L Statement and Monthly Breakdown.
[fa-stable.git] / gl / includes / db / gl_db_accounts.inc
index bcecad749aba6f546f97e4c7ba22f27bd3e6ab64..414ad8e277f727c92035c807c25051bba7ee691d 100644 (file)
@@ -56,7 +56,8 @@ function get_gl_accounts_all($balance=-1)
        elseif ($balance == 0)  
                $where ="WHERE balance_sheet>".CL_EQUITY." OR balance_sheet=0"; // backwards compatibility
        $sql = "SELECT ".TB_PREF."chart_master.account_code, ".TB_PREF."chart_master.account_name, ".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_types.parent, ".TB_PREF."chart_class.class_name AS AccountClassName, ".TB_PREF."chart_class.cid AS ClassID, 
+               ".TB_PREF."chart_class.balance_sheet AS ClassType
                FROM ".TB_PREF."chart_types INNER JOIN ".TB_PREF."chart_class ON ".TB_PREF."chart_types.class_id=".TB_PREF."chart_class.cid
                LEFT JOIN ".TB_PREF."chart_master ON ".TB_PREF."chart_master.account_type=".TB_PREF."chart_types.id ";
        if ($balance != -1)