集团财务

## 数据表：T_WB_ElectCheck(电子对账单)

### T_WB_ElectCheck(电子对账单)：描述

名称 | T_WB_ElectCheck(电子对账单)
代码 | T_WB_ElectCheck
注释 | 电子对账单
模型 | 集团财务
主键 | PK_WB_ElectCheck

### T_WB_ElectCheck(电子对账单)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
单据内码 | FID | int |  | TRUE |
单据类型 | FBILLTYPEID | varchar(36) | 36 | TRUE |
单据编号 | FBILLNO | nvarchar(80) | 80 | TRUE |
起始日期 | FBEGINDATE | datetime |  | FALSE |
结束日期 | FENDDATE | datetime |  | FALSE |
银行 | FBANKID | int |  | TRUE |
银行账号 | FBANKACNTID | int |  | TRUE |
币别 | FCURRENCYID | int |  | TRUE |
借方金额 | FALLDEBITAMOUNT | decimal(23,10) | 23 | TRUE |
贷方金额 | FALLCREDITAMOUNT | decimal(23,10) | 23 | TRUE |
借方笔数 | FDEBITCOUNT | int |  | TRUE |
贷方笔数 | FCREDITCOUNT | int |  | TRUE |
首笔余额 | FFIRSTBALAMOUNT | decimal(23,10) | 23 | TRUE |
末笔余额 | FLASTBALAMOUNT | decimal(23,10) | 23 | TRUE |
单据状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE | A：创建 B：审核中 C：已审核 D：重新审核 Z：暂存
创建人 | FCREATORID | int |  | TRUE |
创建组织 | FCREATEORGID | int |  | TRUE |
创建日期（下载日期） | FCREATEDATE | datetime |  | TRUE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
作废状态 | FCANCELSTATUS | char(1) | 1 | TRUE | 枚举：A未作废B已作废
作废人内码 | FCANCELLERID | int |  | TRUE |
作废日期 | FCANCELDATE | datetime |  | FALSE |

### T_WB_ElectCheck(电子对账单)：脚本代码

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_WB_ElectCheckENTRY') and o.name = '主从关系')
alter table T_WB_ElectCheckENTRY
drop constraint 主从关系
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_WB_ElectCheck_LK') and o.name = '单据转换关系')
alter table T_WB_ElectCheck_LK
drop constraint 单据转换关系
go
if exists (select 1
from sysindexes
where id = object_id('T_WB_ElectCheck')
and name = 'IDX_WB_ElectCheck_BillNo'
and indid > 0
and indid < 255)
drop index T_WB_ElectCheck.IDX_WB_ElectCheck_BillNo
go
if exists (select 1
from sysindexes
where id = object_id('T_WB_ElectCheck')
and name = 'IDX_WB_ElectCheck_StartDate'
and indid > 0
and indid < 255)
drop index T_WB_ElectCheck.IDX_WB_ElectCheck_StartDate
go
if exists (select 1
from sysobjects
where id = object_id('T_WB_ElectCheck')
and type = 'U')
drop table T_WB_ElectCheck
go
/*==============================================================*/
/* Table: T_WB_ElectCheck */
/*==============================================================*/
create table T_WB_ElectCheck (
FID int not null default 0,
FBILLTYPEID varchar(36) not null default '',
FBILLNO nvarchar(80) not null default '',
FBEGINDATE datetime null,
FENDDATE datetime null,
FBANKID int not null default 0,
FBANKACNTID int not null default 0,
FCURRENCYID int not null default 0,
FALLDEBITAMOUNT decimal(23,10) not null default 0,
FALLCREDITAMOUNT decimal(23,10) not null default 0,
FDEBITCOUNT int not null default 0,
FCREDITCOUNT int not null default 0,
FFIRSTBALAMOUNT decimal(23,10) not null default 0,
FLASTBALAMOUNT decimal(23,10) not null default 0,
FDOCUMENTSTATUS char(1) not null default 'C',
FCREATORID int not null default 0,
FCREATEORGID int not null default 0,
FCREATEDATE datetime not null default getdate(),
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FCANCELSTATUS char(1) not null default 'A',
FCANCELLERID int not null default 0,
FCANCELDATE datetime null,
constraint PK_WB_ElectCheck primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'电子对账单',
'user', @CurrentUser, 'table', 'T_WB_ElectCheck'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'A：创建
B：审核中
C：已审核
D：重新审核
Z：暂存',
'user', @CurrentUser, 'table', 'T_WB_ElectCheck', 'column', 'FDOCUMENTSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'枚举：A未作废B已作废',
'user', @CurrentUser, 'table', 'T_WB_ElectCheck', 'column', 'FCANCELSTATUS'
go
/*==============================================================*/
/* Index: IDX_WB_ElectCheck_StartDate */
/*==============================================================*/
create index IDX_WB_ElectCheck_StartDate on T_WB_ElectCheck (
FBEGINDATE ASC,
FENDDATE ASC
)
go
/*==============================================================*/
/* Index: IDX_WB_ElectCheck_BillNo */
/*==============================================================*/
create index IDX_WB_ElectCheck_BillNo on T_WB_ElectCheck (
FBILLNO ASC
)
go

### T_WB_ElectCheck(电子对账单)：键值定义

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

### T_WB_ElectCheck(电子对账单)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_WB_ElectCheck_StartDate | IDX_WB_ElectCheck_StartDate | FALSE | FALSE | FALSE | FALSE | FALSE | T_WB_ElectCheck(电子对账单)
IDX_WB_ElectCheck_BillNo | IDX_WB_ElectCheck_BillNo | FALSE | FALSE | FALSE | FALSE | FALSE | T_WB_ElectCheck(电子对账单)

上一页

主页

下一页