salix/db/routines/vn/procedures/entry_clone.sql

21 lines
355 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_clone`(vSelf INT)
BEGIN
/**
* clones an entry.
*
* @param vSelf The entry id
*/
DECLARE vNewEntryFk INT;
START TRANSACTION;
CALL entry_cloneHeader(vSelf, vNewEntryFk, NULL);
CALL entry_copyBuys(vSelf, vNewEntryFk);
COMMIT;
SELECT vNewEntryFk;
END$$
DELIMITER ;