Tables [dbo].[PSRegisterDetails]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:58:42 AM Thursday, March 21, 2019
Last Modified1:13:56 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_PSRegisterDetails: DetailIDDetailIDint4
False
Foreign Keys FK_PSRegisterDetails_ShiftID_PSRegisterShift: [dbo].[PSRegisterShift].ShiftIDShiftIDint4
False
Foreign Keys FK_PSRegisterDetails_CustomerID_ARCustomers: [dbo].[ARCustomers].CustomerIDCustomerIDint4
False
Foreign Keys FK_PSRegisterDetails_InvoiceID_ARInvoices: [dbo].[ARInvoices].InvoiceIDInvoiceIDint4
True
Foreign Keys FK_PSRegisterDetails_ReceiptID_ARReceipts: [dbo].[ARReceipts].ReceiptIDReceiptIDint4
True
Datedatetime8
False
ARmoney8
True
Cashmoney8
True
Chkmoney8
True
Creditmoney8
True
Referencevarchar(50)50
True
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_PSRegisterDetails: DetailIDPK_PSRegisterDetailsDetailID
True
80
NameNo CheckColumns
FK_PSRegisterDetails_CustomerID_ARCustomers
True
CustomerID->[dbo].[ARCustomers].[CustomerID]
FK_PSRegisterDetails_InvoiceID_ARInvoices
True
InvoiceID->[dbo].[ARInvoices].[InvoiceID]
FK_PSRegisterDetails_ReceiptID_ARReceiptsReceiptID->[dbo].[ARReceipts].[ReceiptID]
FK_PSRegisterDetails_ShiftID_PSRegisterShiftShiftID->[dbo].[PSRegisterShift].[ShiftID]
CREATE TABLE [dbo].[PSRegisterDetails]
(
[DetailID] [int] NOT NULL,
[ShiftID] [int] NOT NULL,
[CustomerID] [int] NOT NULL,
[InvoiceID] [int] NULL,
[ReceiptID] [int] NULL,
[Date] [datetime] NOT NULL,
[AR] [money] NULL,
[Cash] [money] NULL,
[Chk] [money] NULL,
[Credit] [money] NULL,
[Reference] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS 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_PSRegisterDetails_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_PSRegisterDetails_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PSRegisterDetails] ADD CONSTRAINT [PK_PSRegisterDetails] PRIMARY KEY CLUSTERED  ([DetailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PSRegisterDetails] WITH NOCHECK ADD CONSTRAINT [FK_PSRegisterDetails_CustomerID_ARCustomers] FOREIGN KEY ([CustomerID]) REFERENCES [dbo].[ARCustomers] ([CustomerID])
GO
ALTER TABLE [dbo].[PSRegisterDetails] WITH NOCHECK ADD CONSTRAINT [FK_PSRegisterDetails_InvoiceID_ARInvoices] FOREIGN KEY ([InvoiceID]) REFERENCES [dbo].[ARInvoices] ([InvoiceID])
GO
ALTER TABLE [dbo].[PSRegisterDetails] ADD CONSTRAINT [FK_PSRegisterDetails_ReceiptID_ARReceipts] FOREIGN KEY ([ReceiptID]) REFERENCES [dbo].[ARReceipts] ([ReceiptID])
GO
ALTER TABLE [dbo].[PSRegisterDetails] ADD CONSTRAINT [FK_PSRegisterDetails_ShiftID_PSRegisterShift] FOREIGN KEY ([ShiftID]) REFERENCES [dbo].[PSRegisterShift] ([ShiftID])
GO