DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `stock`.`buyLot_addPick`(
	vSelf INT,
	vOutFk INT,
	vQuantity INT
)
BEGIN
	INSERT INTO buyPick
		SET buyFk = vSelf,
			outFk = vOutFk,
			quantity = vQuantity
		ON DUPLICATE KEY UPDATE
			quantity = quantity + vQuantity;
END$$
DELIMITER ;
