SAGE 200 Diagnostic Tool

Hi all,

SAGE Evolution Version 10.

There is a small issue with the diagnostic tool, Inventory, Transactional Quantities.

The script does not provide for warehouse quantities. If you need to run the script, use the on below directly in MS SQL Management Studio

Select
S.Code as ItemCode,
ISNULL(STTrans.WarehouseCode,'') as WarehouseCode,
S.QtyOnHand as MasterQty,
Sum(IsNull(STTrans.QtyIn,0) - IsNull(STTrans.QtyOut,0)) as TransQty

from

_bvSTTransactionsFull STTrans
left outer join

(Select Code,StockLink,q.WhseID,Q.QtyOnHand from StkItem ST
left join
_etblStockQtys Q
on ST.StockLink = Q.StockID where ServiceItem = 0) S

on STTrans.AccountLink = S.StockLink and s.WhseID = STTrans.WarehouseID
group by S.Code, STTrans.WarehouseCode, S.QtyOnHand

having Round((S.QtyOnHand),2) != Round(Sum(IsNull(STTrans.QtyIn,0) - IsNull(STTrans.QtyOut,0)),2)

Parents
  • 0

    Hi Johan

    Thanks so much for this great SQL script!

    But I just want to confirm:

    Exactly what is this SQL script to diagnose?

    I've run it on my own DB and it seems to be showing differences between transaction quantities vs current warehouse quantities???


    Can you please elaborate by using a practical example scenario?

    Regards

    Bennie 

  • 0 in reply to Bennie Pienaar

    Bennie,

    The diagnostic tool has a section for Inventory, Transactional Quantities. See Below:

    That section uses a SQL script to identify issues. See Below:

    The script as shipped by SAGE does not properly link the warehouses, and that is why I added the additional warehouse link in the script.

Reply Children