refs #6444 Remove vn2008.intrastat_neto function
gitea/salix/pipeline/head There was a failure building this commit Details
gitea/salix/pipeline/pr-dev Something is wrong with the build of this commit Details

This commit is contained in:
Ivan Mas 2024-01-30 13:33:54 +01:00
parent ed0f942a57
commit da2a2b5f09
1 changed files with 0 additions and 20 deletions

View File

@ -1,20 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn2008`.`intrastat_neto`(intINSTRASTAT INTEGER,intUNIDADES INTEGER)
RETURNS double
DETERMINISTIC
BEGIN
DECLARE n DOUBLE;
SELECT ROUND(intUNIDADES / (SUM(MEDIA) / COUNT(media)), 2) INTO n FROM
(SELECT *, unidades / neto MEDIA
FROM intrastat_data
WHERE intrastat_id = intINSTRASTAT AND neto
AND unidades > 0
ORDER BY odbc_date DESC
LIMIT 20) t;
-- JGF 01/06 per a evitar Kg en negatiu
RETURN n/2;
END$$
DELIMITER ;