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

21 lines
353 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`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 ;