[dbo].[AdvancePostingInformation]
CREATE TABLE [dbo].[AdvancePostingInformation]
(
[AdvancePostingInformationID] [int] NOT NULL IDENTITY(1, 1),
[AdvanceFID] [int] NOT NULL,
[PostedDate] [datetime] NOT NULL,
[PostedBySysuserFID] [int] NOT NULL,
[DocDate] [datetime] NOT NULL,
[JournalDate] [datetime] NOT NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvancePostingInformation] ADD CONSTRAINT [PK_AdvancePostingInformation] PRIMARY KEY NONCLUSTERED ([AdvancePostingInformationID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_AdvancePostingInformation_AdvanceFID] ON [dbo].[AdvancePostingInformation] ([AdvanceFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AdvancePostingInformation_PostedBySysuserFID] ON [dbo].[AdvancePostingInformation] ([PostedBySysuserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvancePostingInformation] ADD CONSTRAINT [FK_AdvancePostingInformation_Advance] FOREIGN KEY ([AdvanceFID]) REFERENCES [dbo].[Advance] ([PriKey])
GO
ALTER TABLE [dbo].[AdvancePostingInformation] ADD CONSTRAINT [FK_AdvancePostingInformation_PostedBySysUserFID] FOREIGN KEY ([PostedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[AdvancePostingInformation] TO [MssExec]
GRANT INSERT ON [dbo].[AdvancePostingInformation] TO [MssExec]
GRANT DELETE ON [dbo].[AdvancePostingInformation] TO [MssExec]
GRANT UPDATE ON [dbo].[AdvancePostingInformation] TO [MssExec]
GO