Skip to main content
Solved

Creating a GI for Warehouse Locations with 0 inventory on hand


claudematherne24
Jr Varsity III
Forum|alt.badge.img

I’m trying to work on a GI to show my Inventory Manager all Warehouse locations that currently do not have inventory in them.  This is a way to see how many open locations exist, build out a storage capacity percentage, and help receiving pick locations to put inventory away.

 

I’ve tried something as simple as looking at INLocationStatus and filtering out there QtyonHand = 0, but all that seems to be doing is showing me inventory IDs that had a reference there at one point, that is currently at 0.  I can look at that location and still see inventory allocated there in the system.

I’m curious what I am missing.  Do I need to find a why to sum all inventory IDs as a location first, then show only the ones that equal zero?

 

Best answer by Samvel Petrosov

I would try taking the INLocation and joining the Location Status to it based on the SiteID and LocationID, grouping the data on Site ID, and Location ID, and taking Max(QtyOnHand).

 

That should give you the list of all the locations and the max quantity in that location between the items.

Then you can put a shared filter on top of this GI to filter out any records where Max(QtyOnHand) > 0.

 

In SQL that will look something like below, but of course you need to take into account that you may need to use INLocationStatusByCostCenter instead of INLocationStatus depending on your Acumatica version.

 

select * from (select INLocation.CompanyID,INLocation.SiteID,INLocation.LocationID,MAX(QtyOnHand) as MaxLocationQty
from INLocation
left join INLocationStatus on INLocation.CompanyID=INLocationStatus.CompanyID and INLocation.SiteID=INLocationStatus.SiteID and INLocation.LocationID=INLocationStatus.LocationID
group by INLocation.CompanyID,INLocation.SiteID, INLocation.LocationID) as t
where MaxLocationQty is null or MaxLocationQty=0; 

 

View original
Did this topic help you find an answer to your question?

3 replies

Samvel Petrosov
Jr Varsity II
Forum|alt.badge.img+3

I would try taking the INLocation and joining the Location Status to it based on the SiteID and LocationID, grouping the data on Site ID, and Location ID, and taking Max(QtyOnHand).

 

That should give you the list of all the locations and the max quantity in that location between the items.

Then you can put a shared filter on top of this GI to filter out any records where Max(QtyOnHand) > 0.

 

In SQL that will look something like below, but of course you need to take into account that you may need to use INLocationStatusByCostCenter instead of INLocationStatus depending on your Acumatica version.

 

select * from (select INLocation.CompanyID,INLocation.SiteID,INLocation.LocationID,MAX(QtyOnHand) as MaxLocationQty
from INLocation
left join INLocationStatus on INLocation.CompanyID=INLocationStatus.CompanyID and INLocation.SiteID=INLocationStatus.SiteID and INLocation.LocationID=INLocationStatus.LocationID
group by INLocation.CompanyID,INLocation.SiteID, INLocation.LocationID) as t
where MaxLocationQty is null or MaxLocationQty=0; 

 


claudematherne24
Jr Varsity III
Forum|alt.badge.img

Yeah, that makes sense.  I figured it would have to do something where I totaled everything together.  This worked like a charm.

 

Thanks!!!


Forum|alt.badge.img

Hi ​@claudematherne24 

Try using the INLocation table instead of INLocationStatus, and filter out locations where no records exist in INLocationStatus with a LEFT JOIN—this ensures you only get locations with zero inventory.

Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings