-- MISE A JOUR DES MONTANTS DES CME A ZERO FRANS

UPDATE p_prestationactes,p_facture,police
SET p_prestationactes.fraisRetenu=0,p_prestationactes.montantApayer=0 ,
 p_facture.fraisRetenu=0,p_facture.MontantApayer=0 
WHERE (p_facture.id=p_prestationactes.idfacture)
AND (p_facture.idPolice =police.id)
AND (LEFT(p_facture.dateSysteme,10) BETWEEN '2022-01-01' AND '2022-01-31' )
AND police.codeGcAssureur='GNA' 
AND p_prestationactes.codePrestataire IN ('CE1287','CE1377')
AND (p_prestationactes.tiersPayant="1")