/****** Object:  Table [dbo].[AccFactor]    Script Date: 18/10/2024 06:50:50 ب.ظ ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[AccFactorTemp](
	[ID] [bigint] NOT NULL,
	[Type] [smallint] NULL,
	[Number] [bigint] NOT NULL,
	[UserNumber] [bigint] NOT NULL,
	[Date] [datetime] NOT NULL,
	[SeriallID] [bigint] NOT NULL,
	[PersonTotalID] [bigint] NOT NULL,
	[PersonControlID] [bigint] NOT NULL,
	[PersonDetailID1] [bigint] NOT NULL,
	[PersonDetailID2] [bigint] NOT NULL,
	[PersonAddress] [nvarchar](500) NULL,
	[PersonFinancialCode] [nchar](20) NULL,
	[PersonTel] [nvarchar](250) NULL,
	[PersonFax] [nvarchar](250) NULL,
	[PersonEmail] [nvarchar](250) NULL,
	[PersonWeb] [nvarchar](250) NULL,
	[Description] [nvarchar](2000) NULL,
	[Discont] [decimal](28, 5) NOT NULL,
	[DiscontIsPercent] [bit] NOT NULL,
	[PayType] [bit] NULL,
	[UpdateDate] [datetime] NOT NULL,
	[Updater] [bigint] NOT NULL,
	[DiscontTotalID] [bigint] NULL,
	[DiscontControlID] [bigint] NULL,
	[DiscontDetailID1] [bigint] NULL,
	[DiscontDetailID2] [bigint] NULL,
	[WarehouseID] [bigint] NULL,
	[WareOutID] [bigint] NULL,
	[FromWarehouse] [bit] NULL,
	[Avarez] [decimal](28, 5) NULL,
	[AvarezIsPercent] [bit] NULL,
	[AvarezTotalID] [bigint] NULL,
	[AvarezControlID] [bigint] NULL,
	[AvarezDetailID1] [bigint] NULL,
	[AvarezDetailID2] [bigint] NULL,
	[Haml] [decimal](28, 5) NULL,
	[HamlIsPercent] [bit] NULL,
	[HamlTotalID] [bigint] NULL,
	[HamlControlID] [bigint] NULL,
	[HamlDetailID1] [bigint] NULL,
	[HamlDetailID2] [bigint] NULL,
	[PayTime] [int] NULL,
	[Paid] [bit] NULL,
	[IsPermanent] [bit] NULL,
	[VizitorTotalID] [bigint] NULL,
	[VizitorControlID] [bigint] NULL,
	[VizitorDetailID1] [bigint] NULL,
	[VizitorDetailID2] [bigint] NULL,
	[SellType] [int] NULL,
	[PersonCodePosti] [char](15) NULL,
	[PersonSabt] [char](20) NULL,
	[PersonShenase] [char](20) NULL,
	[CostCenter] [bigint] NULL,
	[Project] [bigint] NULL,
	[OrderID] [bigint] NULL,
	[IsFalsi] [bit] NOT NULL,
	[Zir5Darsad] [bit] NOT NULL,
	[HaghAmalKari] [bit] NOT NULL,
	[Type1Code] [int] NULL,
	[CityCode] [char](7) NULL,
	[KalaTypeID] [int] NULL,
	[PrePayment] [decimal](28, 5) NULL,
	[UID] [uniqueidentifier] NULL,
	[TaxUID] [uniqueidentifier] NULL,
	[TaxType] [int] NULL,
	[TaxIns] [int] NOT NULL,
	[Taxid] [char](22) NULL,
	[Irtaxid] [char](22) NULL,
	[IrID] [bigint] NULL,
	[Scc] [bigint] NULL,
	[Cdcn] [nvarchar](20) NULL,
	[Cdcd] [datetime] NULL,
	[Cut] [char](3) NULL,
	[Exr] [decimal](19, 5) NULL,
	[DeleteDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
