Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 950

Stock counting query including batch numbers

$
0
0

Good morning guys, we are trying to write an all encompassing query that shows stock count by bin location with volume and bacth numbers, so that we may print that off and hand to our personnel who are stock counting at any given time..

 

At present, we have a convoluted method that is also not returning correct data.

First, we must run stock counting, select the bin locations we want to stock take and then add the document.

 

Then we run this query to return batch numbers:

SELECT T3.[DocNum],T0.[LineNum], T0.[ItemCode], T0.[ItemDesc], T0.[Freeze], T0.[WhsCode], T0.[SuppCatNum], T1.[DistNumber], T1.[InDate],T2.[Quantity]

FROM INC1 T0

INNER JOIN OINC T3 ON T0.[DocEntry] = T3.[DocEntry]

LEFT JOIN  OBTN T1 ON T0.[ItemCode] = T1.[ItemCode]

LEFT JOIN OIBT T2 ON T1.[DistNumber] = T2.[BatchNum] AND T1.[ItemCode] = T2.[ItemCode]

WHERE T3.[DocNum]=[%0]

 

The problem with this method is that:

1. We have to print 2 sheets of paper and try to marry up the batches with the stock count which increases the time it takes to stock take and also.

2. The query is returning all batches associated with any particular product. This becomes a problem as for some reason, it is including consignment stock numbers that are in a seperate warehouse i.e. we run the stock counting for WH2-Q-1 to WH2-Q-4 and it also shows a volume of product in WH10 (consignment warehouse).

 

Is there a way to have a query return the following report:

 

1. Select bin location (by warehouse) FROM and TO.

2. Return only items listed as in stock.

3. Includes batch numbers for the product.

4. Admission date.

5. Only returns items from the selected location.

 

Your help will be very much appreciated guys.

 

Warmest Regards

Roy


Viewing all articles
Browse latest Browse all 950

Trending Articles



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