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

21 lines
359 B
SQL

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