1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| SUM(CASE
WHEN indicateur not in ('Dont retard','Dont approbation après échéance') and unite = 'Pourcentage' then 1
WHEN indicateur in ('Dont directement imputables','Dont directement rapprochées','Dont directement BAP',
'Dont en régularisation','Dont saisies en retard','Dont exception de rapprochement','Dont approbation après échéance','Pièces acheminées',
'Dont délai < 15 jours','Dont délai entre 15 et 30 jours','Dont délai entre 30 et 45 jours','Dont délai entre 45 et 60 jours','Dont délai > 60 jours') and unite = 'Montant' then 0
WHEN indicateur = 'Total traitées' and unite = 'Nombre' then s1_nbr_appr
WHEN indicateur = 'Total traitées' and unite = 'Montant' then s1_mnt_tt_appr
WHEN indicateur = 'Total réglées' and unite = 'Nombre' then s1_nbr_paid
WHEN indicateur = 'Total réglées' and unite = 'Montant' then s1_mnt_tt_paid
WHEN indicateur = 'Dont retard' and unite = 'Nombre' then s1_nb_p_late
WHEN indicateur = 'Dont retard' and unite = 'Montant' then s1_mnt_p_late
WHEN indicateur = 'Dont retard' and unite = 'Pourcentage' then CASE WHEN s1_mnt_tt_paid <> 0 THEN s1_nb_p_late/s1_mnt_tt_paid ELSE 0 END
WHEN indicateur = 'Acquisition' and unite = 'Nombre' then s1_nbr_acq
WHEN indicateur = 'Acquisition' and unite = 'Montant' then s1_mnt_tt_acq
WHEN indicateur = 'Dont manuelles' and unite = 'Nombre' then CASE WHEN orig.s1_cde_orig = 'ONL' THEN S1_NBR_ACQ ELSE 0 END
WHEN indicateur = 'Dont manuelles' and unite = 'Montant' then CASE WHEN orig.s1_cde_orig = 'ONL' THEN S1_MNT_TT_ACQ ELSE 0 END
WHEN indicateur = 'Dont EDI' and unite = 'Nombre' then CASE WHEN orig.s1_cde_orig = 'EDI' THEN S1_NBR_ACQ ELSE 0 END
WHEN indicateur = 'Dont EDI' and unite = 'Montant' then CASE WHEN orig.s1_cde_orig = 'EDI' THEN S1_MNT_TT_ACQ ELSE 0 END
WHEN indicateur = 'Dont Numérisation' and unite = 'Nombre' then CASE WHEN orig.s1_cde_orig = 'NUM' THEN S1_NBR_ACQ ELSE 0 END
WHEN indicateur = 'Dont Numérisation' and unite = 'Montant' then CASE WHEN orig.s1_cde_orig = 'NUM' THEN S1_MNT_TT_ACQ ELSE 0 END
WHEN indicateur = 'Pièces imputées' and unite = 'Nombre' then s1_nbr_acct
WHEN indicateur = 'Pièces imputées' and unite = 'Montant' then s1_mnt_tt_acct
WHEN indicateur = 'Dont directement imputables' and unite = 'Nombre' then s1_nbr_dir_imp
WHEN indicateur = 'Pièces rapprochées' and unite = 'Nombre' then s1_nbr_mtch
WHEN indicateur = 'Pièces rapprochées' and unite = 'Montant' then s1_mnt_tt_mtch
WHEN indicateur = 'Dont directement rapprochées' and unite = 'Nombre' then s1_nbr_dir_rap
WHEN indicateur = 'Pièces approuvées' and unite = 'Nombre' then s1_nbr_appr
WHEN indicateur = 'Pièces approuvées' and unite = 'Montant' then s1_mnt_tt_appr
WHEN indicateur = 'Dont directement BAP' and unite = 'Nombre' then s1_nb_auto
WHEN indicateur = 'Commandes' and unite = 'Nombre' then CASE WHEN S1_PO_FLG = '1' THEN s1_nbr_appr ELSE 0 END
WHEN indicateur = 'Commandes' and unite = 'Montant' then CASE WHEN S1_PO_FLG = '1' THEN s1_mnt_tt_appr ELSE 0 END
WHEN indicateur = 'Dont en régularisation' and unite = 'Nombre' then s1_nb_regul
WHEN indicateur = 'Réceptions' and unite = 'Nombre' then s1_nbr_acq
WHEN indicateur = 'Réceptions' and unite = 'Montant' then s1_mnt_tt_acq
WHEN indicateur = 'Dont saisies en retard' and unite = 'Nombre' then s1_nb_rcpt_sup
WHEN indicateur = 'Rapprochement' and unite = 'Nombre' then s1_nbr_mtch
WHEN indicateur = 'Rapprochement' and unite = 'Montant' then s1_mnt_tt_mtch
WHEN indicateur = 'Dont exception de rapprochement' and unite = 'Nombre' then s1_nbr_mtch-s1_nb_ss_except
WHEN indicateur = 'Dont existence R500' and unite = 'Nombre' then CASE WHEN S1_R500_FLG = '1' THEN S1_NBR_MTCH ELSE 0 END
WHEN indicateur = 'Dont existence R500' and unite = 'Montant' then CASE WHEN S1_R500_FLG = '1' THEN S1_MNT_TT_MTCH ELSE 0 END
WHEN indicateur = 'Approbation' and unite = 'Nombre' then s1_nbr_appr
WHEN indicateur = 'Approbation' and unite = 'Montant' then s1_mnt_tt_appr
WHEN indicateur = 'Dont approbation après échéance' and unite = 'Nombre' then 0
WHEN indicateur = 'Dont approbation après échéance' and unite = 'Pourcentage' then 0
WHEN indicateur = 'dont pièces < 300 euros' and unite = 'Nombre' then CASE WHEN mnt.s1_borne_inf < 300 THEN s1_nbr_appr ELSE 0 END
WHEN indicateur = 'dont pièces < 300 euros' and unite = 'Montant' then CASE WHEN mnt.s1_borne_inf < 300 THEN s1_mnt_tt_appr ELSE 0 END
WHEN indicateur = 'Pièces acheminées' and unite = 'Nombre' then s1_nbr_created
WHEN indicateur = 'Dont délai < 15 jours' and unite = 'Nombre' then s1_nb_ach_15
WHEN indicateur = 'Dont délai entre 15 et 30 jours' and unite = 'Nombre' then s1_nb_ach_30
WHEN indicateur = 'Dont délai entre 30 et 45 jours' and unite = 'Nombre' then s1_nb_ach_45
WHEN indicateur = 'Dont délai entre 45 et 60 jours' and unite = 'Nombre' then s1_nb_ach_60
WHEN indicateur = 'Dont délai > 60 jours' and unite = 'Nombre' then s1_nb_ach_60
WHEN indicateur = 'Pièces payées' and unite = 'Nombre' then s1_nbr_paid
WHEN indicateur = 'Pièces payées' and unite = 'Montant' then s1_mnt_tt_paid
WHEN indicateur = 'Dont pénalités de retard' and unite = 'Nombre' then 0
WHEN indicateur = 'Dont pénalités de retard' and unite = 'Montant' then s1_penal_amt
ELSE 0
END) as valeur |
Partager