Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8908

Reporte de Factura de Proveedor vs Orden de Compra

$
0
0

Buenos Días Consultores

 

Acudo a usted, se me solicito efectuar un reporte donde muestre lo siguiente :

OPOR
OPOROPOROPCHOPCHOPCH
T0.[DocNum]T0.[NumAtCard]T0.[DocDate]T0.[DocNum]T0.[NumAtCard]T0.[DocDate]
Doc. de SAPReferenciaFechaFact. SAPReferenciaFecha

 

Necesito vincular todas las ordenes de compra que vinculen la factura de proveedor, investigando en el portal hay query que modifique pero solo me recupera cuando tiene documento de destino Entradas de Mercancías.

 

SELECT DISTINCT t2.cardcode as codigo, t2.cardname as Proveedor,t2.DocNum AS Orden_de_compra, t2.doctotal as Total_Orden, t2.DocDate as 'Fecha_orden', t4.DocNum AS No_Entrega, t4.doctotal as totalentrega, t4.DocDate AS Fecha_Entrega, t5.DocNum AS No_Fact, t5.doctotal as Total_fact, t5.DocDate as Fecha_Fact, t0.DocNum AS Nota_credito 

                                                               FROM ORPC t0 INNER JOIN 

                      RPC1 t1 ON t0.DocEntry = t1.DocEntry RIGHT OUTER JOIN 

                      OPOR t2 LEFT OUTER JOIN 

                      PDN1 t3 INNER JOIN 

                      OPDN t4 ON t3.DocEntry = t4.DocEntry INNER JOIN 

                      OPCH t5 INNER JOIN 

                      PCH1 t6 ON t5.DocEntry = t6.DocEntry ON t4.DocEntry = t6.BaseEntry ON t2.DocEntry = t3.BaseEntry ON 

                      t1.BaseEntry = t5.DocNum 

where 

t5.isins='N' and 

t2.DocDate>= [%0] and t2.DocDate<= [%1]

 

Agradezco de su apoyo para elaborar reporte.

 

Saludos.

 

Carlos Ortega.


Viewing all articles
Browse latest Browse all 8908

Trending Articles



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