------------------------------------------------------------------------------
-- ADVANTAGE 2004.4.2
-- OPTIONS and APPLICATION SINCE ADVANTAGE 2004.4.1
-- 24/01/2009
------------------------------------------------------------------------------


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

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

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

    IF NOT EXISTS
        (
            SELECT Sys_AW_Options_ID
            FROM Sys_AW_Options
            WHERE Control_Type = 'CheckBox' AND
                  Control_Name = 'chkDisableSourceJob' AND
                  Control_Index = 0
        )
        BEGIN
            INSERT Sys_AW_Options
                (
                    Control_Type,
                    Control_Name,
                    Control_Index,
                    Control_Value
                )
            VALUES
                (
                    'CheckBox',
                    'chkDisableSourceJob',
                    0,
                    '1'
                )
        END

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

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

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

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

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

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

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

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

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

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

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



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


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



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

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


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



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

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

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