cancel
Showing results for 
Search instead for 
Did you mean: 

Batches and Serials Stock Audit Query Report

0 Kudos

Greetings,

Hi, i am not good in writing a query, appreciate if someone can provide me a query report as below:

Whse, Item No, Serial/ Batch No, Mfr Serial No, Current Serial/ Batch No Cost, Opening Qty, Opening Value, Closing Qty.

Thank you

Regard

Ng

Accepted Solutions (0)

Answers (1)

Answers (1)

KennedyT21
Active Contributor
0 Kudos

Start with this


SELECTDISTINCTT0.itemcode,
T0.itemname,
T0.docdate,
T0.doctype,
T0.docnum,
T0.loccode,
t4.distnumberAS[BatchNumber],
T1.quantity,
T5.calcpriceAS[Price]
FROM[oitl]T0
INNERJOIN[itl1]T1
ONT1.[logentry]=T0.[logentry]
INNERJOINobtnT4
ONT1.mdabsentry=T4.absentry
INNERJOIN[oitm]T2
ONT2.[itemcode]=T0.[itemcode]
INNERJOINoinmT5
ONT0.itemcode=T5.itemcode
ANDT0.loccode=T5.warehouse
ANDT0.appdocnum=T5.base_ref

Regards

Kennedy

0 Kudos

Hi,

Thank you.

I changed OBTN to ASRN, because of using Serial number.

How about how can i get the Opening Qty and Closing Qty?

Appreciate if you can provide further.


Thank you

Regards

Ng