Skip to Content

Batches and Serials Stock Audit Query Report

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 30 at 06:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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