Remove a subquery
===

I have this query

    select T1.local,
    			m.Nombre as Marca, T1.NombreLinea as Linea , case  when T1.IdComprobanteTipo in (21,23,26,28) then 0 else -sum(T1.Cantidad) end as Cantidad,
    			case  when T1.IdComprobanteTipo in (21,23,26,28) 
    
    			--toma en cuenta los descuentos de las facturas que fueron anuladas
    			then T1.TotalNeto 
    			else isnull(T1.ImporteNeto,0) - isnull((select sum(importe) as importe 
    													from GrimPosCon..Fact_Descuento (nolock) DD
    													where DD.IdComprobante = T1.idComprobante  and T1.IdDim_Producto = IdDim_Producto
    													 and T1.IdDim_Medida = IdDim_Medida and T1.IdDim_Calidad = IdDim_Calidad 
    													 and exists 
    														 (
    															select 1 
    															from GrimPosCon..ComprobanteReferencias (nolock) AA
    															inner join GrimPosCon..Fact_Comprobante (nolock) BB on aa.IdComprobanteCredito = BB.IdComprobante
    															where AA.IdComprobanteDebito = DD.IdComprobante
    															and BB.IdDim_ComprobanteTipo in (4,13,16,19)
    														 )
    													 ),0)
    			end as IMPORTE, 
    			T1.NombreFamilia as Familia
    		from #Query T1
    		inner join GrimPosCon..Dim_Marca(nolock) m on m.IdDim_Marca = T1.IDDim_Marca
    		Group by  T1.local, m.Nombre,T1.NombreLinea,T1.NombreFamilia,T1.TotalNeto,T1.IdComprobante, T1.IdDim_producto,
    		T1.idDim_Medida,T1.ImporteNeto,T1.IdComprobanteTipo  ,T1.IdDim_Calidad


I want to remove the biggest subquery.
I tried to do `Left Joins where is not null`, but it gave me a different result.
How Can I modify that ?
I want the same result, but use some Joins, or something more faster than that subquery