Quantcast
Channel: SCN : All Content - SAP Business One (Español)
Viewing all articles
Browse latest Browse all 982

consultas Facturas Abiertas por Falta de Envio de Material PT

$
0
0


Buenas tardes tengo una nueva consulta donde quiero mostrar mis facturas y ponga el estatus de estas si no cuentan con su respectiva remisión o embarque.

 

solo que mi campo que no todas las facturas están embarcadas y no cuentan con el dato DocNum,0)as'Embarque N0' que es el numero de documento del embarque. por lo tal no me muestra todos los estatus de mis facturas.

 

 

este es mi código espero me puedan ayudar

 

 

select OINV.DocNum as 'Factura N0',

INV1.ItemCode as 'Codigo',

INV1.Dscription as 'Descripcion',

INV1.Quantity as 'Cantidad',

ISNULL(ODLN.DocNum,0) as 'Embarque N0',

CASE

OINV.InvntSttus

When 'C'

then 'Cerrado'

when 'O'

then 'Abierto'

else 'NULL'

end AS 'Tipo'

from OINV INNER JOIN INV1 ON OINV.DocEntry = INV1.DocEntry

INNER JOIN DLN1 ON DLN1.BaseEntry = OINV.DocEntry

INNER JOIN ODLN ON DLN1.DocEntry = ODLN.DocEntry

where OINV.DocDate BETWEEN @i and @f 

GROUP BY OINV.DocNum,OINV.DocEntry,INV1.LineNum,INV1.ItemCode,INV1.Dscription,INV1.Quantity,ODLN.DocNum,OINV.InvntSttus,OINV.InvntSttus


Viewing all articles
Browse latest Browse all 982

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>