
IF NOT EXISTS (SELECT 1 FROM pal_SurfaceField WHERE surfaceFieldName = 'WholesalerOrderQuoteItems_QuoteItems_SelectAll')
BEGIN

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] ON 
INSERT INTO [dbo].[pal_SurfaceField]
([recId]
,[surfaceId]
,[surfaceFieldName]
,[surfaceFieldDisplay]
,[surfaceFieldTypeId]
,[length]
,[required]
,[lookupCategory]
,[relationalFields]
,[relationalValues]
,[relationalOrderBy]
,[relationalSurface]
,[relationalObject]
,[parentId]
,[sequence]
,[isActive]
,[isGrid]
,[isFilter]
,[colSequence]
,[contentId]
,[defaultToCurrent]
,[isControlled]
,[controlledValue]
,[controlText]
,[isAutoPostback]
,[isHidden]
,[isReadOnly]
,[placeholder]
,[isUnique]
,[actionType]
,[action]
,[actionSource]
,[isComparable]
,[alternateView]
,[isHiddenFromWizzard]
,[surfaceDateTypeId]
,[isHiddenFromView]
,[actionValue]
,[surfaceFieldSize]
,[isLabelHidden]
,[isOnNewLine]
,[labelSize]
,[isHiddenFromForm]
,[accessLevel]
,[hasBottomBorder]
,[hasFullBorder]
,[defaultValue]
,[validationType]
,[enableBulkUpdate]
,[isCurrency]
,[isVerticalHeader]
,[gridSequence]
,[isGrouped]
,[isCloneable]
,[isCustomSource]
,[relationalWhere]
,[groupedDisplayCount])
VALUES
(3219,
3099,
N'WholesalerOrderQuoteItems_QuoteItems_SelectAll',
N'Select All',
8,
0,
0,
0,
'',
'',
'',
'',
'',
1869,
1,
1,
0,
0,
0,
0,
0,
0,
'',
N'Select All Items',
0,
0,
0,
'',
0,
0,
0,
0,
0,	
0,
0,
0,
0,
'',
3,
1,
0,
12,
0,
1,
0,
0,
'',
0,
0,
0,
0,
11,
0,
0,
0,
'',
0);

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] OFF 
END;

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE
	TABLE_NAME = 'publ_WholesalerOrderProducts' AND
	COLUMN_NAME = 'WholesalerOrderQuoteItems_QuoteItems_SelectAll')
BEGIN

ALTER TABLE [dbo].[publ_WholesalerOrderProducts]
ADD [WholesalerOrderQuoteItems_QuoteItems_SelectAll] [varchar] NULL;

UPDATE [dbo].[publ_WholesalerOrderProducts]
SET [WholesalerOrderQuoteItems_QuoteItems_SelectAll] = '';

END;


IF NOT EXISTS (SELECT 1 FROM pal_SurfaceField WHERE surfaceFieldName = 'WholesalerFinalOrderItems_FinalOrderItems_SelectAll')
BEGIN

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] ON 
INSERT INTO [dbo].[pal_SurfaceField]
([recId]
,[surfaceId]
,[surfaceFieldName]
,[surfaceFieldDisplay]
,[surfaceFieldTypeId]
,[length]
,[required]
,[lookupCategory]
,[relationalFields]
,[relationalValues]
,[relationalOrderBy]
,[relationalSurface]
,[relationalObject]
,[parentId]
,[sequence]
,[isActive]
,[isGrid]
,[isFilter]
,[colSequence]
,[contentId]
,[defaultToCurrent]
,[isControlled]
,[controlledValue]
,[controlText]
,[isAutoPostback]
,[isHidden]
,[isReadOnly]
,[placeholder]
,[isUnique]
,[actionType]
,[action]
,[actionSource]
,[isComparable]
,[alternateView]
,[isHiddenFromWizzard]
,[surfaceDateTypeId]
,[isHiddenFromView]
,[actionValue]
,[surfaceFieldSize]
,[isLabelHidden]
,[isOnNewLine]
,[labelSize]
,[isHiddenFromForm]
,[accessLevel]
,[hasBottomBorder]
,[hasFullBorder]
,[defaultValue]
,[validationType]
,[enableBulkUpdate]
,[isCurrency]
,[isVerticalHeader]
,[gridSequence]
,[isGrouped]
,[isCloneable]
,[isCustomSource]
,[relationalWhere]
,[groupedDisplayCount])
VALUES
(3221,
3099,
N'WholesalerFinalOrderItems_FinalOrderItems_SelectAll',
N'Select All',
8,
0,
0,
0,
'',
'',
'',
'',
'',
3172,
1,
1,
0,
0,
0,
0,
0,
0,
'',
N'Select All Items',
0,
0,
0,
'',
0,
0,
0,
0,
0,	
0,
0,
0,
0,
'',
3,
1,
0,
12,
0,
1,
0,
0,
'',
0,
0,
0,
0,
11,
0,
0,
0,
'',
0);

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] OFF 
END;

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE
	TABLE_NAME = 'publ_WholesalerOrderProducts' AND
	COLUMN_NAME = 'WholesalerFinalOrderItems_FinalOrderItems_SelectAll')
