[dbo].[AcctTransactionsApplyToInfo]
CREATE TABLE [dbo].[AcctTransactionsApplyToInfo]
(
[AcctTransactionsApplyToInfoID] [int] NOT NULL IDENTITY(1, 1),
[AcctTransactionsFID] [int] NOT NULL,
[ApplyToDocument] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ApplyAmount] [money] NOT NULL,
[ApplyToDocumentType] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AcctTransactionsApplyToInfo] ADD CONSTRAINT [PK_AcctTransactionsApplyToInfoID] PRIMARY KEY NONCLUSTERED ([AcctTransactionsApplyToInfoID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_AcctTransactionsFID] ON [dbo].[AcctTransactionsApplyToInfo] ([AcctTransactionsFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ApplyToDocument] ON [dbo].[AcctTransactionsApplyToInfo] ([ApplyToDocument]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AcctTransactionsApplyToInfo] ADD CONSTRAINT [FK_AcctTransactionsApplyToInfo_AcctTransactions] FOREIGN KEY ([AcctTransactionsFID]) REFERENCES [dbo].[AcctTransactions] ([ATPriKey])
GO
GRANT SELECT ON [dbo].[AcctTransactionsApplyToInfo] TO [MssExec]
GRANT INSERT ON [dbo].[AcctTransactionsApplyToInfo] TO [MssExec]
GRANT DELETE ON [dbo].[AcctTransactionsApplyToInfo] TO [MssExec]
GRANT UPDATE ON [dbo].[AcctTransactionsApplyToInfo] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'AcctTransactionsApplyToInfo', 'COLUMN', N'AcctTransactionsApplyToInfoID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an account transaction.', 'SCHEMA', N'dbo', 'TABLE', N'AcctTransactionsApplyToInfo', 'COLUMN', N'AcctTransactionsFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The applied amount of the applied document.', 'SCHEMA', N'dbo', 'TABLE', N'AcctTransactionsApplyToInfo', 'COLUMN', N'ApplyAmount'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The document number of the applied document.', 'SCHEMA', N'dbo', 'TABLE', N'AcctTransactionsApplyToInfo', 'COLUMN', N'ApplyToDocument'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Transaction type the applied document generated.', 'SCHEMA', N'dbo', 'TABLE', N'AcctTransactionsApplyToInfo', 'COLUMN', N'ApplyToDocumentType'
GO