Tables [dbo].[AdvanceSetup]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)1
Created5:00:53 PM Monday, April 21, 2008
Last Modified9:11:11 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Cluster Primary Key PK_AdvanceSetup: AdvanceSetupIDAdvanceSetupIDint4
No
1 - 1Primary key.
ManualGLFlagbit1
No
0 if the manual advance expense account is not used, 1 if it is used.
ManualGLvarchar(66)66
Yes
The manual advance expense account.
Accountvarchar(16)16
Yes
The account section of the advance expense account.
SubAccountvarchar(16)16
Yes
The sub-account section of the advance expense account.
OnHoldFlagbit1
Yes
AmountBeyondPercentagemoney8
Yes
ManagerCapAmountmoney8
Yes
CreateAdvancesFromCommissionsbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_AdvanceSetup: AdvanceSetupIDPK_AdvanceSetupAdvanceSetupID
Yes
80
Check Constraints Check Constraints
NameConstraint
CK_AdvanceSetupCount((1)>=[dbo].[AdvanceSetupCount]())
CK_ManualGLFlagSetup([ManualGLFlag]=(1) AND [ManualGL] IS NOT NULL OR [ManualGLFlag]=(0) AND [Account] IS NOT NULL AND [SubAccount] IS NOT NULL)
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AdvanceSetup]
(
[AdvanceSetupID] [int] NOT NULL IDENTITY(1, 1),
[ManualGLFlag] [bit] NOT NULL,
[ManualGL] [varchar] (66) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Account] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SubAccount] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OnHoldFlag] [bit] NULL,
[AmountBeyondPercentage] [money] NULL,
[ManagerCapAmount] [money] NULL,
[CreateAdvancesFromCommissions] [bit] NOT NULL CONSTRAINT [DF_AdvanceSetup_CreateAdvancesFromCommissions] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvanceSetup] ADD CONSTRAINT [CK_AdvanceSetupCount] CHECK (((1)>=[dbo].[AdvanceSetupCount]()))
GO
ALTER TABLE [dbo].[AdvanceSetup] ADD CONSTRAINT [CK_ManualGLFlagSetup] CHECK (([ManualGLFlag]=(1) AND [ManualGL] IS NOT NULL OR [ManualGLFlag]=(0) AND [Account] IS NOT NULL AND [SubAccount] IS NOT NULL))
GO
ALTER TABLE [dbo].[AdvanceSetup] ADD CONSTRAINT [PK_AdvanceSetup] PRIMARY KEY CLUSTERED  ([AdvanceSetupID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON  [dbo].[AdvanceSetup] TO [MssExec]
GRANT INSERT ON  [dbo].[AdvanceSetup] TO [MssExec]
GRANT DELETE ON  [dbo].[AdvanceSetup] TO [MssExec]
GRANT UPDATE ON  [dbo].[AdvanceSetup] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The account section of the advance expense account.', 'SCHEMA', N'dbo', 'TABLE', N'AdvanceSetup', 'COLUMN', N'Account'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'AdvanceSetup', 'COLUMN', N'AdvanceSetupID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The manual advance expense account.', 'SCHEMA', N'dbo', 'TABLE', N'AdvanceSetup', 'COLUMN', N'ManualGL'
GO
EXEC sp_addextendedproperty N'MS_Description', N'0 if the manual advance expense account is not used, 1 if it is used.', 'SCHEMA', N'dbo', 'TABLE', N'AdvanceSetup', 'COLUMN', N'ManualGLFlag'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The sub-account section of the advance expense account.', 'SCHEMA', N'dbo', 'TABLE', N'AdvanceSetup', 'COLUMN', N'SubAccount'
GO
Uses