------------------------------------------------------------------------------
-- ADVANTAGE 2004.4.1
-- OPTIONS and APPLICATION SINCE ADVANTAGE 2004.4.0
-- 19/10/2008
------------------------------------------------------------------------------


----------------------------------------------------------------
-- New System Options
----------------------------------------------------------------

    IF NOT EXISTS
        (
            SELECT Sys_AW_Options_ID
            FROM Sys_AW_Options
            WHERE Control_Type = 'OptionButton' AND
                  Control_Name = 'optEnterpriseLogin' AND
                  Control_Index = 0
        )
    BEGIN
        INSERT Sys_AW_Options
            (
                Control_Type,
                Control_Name,
                Control_Index,
                Control_Value
            )
        VALUES
            (
                'OptionButton',
                'optEnterpriseLogin',
                0,
                'True'
            )
    END

------------------------------------

    IF NOT EXISTS
        (
            SELECT Sys_AW_Options_ID
            FROM Sys_AW_Options
            WHERE Control_Type = 'OptionButton' AND
                  Control_Name = 'optEnterpriseLogin' AND
                  Control_Index = 1
        )
    BEGIN
        INSERT Sys_AW_Options
            (
                Control_Type,
                Control_Name,
                Control_Index,
                Control_Value
            )
        VALUES
            (
                'OptionButton',
                'optEnterpriseLogin',
                1,
                'False'
            )
    END

------------------------------------

    IF NOT EXISTS
        (
            SELECT Sys_AW_Options_ID
            FROM Sys_AW_Options
            WHERE Control_Type = 'OptionButton' AND
                  Control_Name = 'optEnterpriseLogin' AND
                  Control_Index = 2
        )
    BEGIN
        INSERT Sys_AW_Options
            (
                Control_Type,
                Control_Name,
                Control_Index,
                Control_Value
            )
        VALUES
            (
                'OptionButton',
                'optEnterpriseLogin',
                2,
                'False'
            )
    END

------------------------------------

----------------------------------------------------------------
-- Retired System Options
----------------------------------------------------------------


----------------------------------------------------------------
-- New Applications
----------------------------------------------------------------



------------------------------------

--------------------------------------------------


----------------------------------------------------------------------------
-- Retired Applications
----------------------------------------------------------------------------



------------------------------------

--------------------------------------------------

----------------------------------------------------------------------------
-- Lookup Editor
----------------------------------------------------------------------------

IF NOT EXISTS
    (
        SELECT Sys_AW_Lookup_Editor_ID
        FROM Sys_AW_Lookup_Editor
        WHERE TableName = 'Sys_AB_B2' AND
              Caption = 'GL Balance Sheet Division 2'
    )
    BEGIN
        INSERT Sys_AW_Lookup_Editor
            (
                Sys_AW_Lookup_Editor_ID,
                TableName,
                Caption,
                ColumnWidths
            )
        VALUES
            (
                76,
                'Sys_AB_B2',
                'GL Balance Sheet Division 2',
                '620,10000'
            )
    END

------------------------------------

IF NOT EXISTS
    (
        SELECT Sys_AW_Lookup_Editor_ID
        FROM Sys_AW_Lookup_Editor
        WHERE TableName = 'Sys_AB_B3' AND
              Caption = 'GL Balance Sheet Division 3'
    )
    BEGIN
        INSERT Sys_AW_Lookup_Editor
            (
                Sys_AW_Lookup_Editor_ID,
                TableName,
                Caption,
                ColumnWidths
            )
        VALUES
            (
                77,
                'Sys_AB_B3',
                'GL Balance Sheet Division 3',
                '620,10000'
            )
    END

------------------------------------

IF NOT EXISTS
    (
        SELECT Sys_AW_Lookup_Editor_ID
        FROM Sys_AW_Lookup_Editor
        WHERE TableName = 'Sys_AB_I3' AND
              Caption = 'GL Income Statement Division 3'
    )
    BEGIN
        INSERT Sys_AW_Lookup_Editor
            (
                Sys_AW_Lookup_Editor_ID,
                TableName,
                Caption,
                ColumnWidths
            )
        VALUES
            (
                78,
                'Sys_AB_I3',
                'GL Income Statement Division 3',
                '620,10000'
            )
    END

------------------------------------

IF NOT EXISTS
    (
        SELECT Sys_AW_Lookup_Editor_ID
        FROM Sys_AW_Lookup_Editor
        WHERE TableName = 'Sys_AB_I4' AND
              Caption = 'GL Income Statement Division 4'
    )
    BEGIN
        INSERT Sys_AW_Lookup_Editor
            (
                Sys_AW_Lookup_Editor_ID,
                TableName,
                Caption,
                ColumnWidths
            )
        VALUES
            (
                79,
                'Sys_AB_I4',
                'GL Income Statement Division 4',
                '620,10000'
            )
    END

--------------------------------------------------

