Merge pull request 'refs #6445 remove red function and modify precedures' (!1998) from 6445-Remove-Vn2008.red-Function into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1998
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
This commit is contained in:
Ivan Mas 2024-02-06 08:07:55 +00:00
commit 0d0896758c
3 changed files with 8 additions and 21 deletions

View File

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