1、给系统参数表增加移动平均价标记 2、给实时库存表增加当前单价字段

This commit is contained in:
jishenghua
2024-05-21 23:22:29 +08:00
parent 45176c40fa
commit 9eaffcd88e
8 changed files with 211 additions and 17 deletions

View File

@@ -497,6 +497,7 @@ CREATE TABLE `jsh_material_current_stock` (
`material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
`depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
`current_number` decimal(24,6) DEFAULT NULL COMMENT '当前库存数量',
`current_unit_price` decimal(24,6) DEFAULT NULL COMMENT '当前单价',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`)
@@ -505,13 +506,13 @@ CREATE TABLE `jsh_material_current_stock` (
-- ----------------------------
-- Records of jsh_material_current_stock
-- ----------------------------
INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', null, '63', '0');
INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', null, '63', '0');
-- ----------------------------
-- Table structure for jsh_material_extend
@@ -870,6 +871,7 @@ CREATE TABLE `jsh_system_config` (
`over_link_bill_flag` varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记0未启用1启用',
`in_out_manage_flag` varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记0未启用1启用',
`multi_account_flag` varchar(1) DEFAULT '0' COMMENT '多账户启用标记0未启用1启用',
`move_avg_price_flag` varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记0未启用1启用',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`)
@@ -878,7 +880,7 @@ CREATE TABLE `jsh_system_config` (
-- ----------------------------
-- Records of jsh_system_config
-- ----------------------------
INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '63', '0');
INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '0', '63', '0');
-- ----------------------------
-- Table structure for jsh_tenant

View File

@@ -1586,4 +1586,13 @@ alter table jsh_account_item change remark remark varchar(500) DEFAULT NULL COMM
-- 给系统参数表增加多账户启用标记,开启后,采购订单、采购入库等单据可以进行多账户选择,升级的时候最好给老的租户进行批量设置为启用
-- --------------------------------------------------------
alter table jsh_system_config add multi_account_flag varchar(1) DEFAULT '0' COMMENT '多账户启用标记0未启用1启用' after in_out_manage_flag;
update jsh_system_config set multi_account_flag='1' where multi_account_flag='0';
update jsh_system_config set multi_account_flag='1' where multi_account_flag='0';
-- --------------------------------------------------------
-- 时间 2024年5月21日
-- by jishenghua
-- 给系统参数表增加移动平均价标记,默认关闭,开启之后将通过移动平均来计算成本价
-- 给实时库存表增加当前单价字段
-- --------------------------------------------------------
alter table jsh_system_config add move_avg_price_flag varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记0未启用1启用' after multi_account_flag;
alter table jsh_material_current_stock add current_unit_price decimal(24,6) DEFAULT NULL COMMENT '当前单价' after current_number;