Tables [dbo].[SalesTaxSetup]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created8:21:13 AM Thursday, June 27, 2013
Last Modified11:13:43 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsDefaultDescription
Primary Key PK_SalesTaxSetup: SalesTaxSetupIDCheck Constraints CK_SalesTaxSetup_TableSize_To_1 : ([SalesTaxSetupID]<(2) AND [SalesTaxSetupID]>(0))SalesTaxSetupIDint4
No
((1))Primary key.
ServiceAccountNumbervarchar(32)32
Yes
The account number assigned to the user by the sales tax service provider.
ServiceLicenseKeyvarchar(32)32
Yes
The license key assigned to the user by the sales tax service provider.
ServiceUrlvarchar(64)64
Yes
The url that points to the sales tax web service.
Foreign Keys FK_SalesTaxSetup_ItemCode: [dbo].[ItemCode].SalesTaxItemCodeFIDSalesTaxItemCodeFIDint4
No
The foreign key to an Item Code that is used for recording sales tax revenue transactions.
Foreign Keys FK_SalesTaxSetup_SalesTaxCode: [dbo].[SalesTaxCode].DefaultSalesTaxCodeFIDDefaultSalesTaxCodeFIDint4
Yes
The foreign key to the default Sales Tax Code that is used for any Item Codes that are not directly mapped to a Sales Tax Code.
IsActivatedbit1
No
((1))Flag that indicates if the sales tax feature is activated (1) or not (0).  Users can switch the feature on and off through this setting.
AutoCalculatebit1
Yes
((0))Flag that indicates if sales tax should be automatically calculated while constructing an invoice (1) or not (0).  Users can switch the feature on and off through this setting.
SendInvForExemptCustbit1
Yes
((0))Flag that indicates whether invoices for tax-exempt customers are sent to the service (1) or not (0).  Users can switch the feature on and off through this setting.
AutoAddressValidationbit1
Yes
((0))Flag that indicates whether addresses associated to revenue items should be validated by Avalara''s address service prior to constructing invoices (1) or not (0).  Users can switch the feature on and off through this setting.
Indexes Indexes
NameColumnsUnique
Primary Key PK_SalesTaxSetup: SalesTaxSetupIDPK_SalesTaxSetupSalesTaxSetupID
Yes
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_SalesTaxSetup_TableSize_To_1SalesTaxSetupID([SalesTaxSetupID]<(2) AND [SalesTaxSetupID]>(0))
Foreign Keys Foreign Keys
NameColumns
FK_SalesTaxSetup_SalesTaxCodeDefaultSalesTaxCodeFID->[dbo].[SalesTaxCode].[SalesTaxCodeID]
FK_SalesTaxSetup_ItemCodeSalesTaxItemCodeFID->[dbo].[ItemCode].[ICPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SalesTaxSetup]
(
[SalesTaxSetupID] [int] NOT NULL CONSTRAINT [DF_SalesTaxSetup_SalesTaxSetupID] DEFAULT ((1)),
[ServiceAccountNumber] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceLicenseKey] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServiceUrl] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SalesTaxItemCodeFID] [int] NOT NULL,
[DefaultSalesTaxCodeFID] [int] NULL,
[IsActivated] [bit] NOT NULL CONSTRAINT [DF_SalesTaxSetup_IsActivated] DEFAULT ((1)),
[AutoCalculate] [bit] NULL CONSTRAINT [DF_SalesTaxSetup_AutoCalculate] DEFAULT ((0)),
[SendInvForExemptCust] [bit] NULL CONSTRAINT [DF_SalesTaxSetup_SendInvForExemptCust] DEFAULT ((0)),
[AutoAddressValidation] [bit] NULL CONSTRAINT [DF_SalesTaxSetup_AutoAddressValidation] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SalesTaxSetup] ADD CONSTRAINT [CK_SalesTaxSetup_TableSize_To_1] CHECK (([SalesTaxSetupID]<(2) AND [SalesTaxSetupID]>(0)))
GO
ALTER TABLE [dbo].[SalesTaxSetup] ADD CONSTRAINT [PK_SalesTaxSetup] PRIMARY KEY NONCLUSTERED  ([SalesTaxSetupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SalesTaxSetup] ADD CONSTRAINT [FK_SalesTaxSetup_SalesTaxCode] FOREIGN KEY ([DefaultSalesTaxCodeFID]) REFERENCES [dbo].[SalesTaxCode] ([SalesTaxCodeID])
GO
ALTER TABLE [dbo].[SalesTaxSetup] ADD CONSTRAINT [FK_SalesTaxSetup_ItemCode] FOREIGN KEY ([SalesTaxItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
GRANT SELECT ON  [dbo].[SalesTaxSetup] TO [MssExec]
GRANT INSERT ON  [dbo].[SalesTaxSetup] TO [MssExec]
GRANT DELETE ON  [dbo].[SalesTaxSetup] TO [MssExec]
GRANT UPDATE ON  [dbo].[SalesTaxSetup] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag that indicates whether addresses associated to revenue items should be validated by Avalara''s address service prior to constructing invoices (1) or not (0).  Users can switch the feature on and off through this setting.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'AutoAddressValidation'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag that indicates if sales tax should be automatically calculated while constructing an invoice (1) or not (0).  Users can switch the feature on and off through this setting.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'AutoCalculate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The foreign key to the default Sales Tax Code that is used for any Item Codes that are not directly mapped to a Sales Tax Code.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'DefaultSalesTaxCodeFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag that indicates if the sales tax feature is activated (1) or not (0).  Users can switch the feature on and off through this setting.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'IsActivated'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The foreign key to an Item Code that is used for recording sales tax revenue transactions.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'SalesTaxItemCodeFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'SalesTaxSetupID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag that indicates whether invoices for tax-exempt customers are sent to the service (1) or not (0).  Users can switch the feature on and off through this setting.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'SendInvForExemptCust'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The account number assigned to the user by the sales tax service provider.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'ServiceAccountNumber'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The license key assigned to the user by the sales tax service provider.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'ServiceLicenseKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The url that points to the sales tax web service.', 'SCHEMA', N'dbo', 'TABLE', N'SalesTaxSetup', 'COLUMN', N'ServiceUrl'
GO
Uses
Used By