集团财务

## 数据表：T_CR_Elimination(抵消分录)

### T_CR_Elimination(抵消分录)：描述

名称 | T_CR_Elimination(抵消分录)
代码 | T_CR_Elimination
注释 | 抵消分录
模型 | 集团财务
主键 | Key_1

### T_CR_Elimination(抵消分录)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
内码 | FID | int |  | TRUE |
分录编号 | FBillNo | nvarchar(30) | 30 | TRUE |
币别 | FCurrencyID | int |  | TRUE |
金额单位 | FCurrUnitID | int |  | TRUE |
合并范围方案 | FScopeTypeID | int |  | TRUE |
合并范围 | FScopeID | int |  | TRUE |
周期 | FCycleID | int |  | TRUE | 4月报，5季报，6半年报，7年报
年 | FYear | int |  | TRUE |
期间 | FPeriod | int |  | TRUE |
我方 | FCompanyID | int |  | TRUE |
对方 | FCompanyID2 | int |  | TRUE |
抵消日期 | FDate | datetime |  | FALSE |
模板ID | FTemplateID | int |  | TRUE |
制单人 | FCREATORID | int |  | TRUE |
制单日期 | FCREATEDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE | Z暂存，A创建，B审核中，C已审核，D重新审核
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
作废状态 | FCANCELSTATUS | char(1) | 1 | TRUE | 枚举：A未作废B已作废
作废人内码 | FCANCELLERID | int |  | FALSE |
作废日期 | FCANCELDATE | datetime |  | FALSE |
借方调整总额 | FDebitTotal | decimal(23,10) | 23 | TRUE |
贷方调整总额 | FCebitTotal | decimal(23,10) | 23 | TRUE |
创建方式 | FBuildType | char(1) | 1 | FALSE | 1手工录入，2自动创建
抵消类型 | FElimTypeID | int |  | TRUE |
交易种类 | FTransTypeID | int |  | TRUE |

### T_CR_Elimination(抵消分录)：脚本代码

if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_CR_EliminationEntry') and o.name = 'FK_T_CR_ELI_REFERENCE_T_CR_ELI')
alter table T_CR_EliminationEntry
drop constraint FK_T_CR_ELI_REFERENCE_T_CR_ELI
go
if exists (select 1
from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F')
where r.fkeyid = object_id('T_CR_Elimination_L') and o.name = 'FK_T_CR_ELI_REFERENCE_T_CR_ELI')
alter table T_CR_Elimination_L
drop constraint FK_T_CR_ELI_REFERENCE_T_CR_ELI
go
if exists (select 1
from sysindexes
where id = object_id('T_CR_Elimination')
and name = 'IDX_CR_Elimination_CREATEDATE'
and indid > 0
and indid < 255)
drop index T_CR_Elimination.IDX_CR_Elimination_CREATEDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_CR_Elimination')
and name = 'IDX_CR_Elimination_BILLNO'
and indid > 0
and indid < 255)
drop index T_CR_Elimination.IDX_CR_Elimination_BILLNO
go
if exists (select 1
from sysindexes
where id = object_id('T_CR_Elimination')
and name = 'IDX_CR_ELI_TMPID'
and indid > 0
and indid < 255)
drop index T_CR_Elimination.IDX_CR_ELI_TMPID
go
if exists (select 1
from sysobjects
where id = object_id('T_CR_Elimination')
and type = 'U')
drop table T_CR_Elimination
go
/*==============================================================*/
/* Table: T_CR_Elimination */
/*==============================================================*/
create table T_CR_Elimination (
FID int not null default 0,
FBillNo nvarchar(30) not null default ' ',
FCurrencyID int not null default 0,
FCurrUnitID int not null default 0,
FScopeTypeID int not null default 0,
FScopeID int not null default 0,
FCycleID int not null default 0,
FYear int not null default 0,
FPeriod int not null default 0,
FCompanyID int not null default 0,
FCompanyID2 int not null default 0,
FDate datetime null,
FTemplateID int not null default 0,
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FDOCUMENTSTATUS char(1) not null default ' ',
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FCANCELSTATUS char(1) not null default 'A',
FCANCELLERID int null default 0,
FCANCELDATE datetime null,
FDebitTotal decimal(23,10) not null default 0,
FCebitTotal decimal(23,10) not null default 0,
FBuildType char(1) null default '1',
FElimTypeID int not null default 0,
FTransTypeID int not null default 0,
constraint PK_T_CR_ELIMINATION primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'抵消分录',
'user', @CurrentUser, 'table', 'T_CR_Elimination'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'4月报，5季报，6半年报，7年报',
'user', @CurrentUser, 'table', 'T_CR_Elimination', 'column', 'FCycleID'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'Z暂存，A创建，B审核中，C已审核，D重新审核',
'user', @CurrentUser, 'table', 'T_CR_Elimination', 'column', 'FDOCUMENTSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'枚举：A未作废B已作废',
'user', @CurrentUser, 'table', 'T_CR_Elimination', 'column', 'FCANCELSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'1手工录入，2自动创建',
'user', @CurrentUser, 'table', 'T_CR_Elimination', 'column', 'FBuildType'
go
/*==============================================================*/
/* Index: IDX_CR_ELI_TMPID */
/*==============================================================*/
create index IDX_CR_ELI_TMPID on T_CR_Elimination (
FTemplateID ASC
)
go
/*==============================================================*/
/* Index: IDX_CR_Elimination_BILLNO */
/*==============================================================*/
create index IDX_CR_Elimination_BILLNO on T_CR_Elimination (
FBillNo ASC
)
go
/*==============================================================*/
/* Index: IDX_CR_Elimination_CREATEDATE */
/*==============================================================*/
create index IDX_CR_Elimination_CREATEDATE on T_CR_Elimination (
FCREATEDATE ASC
)
go

### T_CR_Elimination(抵消分录)：键值定义

名称 | 代码 | 主要的
Key_1 | Key_1 | TRUE

### T_CR_Elimination(抵消分录)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_CR_ELI_TMPID | IDX_CR_ELI_TMPID | FALSE | FALSE | FALSE | FALSE | FALSE | T_CR_Elimination(抵消分录)
IDX_CR_Elimination_BILLNO | IDX_CR_Elimination_BILLNO | FALSE | FALSE | FALSE | FALSE | FALSE | T_CR_Elimination(抵消分录)
IDX_CR_Elimination_CREATEDATE | IDX_CR_Elimination_CREATEDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_CR_Elimination(抵消分录)

上一页

主页

下一页