
------------------------------------------------------------------------------
-- ADVANTAGE 2004.3.1
-- OPTIONS and APPLICATION SINCE ADVANTAGE 2004.3.0
-- 22 AUG 2006
------------------------------------------------------------------------------


--************************************************
--******     NB. NB. NB. RUN ONLY ONCE     *******
--************************************************


-- USE ADV2004
-- GO



----------------------------------------------------------------
-- New Options
----------------------------------------------------------------

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

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

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

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

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

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

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

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


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

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

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

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