add-item-cost.sql
This commit is contained in:
@@ -52,3 +52,40 @@ create table lc_items_relate (
|
||||
primary key (item_id,type,type_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品关联';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:商品成本表
|
||||
-- Author:lcc
|
||||
-- Table:lc_items_cost
|
||||
-- Desc: cost_json(包含字段:select_price-选装成本,labor_price-选装工时费)
|
||||
-- promotion_json(包含字段:sale_price-销售佣金,other-其他,factory_price-厂家补贴)
|
||||
-- srv_json(包含字段:business_product-保险公司,business_price-商业险金额,business_fd-商业险返点,business_ins_price-商业险佣金,insurance_price-交强险金额,
|
||||
-- insurance_fd-交强险返点,insurance_ins_price-交强险佣金,back_price-客户退点金额,fee_carno-挂牌收入,cb_fee_carno-挂牌成本,loan_product-按揭银行,
|
||||
-- loan_price-按揭金额,loan_num-按揭期数,loan_srv_price-按揭服务费,loan_offset_price-解抵服务费,loan_subsidy_price-利息补贴收入,loan_in_price-其他收入金额,
|
||||
-- loan_out_price-其他支出金额,commission_price-金融公司手续费收入,other_in_price-其他收入,other_out_price-其他支出)
|
||||
-- ---------------------------
|
||||
create table lc_items_cost (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
item_id int(10) unsigned not null default '0' comment '商品id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单id',
|
||||
price decimal(12,2) not null default '0.00' comment '实际售价(扣除优惠)',
|
||||
bill_name varchar(128) not null default '' comment '开票方',
|
||||
bill_time timestamp not null default '0000-00-00 00:00:00' comment '开票时间(发票上日期)',
|
||||
bill_price decimal(12,2) not null default '0.00' comment '开票价(发票)',
|
||||
sale_price decimal(12,2) not null default '0.00' comment '销售收入',
|
||||
buy_price decimal(12,2) not null default '0.00' comment '采购及加装成本合计',
|
||||
promotion_price decimal(12,2) not null default '0.00' comment '促销成本合计',
|
||||
car_buy_price decimal(12,2) not null default '0.00' comment '整车采购成本',
|
||||
car_profit_price decimal(12,2) not null default '0.00' comment '整车采购毛利',
|
||||
insurance_price decimal(12,2) not null default '0.00' comment '保险收入合计',
|
||||
fee_carno_price decimal(12,2) not null default '0.00' comment '挂牌收入合计',
|
||||
loan_price decimal(12,2) not null default '0.00' comment '按揭收入合计',
|
||||
srv_price decimal(12,2) not null default '0.00' comment '水平业务总毛利',
|
||||
car_price decimal(12,2) not null default '0.00' comment '单车总毛利',
|
||||
cost_json json default null comment '采购成本',
|
||||
promotion_json json default null comment '促销成本',
|
||||
srv_json json default null comment '水品业务',
|
||||
c_time int(10) unsigned not null default '0' comment '创建时间',
|
||||
u_time timestamp not null default current_timestamp on update current_timestamp comment '更新时间',
|
||||
primary key (id)
|
||||
) engine=innodb default charset=utf8mb4 collate=utf8mb4_0900_ai_ci comment='商品成本表'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user