SCO供应链协同

## 数据表：T_RPM_RPSTATEMENTENTRY(返利结算单明细)

### T_RPM_RPSTATEMENTENTRY(返利结算单明细)：描述

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

### T_RPM_RPSTATEMENTENTRY(返利结算单明细)：列规格定义

名称 | 代码 | 数据类型 | 长度 | 强制 | 注释
分录主键ID | FENTRYID | int |  | TRUE |
结算单ID | FID | int |  | TRUE |
分录行号 | FSEQ | int |  | TRUE |
返利政策 | FRPPOLICYID | int |  | TRUE |
返利周期 | FRPCYCLEID | int |  | TRUE |
组号 | FGROUPNUMBER | int |  | TRUE |
客户/会员 | FCUSTOMERID | int |  | TRUE |
返利金额 | FRPAMOUNT | decimal(23,10) | 23 | TRUE |
返利本位币金额 | FRPLOCALAMOUNT | decimal(23,10) | 23 | TRUE |
赠品物料 | FMATERIALID | int |  | TRUE |
辅助属性 | FASSISTPROPERTYID | int |  | TRUE |
计量单位 | FUNITID | int |  | TRUE |
基本计量单位 | FBASEUNITID | int |  | TRUE |
返利数量 | FRPQTY | decimal(23,10) | 23 | TRUE |
返利基本数量 | FRPBASEQTY | decimal(23,10) | 23 | TRUE |
说明 | FNOTE | nvarchar(255) | 255 | TRUE |
费用项目 | FEXPENSEITEMID | int |  | TRUE |
关联数量 | FCONQTY | decimal(23,10) | 23 | TRUE |
基本关联数量 | FBASECONQTY | decimal(23,10) | 23 | TRUE |
累计赠送数量 | FTOTALQTY | decimal(23,10) | 23 | TRUE |
基本累计赠送数量 | FBASETOTALQTY | decimal(23,10) | 23 | TRUE |
关联金额 | FCONAMOUNT | decimal(23,10) | 23 | TRUE |
累计返利金额 | FTOTALRPAMOUNT | decimal(23,10) | 23 | TRUE |
返利对象类型 | FRPOBJECTTYPEID | varchar(36) | 36 | TRUE |
返利对象 | FRPOBJECTID | int |  | TRUE |
关联本位币金额 | FLOCALCONAMOUNT | decimal(23,10) | 23 | TRUE |
累计返利本位币金额 | FLOCALTOTALRPAMOUNT | decimal(23,10) | 23 | TRUE |

### T_RPM_RPSTATEMENTENTRY(返利结算单明细)：脚本代码

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 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_RE')
alter table T_RPM_RPSTATEMENTENTRY
drop constraint FK_T_RPM_RP_R_RPM_RPS_T_RPM_RE
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPSTATEMENTENTRY')
and name = 'IDX_RPM_RPSTATEMENTENTRY_ID'
and indid > 0
and indid < 255)
drop index T_RPM_RPSTATEMENTENTRY.IDX_RPM_RPSTATEMENTENTRY_ID
go
if exists (select 1
from sysindexes
where id = object_id('T_RPM_RPSTATEMENTENTRY')
and name = 'IDX_RPM_RPSTATEMENTENTRY_PID'
and indid > 0
and indid < 255)
drop index T_RPM_RPSTATEMENTENTRY.IDX_RPM_RPSTATEMENTENTRY_PID
go
if exists (select 1
from sysobjects
where id = object_id('T_RPM_RPSTATEMENTENTRY')
and type = 'U')
drop table T_RPM_RPSTATEMENTENTRY
go
/*==============================================================*/
/* Table: T_RPM_RPSTATEMENTENTRY */
/*==============================================================*/
create table T_RPM_RPSTATEMENTENTRY (
FENTRYID int not null default 0,
FID int not null default 0,
FSEQ int not null default 0,
FRPPOLICYID int not null default 0,
FRPCYCLEID int not null default 0,
FGROUPNUMBER int not null default 0,
FCUSTOMERID int not null default 0,
FRPAMOUNT decimal(23,10) not null default 0.0,
FRPLOCALAMOUNT decimal(23,10) not null default 0.0,
FMATERIALID int not null default 0,
FASSISTPROPERTYID int not null default 0,
FUNITID int not null default 0,
FBASEUNITID int not null default 0,
FRPQTY decimal(23,10) not null default 0.0,
FRPBASEQTY decimal(23,10) not null default 0.0,
FNOTE nvarchar(255) not null default '',
FEXPENSEITEMID int not null default 0,
FCONQTY decimal(23,10) not null default 0,
FBASECONQTY decimal(23,10) not null default 0,
FTOTALQTY decimal(23,10) not null default 0,
FBASETOTALQTY decimal(23,10) not null default 0,
FCONAMOUNT decimal(23,10) not null default 0,
FTOTALRPAMOUNT decimal(23,10) not null default 0,
FRPOBJECTTYPEID varchar(36) not null default '',
FRPOBJECTID int not null default 0,
FLOCALCONAMOUNT decimal(23,10) not null default 0,
FLOCALTOTALRPAMOUNT decimal(23,10) not null default 0,
constraint PK_RPM_RPSTATEMENTENTRY primary key (FENTRYID)
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'返利结算单明细',
'user', @CurrentUser, 'table', 'T_RPM_RPSTATEMENTENTRY'
go
/*==============================================================*/
/* Index: IDX_RPM_RPSTATEMENTENTRY_PID */
/*==============================================================*/
create index IDX_RPM_RPSTATEMENTENTRY_PID on T_RPM_RPSTATEMENTENTRY (
FCUSTOMERID ASC,
FRPPOLICYID ASC,
FRPCYCLEID ASC,
FID ASC
)
go
/*==============================================================*/
/* Index: IDX_RPM_RPSTATEMENTENTRY_ID */
/*==============================================================*/
create index IDX_RPM_RPSTATEMENTENTRY_ID on T_RPM_RPSTATEMENTENTRY (
FID ASC
)
go
alter table T_RPM_RPSTATEMENTENTRY
add constraint FK_T_RPM_RP_R_RPM_RPS_T_RPM_RP foreign key (FID)
references T_RPM_RPSTATEMENT (FID)
go
alter table T_RPM_RPSTATEMENTENTRY
add constraint FK_T_RPM_RP_R_RPM_RPS_T_RPM_RE foreign key (FRPCYCLEID)
references T_RPM_RETURNCYCLE (FRPCYCLEID)
go

### T_RPM_RPSTATEMENTENTRY(返利结算单明细)：键值定义

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

### T_RPM_RPSTATEMENTENTRY(返利结算单明细)：索引定义

名称 | 代码 | 唯一的 | 群集器 | 主要的 | 外键 | 候选键 | 表格
IDX_RPM_RPSTATEMENTENTRY_PID | IDX_RPM_RPSTATEMENTENTRY_PID | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPSTATEMENTENTRY(返利结算单明细)
IDX_RPM_RPSTATEMENTENTRY_ID | IDX_RPM_RPSTATEMENTENTRY_ID | FALSE | FALSE | FALSE | FALSE | FALSE | T_RPM_RPSTATEMENTENTRY(返利结算单明细)

上一页

主页

下一页