	SELECT
	  pr.codePrestataire AS codeP,pr.libelle AS Prestataire,l.codeLocalite AS CODE ,l.libelle AS localite,
	pr.adresseGeo,pr.telephoneFixe,pr.telephonePortable,  0 AS montantFacture,0 AS apresDecompte
		
		/*SUM(IFNULL(B.fraisRetenu,0)) AS montantFacture,
		SUM(IFNULL(B.montantApayer,0)) AS apresDecompte	*/	
	FROM prestataire pr
	INNER JOIN localite_ci l ON (l.codeLocalite=pr.codeLocalite)	
	WHERE pr.codePrestataire NOT IN ( SELECT B.codePrestataire  
	FROM p_facture B 
	WHERE (B.codeSociete="vitalis") 
	AND B.codePrestataire NOT IN ('CE0416','PR1176','CE1215','CE1232','PR1175') 
	AND (LEFT(B.dateSysteme,10) BETWEEN '2022-01-01' AND '2022-12-31' ))	
	AND pr.codeTypePrestataire='PHA'
	-- AND G.id!='45' AND P.idClient!='49' AND prt.montantApayer!=0
	ORDER BY l.codeLocalite,pr.codePrestataire
	