BEGIN

ALTER TABLE [dbo].[publ_WholesalerOrderProducts]
ADD [WholesalerFinalOrderItems_FinalOrderItems_SelectAll] [varchar] NULL;

UPDATE [dbo].[publ_WholesalerOrderProducts]
SET [WholesalerFinalOrderItems_FinalOrderItems_SelectAll] = '';

END;

IF NOT EXISTS (SELECT 1 FROM pal_SurfaceField WHERE surfaceFieldName = 'WholesalerOrderFulfilmentItems_OrderFulfilmentItems_SelectAll')
BEGIN

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] ON 
INSERT INTO [dbo].[pal_SurfaceField]
([recId]
,[surfaceId]
,[surfaceFieldName]
,[surfaceFieldDisplay]
,[surfaceFieldTypeId]
,[length]
,[required]
,[lookupCategory]
,[relationalFields]
,[relationalValues]
,[relationalOrderBy]
,[relationalSurface]
,[relationalObject]
,[parentId]
,[sequence]
,[isActive]
,[isGrid]
,[isFilter]
,[colSequence]
,[contentId]
,[defaultToCurrent]
,[isControlled]
,[controlledValue]
,[controlText]
,[isAutoPostback]
,[isHidden]
,[isReadOnly]
,[placeholder]
,[isUnique]
,[actionType]
,[action]
,[actionSource]
,[isComparable]
,[alternateView]
,[isHiddenFromWizzard]
,[surfaceDateTypeId]
,[isHiddenFromView]
,[actionValue]
,[surfaceFieldSize]
,[isLabelHidden]
,[isOnNewLine]
,[labelSize]
,[isHiddenFromForm]
,[accessLevel]
,[hasBottomBorder]
,[hasFullBorder]
,[defaultValue]
,[validationType]
,[enableBulkUpdate]
,[isCurrency]
,[isVerticalHeader]
,[gridSequence]
,[isGrouped]
,[isCloneable]
,[isCustomSource]
,[relationalWhere]
,[groupedDisplayCount])
VALUES
(3222,
3099,
N'WholesalerOrderFulfilmentItems_OrderFulfilmentItems_SelectAll',
N'Select All',
8,
0,
0,
0,
'',
'',
'',
'',
'',
3174,
1,
1,
0,
0,
0,
0,
0,
0,
'',
N'Select All Items',
0,
0,
0,
'',
0,
0,
0,
0,
0,	
0,
0,
0,
0,
'',
3,
1,
0,
12,
0,
1,
0,
0,
'',
0,
0,
0,
0,
11,
0,
0,
0,
'',
0);

SET IDENTITY_INSERT [dbo].[pal_SurfaceField] OFF 
END;

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE
	TABLE_NAME = 'publ_WholesalerOrderProducts' AND
	COLUMN_NAME = 'WholesalerOrderFulfilmentItems_OrderFulfilmentItems_SelectAll')
BEGIN

ALTER TABLE [dbo].[publ_WholesalerOrderProducts]
ADD [WholesalerOrderFulfilmentItems_OrderFulfilmentItems_SelectAll] [varchar] NULL;

UPDATE [dbo].[publ_WholesalerOrderProducts]
SET [WholesalerOrderFulfilmentItems_OrderFulfilmentItems_SelectAll] = '';

END;
