21 lines
355 B
MySQL
21 lines
355 B
MySQL
|
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 ;
|