diff --git a/db/routines/vn/procedures/balanceNestTree_addChild.sql b/db/routines/vn/procedures/balanceNestTree_addChild.sql index 7433cbb42..0f4f31b06 100644 --- a/db/routines/vn/procedures/balanceNestTree_addChild.sql +++ b/db/routines/vn/procedures/balanceNestTree_addChild.sql @@ -1,9 +1,16 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_addChild`( - vSelfFather INT, + vSelf INT, vName VARCHAR(45) ) BEGIN +/** + * Agrega u nuevo nodo hijo a un nodo existente dentro de la estructura + * de árbol de vn.balanceNestTree. + * + * @param vSelf Identificador del nodo + * @param vName Nombre del nuevo nodo hijo + */ DECLARE vTable VARCHAR(45) DEFAULT util.quoteIdentifier('balanceNestTree'); DECLARE vLeft INT; @@ -15,7 +22,7 @@ BEGIN SET lft = (SELECT lft FROM ', vTable, ' WHERE id = ?)') - USING vSelfFather; + USING vSelf; SELECT lft INTO vLeft FROM tAux; diff --git a/db/routines/vn/procedures/balanceNestTree_delete.sql b/db/routines/vn/procedures/balanceNestTree_delete.sql index d2f37851f..1d6a9efff 100644 --- a/db/routines/vn/procedures/balanceNestTree_delete.sql +++ b/db/routines/vn/procedures/balanceNestTree_delete.sql @@ -3,6 +3,11 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_del vSelf INT ) BEGIN +/** + * Elimina un nodo dentro de la estructura de árbol de vn.balanceNestTree. + * + * @param vSelf Identificador del nodo + */ DECLARE vTable VARCHAR(45) DEFAULT util.quoteIdentifier('balanceNestTree'); DECLARE vRight INT; DECLARE vLeft INT; diff --git a/db/routines/vn/procedures/balanceNestTree_move.sql b/db/routines/vn/procedures/balanceNestTree_move.sql index ea7c734db..e4f0b9de4 100644 --- a/db/routines/vn/procedures/balanceNestTree_move.sql +++ b/db/routines/vn/procedures/balanceNestTree_move.sql @@ -1,9 +1,15 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`balanceNestTree_move`( - vSelfNode INT, + vSelf INT, vSelfFather INT ) BEGIN +/** + * Mueve un nodo dentro de la estructura de árbol de vn.balanceNestTree. + * + * @param vSelf Identificador del nodo + * @param vSelfFather Identificador del nuevo padre del nodo + */ DECLARE vTable VARCHAR(45) DEFAULT util.quoteIdentifier('balanceNestTree'); DECLARE vRight INT; DECLARE vLeft INT; @@ -21,7 +27,7 @@ BEGIN JOIN ', vTable, ' t SET a.wdt = t.rgt - t.lft + 1 WHERE t.id = ?') - USING vSelfNode; + USING vSelf; -- Averiguamos la posicion del nuevo padre EXECUTE IMMEDIATE CONCAT( @@ -62,7 +68,7 @@ BEGIN SET a.rgt = t.rgt, a.lft = t.lft WHERE t.id = ?') - USING vSelfNode; + USING vSelf; SELECT lft, rgt, frg - lft INTO vLeft, vRight, vGap diff --git a/db/routines/vn/procedures/pay.sql b/db/routines/vn/procedures/pay.sql index 42b7a6a55..5dc21e45f 100644 --- a/db/routines/vn/procedures/pay.sql +++ b/db/routines/vn/procedures/pay.sql @@ -11,6 +11,20 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`pay`( vConcept VARCHAR(40), vCompanyFk INT) BEGIN +/** + * Registra un pago realizado a un proveedor. + * + * @param vDated Fecha del pago + * @param vSupplierFk Id del proveedor + * @param vAmount Cantidad a pagar + * @param vCurrencyFk Id de la moneda + * @param vDivisa Tipo de cambio utilizado + * @param vBankFk Id del banco + * @param vPayMethodFk Id del método de pago + * @param vExpenseFk Id de gasto + * @param vConcept Concepto del pago + * @param vCompanyFk Id de la empresa + */ INSERT INTO till( concept, serie,