---
---Pedidos facturados LE
---
select a.strNumDoc as Pedido, b.strNumDoc as Factura, a.strCodTer as Cedula, c.Estado, c.FechaAsignacion
from tbl_pedcab a with (nolock)
inner join tbldoc b with (nolock) on b.strCamGen = a.strCamGen and b.strCodCA = a.strCodTer and b.strTipDoc = 'fc'
inner join [192.168.10.14].[MP_StockSupply].Picking.PedidosEncabezados c on c.Campana = a.strCamGen and c.NumeroPedido = a.strNumDoc
where
a.strCamGen = '201909'
and b.strNumDoc is not null
and c.Estado <> 4
and c.FechaAsignacion >= '20190612 13:00'