-USE [coda-prod]
+USE [coda-prod]
GO
SET ANSI_NULLS OFF
'000-PRODUITS' AS groupe2,
b.full_value * -1 AS solde, -- Corriger pour debit / crédit !!!!!!!!!!
CASE
- WHEN (
+ WHEN
b.el1 IN ('75100', '70500')
OR b.el1 LIKE '756%'
OR b.el1 LIKE '708%'
- ) THEN '110-Ressources propres'
+ THEN '110-Ressources propres'
WHEN b.el1 LIKE '740%' THEN '120-Contributions gouvernementales'
- WHEN b.el1 LIKE '745%' THEN '130-Contributions contractuelles'
- WHEN (
+ WHEN
+ b.el1 LIKE '745%'
+ OR b.el1 = '74998' OR b.el1 = '74999'
+ THEN '130-Contributions contractuelles'
+ WHEN
b.el1 LIKE '78%'
OR b.el1='75700'
OR (
'91022GR', '91024GR', '91023GR', '91032GR','91025GR', '9122GR',
'9124GR', '9123GR', '9132GR','9125GR'
)
- ) THEN '140-Apports, autres recettes, provisions'
- WHEN (
+ THEN '140-Apports, autres recettes, provisions'
+ WHEN
b.el1 LIKE '76%'
OR b.el1 LIKE '77%'
- ) THEN '150-Produits financiers et exceptionnels'
- WHEN b.el1 LIKE '87%' THEN '160-Valeurs des biens et services à titre gratuit'
+ THEN '150-Produits financiers et exceptionnels'
+ WHEN b.el1 = '75800' THEN '160-Exploitation'
+ WHEN b.el1 LIKE '87%' THEN '170-Valeurs des biens et services à titre gratuit'
END AS sgroupe
FROM #cumul_ecritures b
WHERE -- Filtres globaux