SCO供应链协同

## 数据表：T_RPM_RPSTATEMENT(返利结算单)

### T_RPM_RPSTATEMENT(返利结算单)：描述

名称 | T_RPM_RPSTATEMENT(返利结算单)
代码 | T_RPM_RPSTATEMENT
注释 | 返利结算单
模型 | SCO供应链协同
主键 | PK_RPM_RPSTATEMENT

### T_RPM_RPSTATEMENT(返利结算单)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
主键ID | FID | int |  | TRUE |
单据编号 | FBILLNO | nvarchar(30) | 30 | TRUE |
单据状态 | FDOCUMENTSTATUS | char(1) | 1 | TRUE |
单据日期 | FBILLDATE | datetime |  | TRUE |
结算币别 | FSETTLECURRID | int |  | TRUE |
结算组织 | FFINANCEORGID | int |  | TRUE |
返利返还方式 | FRETURNTYPE | varchar(20) | 20 | TRUE |
部门 | FDEPTID | int |  | TRUE |
业务人(结算员) | FAPPUSERID | int |  | TRUE |
备注 | FREMARK | nvarchar(255) | 255 | TRUE |
创建人 | FCREATORID | int |  | TRUE |
创建日期 | FCREATEDATE | datetime |  | FALSE |
修改人 | FMODIFIERID | int |  | TRUE |
修改日期 | FMODIFYDATE | datetime |  | FALSE |
审核人 | FAPPROVERID | int |  | TRUE |
审核日期 | FAPPROVEDATE | datetime |  | FALSE |
结算本位币 | FBASESETTLECURRID | int |  | TRUE |
汇率类型 | FRATETYPEID | int |  | TRUE |
汇率 | FEXCHANGERATE | decimal(19,6) | 19 | TRUE |
单据来源 | FBILLSOURCE | varchar(20) | 20 | TRUE |
返利账户 | FACCOUNTID | int |  | TRUE |
是否已结算 | FISSETTLEMENT | char(1) | 1 | TRUE |

### T_RPM_RPSTATEMENT(返利结算单)：脚本代码

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_RPM_RPSTATEMENTENTRY') and o.name = 'FK_T_RPM_RP_R_RPM_RPS_T_RPM_RP')
alter table T_RPM_RPSTATEMENTENTRY
drop constraint FK_T_RPM_RP_R_RPM_RPS_T_RPM_RP
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPSTATEMENT')
and name = 'IDX_RPM_RPSETTLEMENT_DATE'
and indid > 0
and indid < 255)
drop index T_RPM_RPSTATEMENT.IDX_RPM_RPSETTLEMENT_DATE
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPSTATEMENT')
and name = 'IDX_RPM_RPSETTLEMENT_ORG'
and indid > 0
and indid < 255)
drop index T_RPM_RPSTATEMENT.IDX_RPM_RPSETTLEMENT_ORG
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPSTATEMENT')
and name = 'IDX_RPM_RPSETTLEMENT_NUM'
and indid > 0
and indid < 255)
drop index T_RPM_RPSTATEMENT.IDX_RPM_RPSETTLEMENT_NUM
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_RPSTATEMENT')
and type = 'U')
drop table T_RPM_RPSTATEMENT
go
/*==============================================================*/
/* Table: T_RPM_RPSTATEMENT */
/*==============================================================*/
create table T_RPM_RPSTATEMENT (
FID int not null default 0,
FBILLNO nvarchar(30) not null default '',
FDOCUMENTSTATUS char(1) not null default '',
FBILLDATE datetime not null default getdate(),
FSETTLECURRID int not null default 0,
FFINANCEORGID int not null default 0,
FRETURNTYPE varchar(20) not null default '',
FDEPTID int not null default 0,
FAPPUSERID int not null default 0,
FREMARK nvarchar(255) not null default '',
FCREATORID int not null default 0,
FCREATEDATE datetime null,
FMODIFIERID int not null default 0,
FMODIFYDATE datetime null,
FAPPROVERID int not null default 0,
FAPPROVEDATE datetime null,
FBASESETTLECURRID int not null default 0,
FRATETYPEID int not null default 0,
FEXCHANGERATE decimal(19,6) not null default 0,
FBILLSOURCE varchar(20) not null default '',
FACCOUNTID int not null default 0,
FISSETTLEMENT char(1) not null default '0',
constraint PK_RPM_RPSTATEMENT primary key (FID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'返利结算单',
'user', @CurrentUser, 'table', 'T_RPM_RPSTATEMENT'
go
/*==============================================================*/
/* Index: IDX_RPM_RPSETTLEMENT_NUM */
/*==============================================================*/
create index IDX_RPM_RPSETTLEMENT_NUM on T_RPM_RPSTATEMENT (
FBILLNO ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_RPSETTLEMENT_ORG */
/*==============================================================*/
create index IDX_RPM_RPSETTLEMENT_ORG on T_RPM_RPSTATEMENT (
FFINANCEORGID ASC,
FBILLDATE ASC,
FSETTLECURRID ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_RPSETTLEMENT_DATE */
/*==============================================================*/
create index IDX_RPM_RPSETTLEMENT_DATE on T_RPM_RPSTATEMENT (
FBILLDATE ASC
)
go

### T_RPM_RPSTATEMENT(返利结算单)：键值定义

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

### T_RPM_RPSTATEMENT(返利结算单)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_RPSETTLEMENT_NUM | IDX_RPM_RPSETTLEMENT_NUM | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPSTATEMENT(返利结算单)
IDX_RPM_RPSETTLEMENT_ORG | IDX_RPM_RPSETTLEMENT_ORG | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPSTATEMENT(返利结算单)
IDX_RPM_RPSETTLEMENT_DATE | IDX_RPM_RPSETTLEMENT_DATE | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPSTATEMENT(返利结算单)

上一页

主页

下一页