IF Not (EXISTS(SELECT * FROM sysobjects WHERE name='SummaryAccountingDocuments'))
Begin
CREATE TABLE [dbo].[SummaryAccountingDocuments](
	[Id] [UNIQUEIDENTIFIER] NOT NULL,
	[Number] [int] NOT NULL,
	[TotalDebt] [MONEY] NULL,
	[TotalCreditor] [MONEY] NULL,
	[IsBalance] [Bit] NOT NULL,
	[Note] [NTEXT] NULL,
	[IsLock] [Bit] NULL,
	[IsAuto] [Bit] NULL,
	[Tarikh] [SmallDateTime] NULL,
	[Store_Code] [VARCHAR](3) NULL,
	[SyncTime] [DATETIME] NULL,
	[DocumentId] [BIGINT] NULL,
 CONSTRAINT [PK_SummaryAccountingDocuments] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)
) ON [PRIMARY] 

End
