集团财务

## 数据表：T_SC_PAYSETTLEBILL(付款结算单)

### T_SC_PAYSETTLEBILL(付款结算单)：描述

名称 | T_SC_PAYSETTLEBILL(付款结算单)
代码 | T_SC_PAYSETTLEBILL
注释 | 付款结算单
模型 | 集团财务
主键 | PK_SC_PAYSETTLEBILL

### T_SC_PAYSETTLEBILL(付款结算单)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
单据内码 | FID | int |  | TRUE |
单据类型内码 | FBILLTYPEID | varchar(36) | 36 | TRUE |
单据编号 | FBILLNO | nvarchar(30) | 30 | TRUE |
币别内码 | FCURRENCYID | int |  | TRUE |
付款总金额 | FPAYTOTALAMOUNT | decimal(23,10) | 23 | TRUE |
付款总金额本位币 | FPAYTOTALAMOUNTFOR | decimal(23,10) | 23 | TRUE |
实付总金额 | FREALPAYAMOUNT | decimal(23,10) | 23 | TRUE |
实付总金额本位币 | FREALPAYAMOUNTFOR | decimal(23,10) | 23 | TRUE |
本位币 | FMAINBOOKID | int |  | TRUE |
汇率类型内码 | FEXCHANGETYPE | int |  | TRUE |
汇率 | FEXCHANGERATE | decimal(23,10) | 23 | TRUE |
资金组织 | FFUNDSORGID | int |  | TRUE |
收款单位类型 | FRECTUNITTYPE | varchar(36) | 36 | TRUE |
收款单位 | FRECTUNIT | int |  | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | FALSE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
单据状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE | B 审核中 C 已审核 D 重新审核
业务日期 | FDATE | datetime |  | TRUE |
作废状态 | FCANCELSTATUS | char(1) | 1 | TRUE | 枚举：A未作废B已作废
作废人内码 | FCANCELLERID | int |  | FALSE |
作废日期 | FCANCELDATE | datetime |  | FALSE |
已结算金额 | FREALSETTLEAMOUNT | decimal(23,10) | 23 | TRUE |
未结算金额 | FLEFTSETTLEAMOUNT | decimal(23,10) | 23 | TRUE |

### T_SC_PAYSETTLEBILL(付款结算单)：脚本代码

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_SC_PAYSETTLEBILLENTRY') and o.name = 'FK_T_SC_PAY_付款结算单明细表关_T_SC_PAY')
alter table T_SC_PAYSETTLEBILLENTRY
drop constraint FK_T_SC_PAY_付款结算单明细表关_T_SC_PAY
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_SC_PAYSETTLEENTRY') and o.name = 'FK_T_SC_PAY_付款结算单结算明细_T_SC_PAY')
alter table T_SC_PAYSETTLEENTRY
drop constraint FK_T_SC_PAY_付款结算单结算明细_T_SC_PAY
go
if exists (select 1
from sysindexes
where id = object_id('T_SC_PAYSETTLEBILL')
and name = 'IDX_SC_PAYSETTLEBILL_FDATE'
and indid > 0
and indid < 255)
drop index T_SC_PAYSETTLEBILL.IDX_SC_PAYSETTLEBILL_FDATE
go
if exists (select 1
from sysindexes
where id = object_id('T_SC_PAYSETTLEBILL')
and name = 'IDX_SC_PAYSETTLEBILL_FBILLNO'
and indid > 0
and indid < 255)
drop index T_SC_PAYSETTLEBILL.IDX_SC_PAYSETTLEBILL_FBILLNO
go
if exists (select 1
from sysobjects
where id = object_id('T_SC_PAYSETTLEBILL')
and type = 'U')
drop table T_SC_PAYSETTLEBILL
go
/*==============================================================*/
/* Table: T_SC_PAYSETTLEBILL */
/*==============================================================*/
create table T_SC_PAYSETTLEBILL (
FID int not null default 0,
FBILLTYPEID varchar(36) not null default ' ',
FBILLNO nvarchar(30) not null default ' ',
FCURRENCYID int not null default 0,
FPAYTOTALAMOUNT decimal(23,10) not null default 0,
FPAYTOTALAMOUNTFOR decimal(23,10) not null default 0,
FREALPAYAMOUNT decimal(23,10) not null default 0,
FREALPAYAMOUNTFOR decimal(23,10) not null default 0,
FMAINBOOKID int not null default 0,
FEXCHANGETYPE int not null default 0,
FEXCHANGERATE decimal(23,10) not null default 0,
FFUNDSORGID int not null default 0,
FRECTUNITTYPE varchar(36) not null default ' ',
FRECTUNIT int not null default 0,
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FAPPROVERID int null default 0,
FAPPROVEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FDOCUMENTSTATUS char(1) not null default ' ',
FDATE datetime not null default getdate(),
FCANCELSTATUS char(1) not null default 'A',
FCANCELLERID int null,
FCANCELDATE datetime null,
FREALSETTLEAMOUNT decimal(23,10) not null default 0,
FLEFTSETTLEAMOUNT decimal(23,10) not null default 0,
constraint PK_T_SC_PAYSETTLEBILL primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'付款结算单',
'user', @CurrentUser, 'table', 'T_SC_PAYSETTLEBILL'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'B 审核中
C 已审核
D 重新审核',
'user', @CurrentUser, 'table', 'T_SC_PAYSETTLEBILL', 'column', 'FDOCUMENTSTATUS'
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'枚举：A未作废B已作废',
'user', @CurrentUser, 'table', 'T_SC_PAYSETTLEBILL', 'column', 'FCANCELSTATUS'
go
/*==============================================================*/
/* Index: IDX_SC_PAYSETTLEBILL_FBILLNO */
/*==============================================================*/
create index IDX_SC_PAYSETTLEBILL_FBILLNO on T_SC_PAYSETTLEBILL (
FBILLNO ASC
)
go
/*==============================================================*/
/* Index: IDX_SC_PAYSETTLEBILL_FDATE */
/*==============================================================*/
create index IDX_SC_PAYSETTLEBILL_FDATE on T_SC_PAYSETTLEBILL (
FDATE ASC
)
go

### T_SC_PAYSETTLEBILL(付款结算单)：键值定义

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

### T_SC_PAYSETTLEBILL(付款结算单)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_SC_PAYSETTLEBILL_FBILLNO | IDX_SC_PAYSETTLEBILL_FBILLNO | FALSE | FALSE | FALSE | FALSE | FALSE | T_SC_PAYSETTLEBILL(付款结算单)
IDX_SC_PAYSETTLEBILL_FDATE | IDX_SC_PAYSETTLEBILL_FDATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_SC_PAYSETTLEBILL(付款结算单)

上一页

主页

下一页