You are on page 1of 1

PAGOS BLOQUEADOS

SELECT
T0.DocNum AS Numero, T0.DocDate, T0.CardCode AS Codigo, T0.CardName AS
Nombre, T0.NumAtCard AS Referencia, T0.DocTotal AS Importe,
CASE WHEN T1.PaymBlock = 'Y' THEN 'Proveedor' ELSE 'Factura'
END AS Bloqueo, CASE WHEN T1.PaymBlock = 'Y' THEN 'Bloqueo en ficha IC' ELSE
T2.PayBlock END AS Motivo
FROM
dbo.OPCH AS T0 INNER JOIN
dbo.OCRD AS T1 ON T0.CardCode = T1.CardCode LEFT OUTER JOIN
dbo.OPYB AS T2 ON T0.PayBlckRef = T2.AbsEntry
WHERE
(T0.PayBlock = 'Y') OR
(T1.PaymBlock = 'Y')

select t0.TransId as transacion , t0.RefDate as fcontable, t0.DueDate as


Fvencimiento, t0.memo as Comentario , T1.shortname as ic , T1.account as Cuenta ,
T1.BalDueCred

from

dbo.OJDT as t0 inner join


dbo.JDT1 as T1 on T0.number = T1.BaseRef LEFT OUTER JOIN
dbo.OCRD as T2 on T1.shortname = T2.cardCode

where t1.account = 465199

You might also like