Skip to main content
Solved

Is there something like INItemSiteHistByCostCenterD but based on locations

  • November 1, 2024
  • 4 replies
  • 50 views

Kovatus
Freshman II

Good Morning Ladies and Gentlemen

I have a bit of a problem regarding dead stock
I am trying to add the Location field to the dead stock screen

This is what I currently have:
 

Non filtered by location
Filtered by location

 

Now the problem I am facing is with the dead stock calculations
Acumatica stores inventory history in INItemSiteHistByCostCenterD, but there is no table that has it based on location, or includes the locationid field (like INItemSiteStatusByCostCenter vs INLocationStatusByCostCenter)

 

Would there be a nice work around, or would I have to build a custom view/DAC
To be honest, I just want more advice ;)

Best answer by Kovatus

Good Morning to All

Thanks ​@Nilkanth Dipak for your suggestion, I have taken it to heart

Here is what I have done:

  • I built the SQL View and added it as a database script (Create View script)
  • After publishing, and having the view created, I created a DAC with the same name as the view, and selected the “Generate Members from database” (something in this line)
  • I modified the existing DeadStock Screen
  • I added the location filter to the header
  • I added the Location Description and Id to the grid
  • I then overrode the DAC for the DeadStock grid to include location
  • Having the view, made calculations simple

If anyone ever needs to do this, I attached the customization package

Take note of the tables used in the view if some of the logic in the code does not make sense

Ask freely if you or anyone have questions

 

Kind Regards,

A relieved developer!

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

4 replies

Nilkanth Dipak
Semi-Pro II
Forum|alt.badge.img+10

Hi @kooshough87,

  1. Build a Custom DAC and View with INItemSiteHistByCostCenterD and INLocationStatus
    Since Acumatica doesn’t natively track inventory history by location, a custom DAC and view could aggregate data from INItemSiteHistByCostCenterD and INLocationStatus to approximate dead stock calculations by location.
  2. Create a Generic Inquiry (GI) with Calculations for Dead Stock by Location
    If your needs are primarily analytical and don’t require a fully custom DAC, consider creating a Generic Inquiry (GI) that includes the LocationID field and performs dead stock calculations.

    Create a GI that Joins INLocationStatus and INItemSiteHistByCostCenterD:
    Pull in LocationID, InventoryID, and SiteID from INLocationStatus.
    Join to INItemSiteHistByCostCenterD to pull in historical data at the site level.

  3. Define a SQL View in the SQL Database:
    Join INLocationStatus and INItemSiteHistByCostCenterD based on SiteID and InventoryID.
    Calculate dead stock based on movement dates.
    Create a DAC for the SQL View:
    Use the SQL view as a data source for a custom DAC in Acumatica to expose it in the UI or reports.
    This approach can be helpful if you need to perform complex aggregations or transformations that are difficult to achieve in BQL.

    Note: Try above approaches in test environment.

    Hope, it helps!


Kovatus
Freshman II
  • Author
  • Freshman II
  • 5 replies
  • November 4, 2024

Good Morning Dipak

I appreciate your response

 

I will look into it and let you know how it has gone

Kind Regards!


Kovatus
Freshman II
  • Author
  • Freshman II
  • 5 replies
  • Answer
  • January 22, 2025

Good Morning to All

Thanks ​@Nilkanth Dipak for your suggestion, I have taken it to heart

Here is what I have done:

  • I built the SQL View and added it as a database script (Create View script)
  • After publishing, and having the view created, I created a DAC with the same name as the view, and selected the “Generate Members from database” (something in this line)
  • I modified the existing DeadStock Screen
  • I added the location filter to the header
  • I added the Location Description and Id to the grid
  • I then overrode the DAC for the DeadStock grid to include location
  • Having the view, made calculations simple

If anyone ever needs to do this, I attached the customization package

Take note of the tables used in the view if some of the logic in the code does not make sense

Ask freely if you or anyone have questions

 

Kind Regards,

A relieved developer!


Nilkanth Dipak
Semi-Pro II
Forum|alt.badge.img+10

@Kovatus, Thanks for sharing the solution with the community.


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