Tables [dbo].[ICMfgs]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:57:37 AM Thursday, March 21, 2019
Last Modified1:15:03 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ICMfgs: MfgIDMfgIDint4
False
MfgNumbervarchar(15)15
False
Typechar(4)4
False
Datedatetime8
False
DatePeriodint4
False
Periodint4
False
Foreign Keys FK_ICMfgs_WorkOrderID_ICWorkOrders: [dbo].[ICWorkOrders].WorkOrderIDWorkOrderIDint4
True
Descriptionvarchar(255)255
False
Foreign Keys FK_ICMfgs_ItemID_ICItems: [dbo].[ICItems].ItemIDItemIDint4
False
SerialNumbervarchar(30)30
False
Quantitydecimal(18,6)9
False
Costmoney8
False
((0))
Foreign Keys FK_ICMfgs_InventoryGLID_GLAccounts2: [dbo].[GLAccounts2].InventoryGLIDInventoryGLIDint4
False
Foreign Keys FK_ICMfgs_InventoryDeptID_GLDepts2: [dbo].[GLDepts2].InventoryDeptIDInventoryDeptIDint4
True
InventoryAmountmoney8
False
((0))
Foreign Keys FK_ICMfgs_AdjGLID_GLAccounts2: [dbo].[GLAccounts2].AdjGLIDAdjGLIDint4
False
Foreign Keys FK_ICMfgs_AdjDeptID_GLDepts2: [dbo].[GLDepts2].AdjDeptIDAdjDeptIDint4
True
AdjAmountmoney8
False
((0))
Materialmoney8
False
((0))
Foreign Keys FK_ICMfgs_LaborGLID_GLAccounts2: [dbo].[GLAccounts2].LaborGLIDLaborGLIDint4
False
Labormoney8
False
((0))
StdOverheadmoney8
False
((0))
Foreign Keys FK_ICMfgs_OverheadGLID_GLAccounts2: [dbo].[GLAccounts2].OverheadGLIDOverheadGLIDint4
False
Overheadmoney8
False
((0))
Amountmoney8
False
((0))
Foreign Keys FK_ICMfgs_JobID_ICJobs: [dbo].[ICJobs].JobIDJobIDint4
True
TransactionTypeIDint4
False
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Foreign Keys FK_ICMfgs_StockTypeID_ICStockTypes: [dbo].[ICStockTypes].StockTypeIDStockTypeIDint4
False
((1))
Foreign Keys FK_ICMfgs_BranchID_GLBranches: [dbo].[GLBranches].BranchIDBranchIDint4
False
Foreign Keys FK_ICMfgs_LaborDeptID_GLDepts: [dbo].[GLDepts].LaborDeptIDLaborDeptIDint4
True
Foreign Keys FK_ICMfgs_OverheadDeptID_GLDepts: [dbo].[GLDepts].OverheadDeptIDOverheadDeptIDint4
True
Foreign Keys FK_ICMfgs_DivisionID_GLDivisions: [dbo].[GLDivisions].DivisionIDDivisionIDint4
False
Foreign Keys FK_ICMfgs_BalanceSheetGroupID_GLBalanceSheetGroups: [dbo].[GLBalanceSheetGroups].BalanceSheetGroupIDBalanceSheetGroupIDint4
False
Foreign Keys FK_ICMfgs_IntercompanyGLID_GLAccounts: [dbo].[GLAccounts].IntercompanyGLIDIntercompanyGLIDint4
True
Foreign Keys FK_ICMfgs_MaterialIntercompanyGLID_GLAccounts: [dbo].[GLAccounts].MaterialIntercompanyGLIDMaterialIntercompanyGLIDint4
True
MaterialAdjAmountmoney8
False
((0))
Foreign Keys FK_ICMfgs_AssetID_GLAssets: [dbo].[GLAssets].AssetIDAssetIDint4
True
Foreign Keys FK_ICMfgs_AssetGLID_GLAccounts: [dbo].[GLAccounts].AssetGLIDAssetGLIDint4
True
Foreign Keys FK_ICMfgs_AccumDeprGLID_GLAccounts: [dbo].[GLAccounts].AccumDeprGLIDAccumDeprGLIDint4
True
AssetCostOrBasisAmountmoney8
False
((0))
AssetAccumDeprAmountmoney8
False
((0))
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_ICMfgs: MfgIDPK_ICMfgsMfgID
True
80
NameColumns
FK_ICMfgs_AccumDeprGLID_GLAccountsAccumDeprGLID->[dbo].[GLAccounts].[AccountID]
FK_ICMfgs_AdjDeptID_GLDepts2AdjDeptID->[dbo].[GLDepts2].[DeptID]
FK_ICMfgs_AdjGLID_GLAccounts2AdjGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICMfgs_AssetGLID_GLAccountsAssetGLID->[dbo].[GLAccounts].[AccountID]
FK_ICMfgs_AssetID_GLAssetsAssetID->[dbo].[GLAssets].[AssetID]
FK_ICMfgs_BalanceSheetGroupID_GLBalanceSheetGroupsBalanceSheetGroupID->[dbo].[GLBalanceSheetGroups].[BalanceSheetGroupID]
FK_ICMfgs_BranchID_GLBranchesBranchID->[dbo].[GLBranches].[BranchID]
FK_ICMfgs_DivisionID_GLDivisionsDivisionID->[dbo].[GLDivisions].[DivisionID]
FK_ICMfgs_IntercompanyGLID_GLAccountsIntercompanyGLID->[dbo].[GLAccounts].[AccountID]
FK_ICMfgs_InventoryDeptID_GLDepts2InventoryDeptID->[dbo].[GLDepts2].[DeptID]
FK_ICMfgs_InventoryGLID_GLAccounts2InventoryGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICMfgs_ItemID_ICItemsItemID->[dbo].[ICItems].[ItemID]
FK_ICMfgs_JobID_ICJobsJobID->[dbo].[ICJobs].[JobID]
FK_ICMfgs_LaborDeptID_GLDeptsLaborDeptID->[dbo].[GLDepts].[DeptID]
FK_ICMfgs_LaborGLID_GLAccounts2LaborGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICMfgs_MaterialIntercompanyGLID_GLAccountsMaterialIntercompanyGLID->[dbo].[GLAccounts].[AccountID]
FK_ICMfgs_OverheadDeptID_GLDeptsOverheadDeptID->[dbo].[GLDepts].[DeptID]
FK_ICMfgs_OverheadGLID_GLAccounts2OverheadGLID->[dbo].[GLAccounts2].[AccountID]
FK_ICMfgs_StockTypeID_ICStockTypesStockTypeID->[dbo].[ICStockTypes].[StockTypeID]
FK_ICMfgs_WorkOrderID_ICWorkOrdersWorkOrderID->[dbo].[ICWorkOrders].[WorkOrderID]
CREATE TABLE [dbo].[ICMfgs]
(
[MfgID] [int] NOT NULL,
[MfgNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Type] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Date] [datetime] NOT NULL,
[DatePeriod] [int] NOT NULL,
[Period] [int] NOT NULL,
[WorkOrderID] [int] NULL,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ItemID] [int] NOT NULL,
[SerialNumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [decimal] (18, 6) NOT NULL,
[Cost] [money] NOT NULL CONSTRAINT [DF_ICMfgs_Cost] DEFAULT ((0)),
[InventoryGLID] [int] NOT NULL,
[InventoryDeptID] [int] NULL,
[InventoryAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_InventoryAmount] DEFAULT ((0)),
[AdjGLID] [int] NOT NULL,
[AdjDeptID] [int] NULL,
[AdjAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_AdjAmount] DEFAULT ((0)),
[Material] [money] NOT NULL CONSTRAINT [DF_ICMfgs_Material] DEFAULT ((0)),
[LaborGLID] [int] NOT NULL,
[Labor] [money] NOT NULL CONSTRAINT [DF_ICMfgs_Labor] DEFAULT ((0)),
[StdOverhead] [money] NOT NULL CONSTRAINT [DF_ICMfgs_StdOverhead] DEFAULT ((0)),
[OverheadGLID] [int] NOT NULL,
[Overhead] [money] NOT NULL CONSTRAINT [DF_ICMfgs_Overhead] DEFAULT ((0)),
[Amount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_Amount] DEFAULT ((0)),
[JobID] [int] NULL,
[TransactionTypeID] [int] NOT NULL,
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_ICMfgs_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ICMfgs_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[StockTypeID] [int] NOT NULL CONSTRAINT [DF_ICMfgs_StockTypeID] DEFAULT ((1)),
[BranchID] [int] NOT NULL,
[LaborDeptID] [int] NULL,
[OverheadDeptID] [int] NULL,
[DivisionID] [int] NOT NULL,
[BalanceSheetGroupID] [int] NOT NULL,
[IntercompanyGLID] [int] NULL,
[MaterialIntercompanyGLID] [int] NULL,
[MaterialAdjAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_MaterialAdjAmount] DEFAULT ((0)),
[AssetID] [int] NULL,
[AssetGLID] [int] NULL,
[AccumDeprGLID] [int] NULL,
[AssetCostOrBasisAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_AssetCostOrBasisAmount] DEFAULT ((0)),
[AssetAccumDeprAmount] [money] NOT NULL CONSTRAINT [DF_ICMfgs_AssetAccumDeprAmount] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [PK_ICMfgs] PRIMARY KEY CLUSTERED  ([MfgID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_AccumDeprGLID_GLAccounts] FOREIGN KEY ([AccumDeprGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_AdjDeptID_GLDepts2] FOREIGN KEY ([AdjDeptID]) REFERENCES [dbo].[GLDepts2] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_AdjGLID_GLAccounts2] FOREIGN KEY ([AdjGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_AssetGLID_GLAccounts] FOREIGN KEY ([AssetGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_AssetID_GLAssets] FOREIGN KEY ([AssetID]) REFERENCES [dbo].[GLAssets] ([AssetID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_BalanceSheetGroupID_GLBalanceSheetGroups] FOREIGN KEY ([BalanceSheetGroupID]) REFERENCES [dbo].[GLBalanceSheetGroups] ([BalanceSheetGroupID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_BranchID_GLBranches] FOREIGN KEY ([BranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_DivisionID_GLDivisions] FOREIGN KEY ([DivisionID]) REFERENCES [dbo].[GLDivisions] ([DivisionID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_IntercompanyGLID_GLAccounts] FOREIGN KEY ([IntercompanyGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_InventoryDeptID_GLDepts2] FOREIGN KEY ([InventoryDeptID]) REFERENCES [dbo].[GLDepts2] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_InventoryGLID_GLAccounts2] FOREIGN KEY ([InventoryGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_ItemID_ICItems] FOREIGN KEY ([ItemID]) REFERENCES [dbo].[ICItems] ([ItemID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_JobID_ICJobs] FOREIGN KEY ([JobID]) REFERENCES [dbo].[ICJobs] ([JobID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_LaborDeptID_GLDepts] FOREIGN KEY ([LaborDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_LaborGLID_GLAccounts2] FOREIGN KEY ([LaborGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_MaterialIntercompanyGLID_GLAccounts] FOREIGN KEY ([MaterialIntercompanyGLID]) REFERENCES [dbo].[GLAccounts] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_OverheadDeptID_GLDepts] FOREIGN KEY ([OverheadDeptID]) REFERENCES [dbo].[GLDepts] ([DeptID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_OverheadGLID_GLAccounts2] FOREIGN KEY ([OverheadGLID]) REFERENCES [dbo].[GLAccounts2] ([AccountID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_StockTypeID_ICStockTypes] FOREIGN KEY ([StockTypeID]) REFERENCES [dbo].[ICStockTypes] ([StockTypeID])
GO
ALTER TABLE [dbo].[ICMfgs] ADD CONSTRAINT [FK_ICMfgs_WorkOrderID_ICWorkOrders] FOREIGN KEY ([WorkOrderID]) REFERENCES [dbo].[ICWorkOrders] ([WorkOrderID])
GO