Files
wq-wms-java/sql/20261109_sap_delivery_item_confirm.sql

13 lines
755 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- SAP交货单:按行收货确认,维护明细行确认状态与对应物料凭证号
ALTER TABLE `sap_delivery_item`
ADD COLUMN `confirm_status` varchar(2) DEFAULT '0' COMMENT '行确认状态:0未确认 1已确认' AFTER `component_qty`,
ADD COLUMN `confirm_time` varchar(30) DEFAULT NULL COMMENT '行确认时间' AFTER `confirm_status`,
ADD COLUMN `mblnr` varchar(20) DEFAULT NULL COMMENT '该行收货确认返回的物料凭证号' AFTER `confirm_time`;
-- 物料凭证同步时按凭证号反查确认人(按行确认会一单多凭证)
ALTER TABLE `sap_delivery_item`
ADD INDEX `idx_mblnr` (`mblnr`);
-- 存量数据默认未确认
UPDATE `sap_delivery_item` SET `confirm_status` = '0' WHERE `confirm_status` IS NULL;