refs #6445 remove red function and modify precedures #1998

Merged
ivanm merged 2 commits from 6445-Remove-Vn2008.red-Function into dev 2024-02-06 08:07:56 +00:00
3 changed files with 8 additions and 21 deletions

View File

@ -20,16 +20,16 @@ BEGIN
c.movil, c.movil,
c.POBLACION poblacion, c.POBLACION poblacion,
p.`name` provincia, p.`name` provincia,
vn2008.red(f.futur) futur, ROUND(f.futur, 2) futur,
c.Credito credito, c.Credito credito,
pm.`name` forma_pago, pm.`name` forma_pago,
vn2008.red(c365 / 12) consumo_medio365, ROUND(c365 / 12, 2) consumo_medio365,
vn2008.red(c365) consumo365, ROUND(c365, 2) consumo365,
vn2008.red(CmLy.peso) peso_mes_año_pasado, ROUND(CmLy.peso, 2) peso_mes_año_pasado,
vn2008.red(CmLy.peso * 1.19) objetivo, ROUND(CmLy.peso * 1.19, 2) objetivo,
tr.CodigoTrabajador, tr.CodigoTrabajador,
vn2008.red(mes_actual.consumo) consumoMes, ROUND(mes_actual.consumo, 2) consumoMes,
vn2008.red(IFNULL(mes_actual.consumo, 0) - IFNULL(CmLy.peso * 1.19, 0)) como_lo_llevo, ROUND(IFNULL(mes_actual.consumo, 0) - IFNULL(CmLy.peso * 1.19, 0), 2) como_lo_llevo,
DATE(LastTicket) ultimo_ticket, DATE(LastTicket) ultimo_ticket,
dead.muerto, dead.muerto,
g.Greuge, g.Greuge,

View File

@ -1,14 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn2008`.`red`(intCANTIDAD DOUBLE)
RETURNS double
DETERMINISTIC
BEGIN
DECLARE n DOUBLE;
SET n = SIGN(intCANTIDAD) * TRUNCATE( (ABS(intCANTIDAD) * 100) + 0.5001 ,0) /100 ;
RETURN n;
END$$
DELIMITER ;

View File

@ -0,0 +1 @@
REVOKE EXECUTE ON FUNCTION vn2008.red FROM hrBoss, salesPerson;