17 lines
340 B
SQL
17 lines
340 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`inbound_addPick`(
|
|
vSelf INT,
|
|
vOutboundFk INT,
|
|
vQuantity INT
|
|
)
|
|
BEGIN
|
|
INSERT INTO inboundPick
|
|
SET
|
|
inboundFk = vSelf,
|
|
outboundFk = vOutboundFk,
|
|
quantity = vQuantity
|
|
ON DUPLICATE KEY UPDATE
|
|
quantity = quantity + vQuantity;
|
|
END$$
|
|
DELIMITER ;
|