Intenta con:
Código SQL
[-]
(select coalesce(sum(importe),0) from cuem where trim(no_factura) = trim(facm.cve_doc)) -
(select coalesce(sum(importe),0) from cued where trim(no_factura) = trim(facm.cve_doc))
Confirmarme si te funciono.
Saludos.
Maniche