Tables [dbo].[SAConfigQuotes]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:58:58 AM Thursday, March 21, 2019
Last Modified1:14:16 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_SAConfigQuotes: ConfigQuoteIDConfigQuoteIDint4
False
1000 - 1
ConfigQuoteNamevarchar(50)50
False
Foreign Keys FK_SAConfigQuotes_OpportunityID_SAOpportunity: [dbo].[SAOpportunity].OpportunityIDOpportunityIDint4
False
Foreign Keys FK_SAConfigQuotes_CustomerID_ARCustomers: [dbo].[ARCustomers].CustomerIDCustomerIDint4
True
Foreign Keys FK_SAConfigQuotes_SalesRepID_ARSalesReps: [dbo].[ARSalesReps].SalesRepIDSalesRepIDint4
False
Descriptionvarchar(100)100
True
CreateDatedatetime8
False
(getdate())
LastUpdateddatetime8
False
(getdate())
QuoteDatedatetime8
False
(getdate())
DueByDatedatetime8
True
NeededByDatedatetime8
True
PONumbervarchar(20)20
True
OrderedByvarchar(50)50
True
ExpirationDatedatetime8
True
Statusvarchar(20)20
True
Foreign Keys FK_SAConfigQuotes_SOID_SOOrders: [dbo].[SOOrders].SOIDSOIDint4
True
SONumbervarchar(15)15
True
Foreign Keys FK_SAConfigQuotes_BillToID_ARCustomers: [dbo].[ARCustomers].BillToIDBillToIDint4
True
Foreign Keys FK_SAConfigQuotes_ShipToID_ARCustomers: [dbo].[ARCustomers].ShipToIDShipToIDint4
True
MultiShipbit1
False
((0))
HidePricebit1
False
((0))
HideAccessorybit1
False
((0))
EnableLeasebit1
False
((0))
LeasePrintOptionbit1
False
((0))
LeaseTermIDint4
True
LeaseIncludeBuyoutbit1
False
((0))
LeaseBuyoutAmountmoney8
True
LeaseWrapBuyoutbit1
True
TotalPurchasePricemoney8
True
TotalSuggestedPricemoney8
True
TotalOutcostOverridemoney8
True
TotalOutcostCalculatedmoney8
True
Foreign Keys FK_SAConfigQuotes_ProspectID_SAProspects: [dbo].[SAProspects].ProspectIDProspectIDint4
True
LeaseNamevarchar(50)50
True
LeaseCoNamevarchar(50)50
True
termInMonthstinyint1
True
purchaseOptionsvarchar(50)50
True
LeaseFactordecimal(14,8)9
True
LeasePaymentmoney8
True
EnableCPPbit1
True
BlackVolumedecimal(18,0)9
True
ColorVolumedecimal(18,0)9
True
ServiceRatedecimal(14,8)9
True
ServiceClrRatedecimal(14,8)9
True
OverageRatedecimal(14,8)9
True
OverageClrRatedecimal(14,8)9
True
TotalCPPmoney8
True
ServiceAmountmoney8
True
ServiceClrAmountmoney8
True
CalcCPPFromListbit1
True
Remarksvarchar(1024)1024
True
TotalServicemoney8
True
InclServiceOnLeasebit1
True
InclPrintersOnServicebit1
True
PriceGroupIDint4
True
ContactFirstNamevarchar(50)50
True
ContactLastNamevarchar(50)50
True
ContactEmailvarchar(50)50
True
SameAsBillTobit1
True
((0))
ServiceBaseCostmoney8
True
ServiceConnectFeemoney8
True
ServiceInstallFeemoney8
True
Foreign Keys FK_SAConfigQuotes_TaxCodeID_ShTaxCodes: [dbo].[ShTaxCodes].TaxCodeIDTaxCodeIDint4
True
ServiceBlackAllocdecimal(18,0)9
True
ServiceColorAllocdecimal(18,0)9
True
Completedbit1
True
ShowAllCustomerbit1
True
QuoteTypeint4
True
((0))
MultiShipOneToOnebit1
True
EquipmentAndContractbit1
True
MultiShipSingleOrderbit1
False
((0))
MultiShipOrdersByShipTobit1
False
((0))
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_SAConfigQuotes: ConfigQuoteIDPK_SAConfigQuotesConfigQuoteID
True
80
NameColumns
FK_SAConfigQuotes_BillToID_ARCustomersBillToID->[dbo].[ARCustomers].[CustomerID]
FK_SAConfigQuotes_CustomerID_ARCustomersCustomerID->[dbo].[ARCustomers].[CustomerID]
FK_SAConfigQuotes_OpportunityID_SAOpportunityOpportunityID->[dbo].[SAOpportunity].[OpportunityID]
FK_SAConfigQuotes_ProspectID_SAProspectsProspectID->[dbo].[SAProspects].[ProspectID]
FK_SAConfigQuotes_SalesRepID_ARSalesRepsSalesRepID->[dbo].[ARSalesReps].[SalesRepID]
FK_SAConfigQuotes_ShipToID_ARCustomersShipToID->[dbo].[ARCustomers].[CustomerID]
FK_SAConfigQuotes_SOID_SOOrdersSOID->[dbo].[SOOrders].[SOID]
FK_SAConfigQuotes_TaxCodeID_ShTaxCodesTaxCodeID->[dbo].[ShTaxCodes].[TaxCodeID]
CREATE TABLE [dbo].[SAConfigQuotes]
(
[ConfigQuoteID] [int] NOT NULL IDENTITY(1000, 1),
[ConfigQuoteName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[OpportunityID] [int] NOT NULL,
[CustomerID] [int] NULL,
[SalesRepID] [int] NOT NULL,
[Description] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_SAConfigQuotes_CreateDate] DEFAULT (getdate()),
[LastUpdated] [datetime] NOT NULL CONSTRAINT [DF_SAConfigQuotes_LastUpdated] DEFAULT (getdate()),
[QuoteDate] [datetime] NOT NULL CONSTRAINT [DF_SAConfigQuotes_QuoteDate] DEFAULT (getdate()),
[DueByDate] [datetime] NULL,
[NeededByDate] [datetime] NULL,
[PONumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderedBy] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ExpirationDate] [datetime] NULL,
[Status] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SOID] [int] NULL,
[SONumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BillToID] [int] NULL,
[ShipToID] [int] NULL,
[MultiShip] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_MultiShip] DEFAULT ((0)),
[HidePrice] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_HidePrice] DEFAULT ((0)),
[HideAccessory] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_HideAccessory] DEFAULT ((0)),
[EnableLease] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_EnableLease] DEFAULT ((0)),
[LeasePrintOption] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_LeasePrintOption] DEFAULT ((0)),
[LeaseTermID] [int] NULL,
[LeaseIncludeBuyout] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_LeaseIncludeBuyout] DEFAULT ((0)),
[LeaseBuyoutAmount] [money] NULL,
[LeaseWrapBuyout] [bit] NULL,
[TotalPurchasePrice] [money] NULL,
[TotalSuggestedPrice] [money] NULL,
[TotalOutcostOverride] [money] NULL,
[TotalOutcostCalculated] [money] NULL,
[ProspectID] [int] NULL,
[LeaseName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LeaseCoName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[termInMonths] [tinyint] NULL,
[purchaseOptions] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LeaseFactor] [decimal] (14, 8) NULL,
[LeasePayment] [money] NULL,
[EnableCPP] [bit] NULL,
[BlackVolume] [decimal] (18, 0) NULL,
[ColorVolume] [decimal] (18, 0) NULL,
[ServiceRate] [decimal] (14, 8) NULL,
[ServiceClrRate] [decimal] (14, 8) NULL,
[OverageRate] [decimal] (14, 8) NULL,
[OverageClrRate] [decimal] (14, 8) NULL,
[TotalCPP] [money] NULL,
[ServiceAmount] [money] NULL,
[ServiceClrAmount] [money] NULL,
[CalcCPPFromList] [bit] NULL,
[Remarks] [varchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TotalService] [money] NULL,
[InclServiceOnLease] [bit] NULL,
[InclPrintersOnService] [bit] NULL,
[PriceGroupID] [int] NULL,
[ContactFirstName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ContactLastName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ContactEmail] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SameAsBillTo] [bit] NULL CONSTRAINT [DF_SAConfigQuotes_SameAsBillTo] DEFAULT ((0)),
[ServiceBaseCost] [money] NULL,
[ServiceConnectFee] [money] NULL,
[ServiceInstallFee] [money] NULL,
[TaxCodeID] [int] NULL,
[ServiceBlackAlloc] [decimal] (18, 0) NULL,
[ServiceColorAlloc] [decimal] (18, 0) NULL,
[Completed] [bit] NULL,
[ShowAllCustomer] [bit] NULL,
[QuoteType] [int] NULL CONSTRAINT [DF_SAConfigQuotes_QuoteType] DEFAULT ((0)),
[MultiShipOneToOne] [bit] NULL,
[EquipmentAndContract] [bit] NULL,
[MultiShipSingleOrder] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_MultiShipSingleOrder] DEFAULT ((0)),
[MultiShipOrdersByShipTo] [bit] NOT NULL CONSTRAINT [DF_SAConfigQuotes_MultiShipOrdersByShipTo] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [PK_SAConfigQuotes] PRIMARY KEY CLUSTERED  ([ConfigQuoteID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_BillToID_ARCustomers] FOREIGN KEY ([BillToID]) REFERENCES [dbo].[ARCustomers] ([CustomerID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_CustomerID_ARCustomers] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[ARCustomers] ([CustomerID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_OpportunityID_SAOpportunity] FOREIGN KEY ([OpportunityID]) REFERENCES [dbo].[SAOpportunity] ([OpportunityID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_ProspectID_SAProspects] FOREIGN KEY ([ProspectID]) REFERENCES [dbo].[SAProspects] ([ProspectID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_SalesRepID_ARSalesReps] FOREIGN KEY ([SalesRepID]) REFERENCES [dbo].[ARSalesReps] ([SalesRepID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_ShipToID_ARCustomers] FOREIGN KEY ([ShipToID]) REFERENCES [dbo].[ARCustomers] ([CustomerID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_SOID_SOOrders] FOREIGN KEY ([SOID]) REFERENCES [dbo].[SOOrders] ([SOID])
GO
ALTER TABLE [dbo].[SAConfigQuotes] ADD CONSTRAINT [FK_SAConfigQuotes_TaxCodeID_ShTaxCodes] FOREIGN KEY ([TaxCodeID]) REFERENCES [dbo].[ShTaxCodes] ([TaxCodeID])
GO