on 05-20-2019 8:07 PM
Buenas Managers,
Mi consulta es la siguente, trato de ver como se relacionan una factura deudor (OINV) Venta de tipo Articulo y una Nota de Credito de Servicio de Tipo Venta (ORIN),
ya filtre buscando por, OINV,INV1,ORIN,IRN1 y no encontre tal relacion, tambien busque en una tabla OITR que es donde se ven las reconciliaciones anteriores ya que tambien necesito saber su fecha de reconciliacion,
PD: La reconciliacion se efectua mediante socios de negocios.
Desde ya muchas Gracias.
Buenas Nelson,
Please try this query:
SELECT
v.DocNum,
v.DocDate,
v.CardCode,
v.CardName,
v1.ItemCode ,v1.Dscription ,v1.Quantity 'Invoice Qty',v1.Price 'Invoice Price',v1.LineTotal 'Invoice Total'
,isnull(r1.Quantity,0) 'Credit Memo Qty',isnull(r1.Price,0) 'Credit Memo Price',isnull(r1.LineTotal,0) 'Credit Memo Total'
,v1.LineTotal-isnull(r1.LineTotal,0) 'Net Profit'
FROM oinv v inner join inv1 v1 on v.DocEntry=v1.DocEntry
left outer join rin1 r1 on r1.BaseLine=v1.LineNum and r1.BaseEntry =v1.DocEntry and r1.BaseType =13
left outer join orin r on r.docentry=r1.docentry
WHERE v.docdate between '01/01/2019' and '06/06/2019'
Gracias,
Aziz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.