Código SQL [-] select sum(cantidad) from pagos where cliente = :CLIENTE and expediente = :EXPEDIENTE
select sum(cantidad) from pagos where cliente = :CLIENTE and expediente = :EXPEDIENTE