Skip to main content

Yield Calculations for Stock Item Lots

  • July 18, 2025
  • 3 replies
  • 109 views

Hello! 

I’ve made a GI (attached) that I think is really neat, and is helping my team find anomalies in raw material usage.

Context:

We’re a process manufacturing company that produces some regulated liquid products. Because of this, traceability on raw materials is key.

Our company requires reporting on the yield percentage of raw material lots we use in production, and the percentage of what we produced was sold. 

We only use one Warehouse and Branch, but have multiple locations to manage Quality Control holds and Quarantine. We use the Lot and Serial Tracking feature.

 

We had an issue where users couldn’t confirm how a lot was zero’d out when inventory was completed. Sometimes users consumed exactly the amount of stock items that we had received. But other times our inventory count was off because vendors over/under shipped an item and we wouldn’t know exactly how much of a liquid was in a container until it was empty. If a lot had zero quantity, it was removed from the Inventory Summary page, and was hard for users to trace how it was used. 

The GI:

I’ve created a GI table displays every lot of every stock item, and can be filtered by stock item. We have the initial receipt date, followed by our current quantity on hand across all locations. Next we have a column for the initial amount we received of the product. Then a sum of all adjustments, then a sum of all issue transactions. Next, a Yield % calculation that divides the sum of issued quantity by the sum of received quantity, and multiplies it by 100 for a percentage value. 

Lots with a current quantity on hand of zero are highlighted yellow so they stand out. 

This can be filtered by the Inventory ID condition. Initially I had it only load by inventory ID but users requested it load everything. Currently it is sorted by Receipt Date.

I’ve also added other columns for other transaction types and left them deactivated because we won’t use them.

I’ve also linked the Lot Transaction History, Inventory Summary, Inventory Transaction Summary, and Inventory Transaction Details pages on the side bar, with the selected line details filled in. 

Screenshot of Yield GI

Requests:

If anyone can help with the following I would be very grateful. 

  1. I’d like a conditional format on the Yield % field. If the Current Qty on Hand is 0 and Yield % is within 97-103%, format it with =’green20’. If it is outside of that range, format it with =’red20’.
  2. Truncate all values to 2 decimals.
  3. Create a business event that triggers and email when a Current Qty On Hand reaches zero and the Yield is outside of the 97-103 range. I’m testing a version of this right now and will post it if it works and others are interested. 

Closing:

I hope this helps others, and I welcome any constructive criticism. This was a challenge to build, but a fun puzzle. 

I’d love to hear how others use this, and if anyone has any ideas for improvement. 

This is the most complex GI I’ve made. The Open University course on GI’s was immensely helpful. 


Cheers,
Nathan

 

3 replies

bwhite49
Captain II
Forum|alt.badge.img+10
  • Captain II
  • July 18, 2025

Hi Nathan,

This looks like a good GI.

For number 1, conditional formatting of colors does not work very well on GIs that have grouping which can be frustrating. You can’t add any aggregate calculations into the style editor. I have no idea why.

As a bad work-around you can add a new column and add this formula which will have an output of the color name.

 

=IIF((IIF(   SUM(     IIF([Split.DocType] = 'R', [Split.Qty], 0)   ) <> 0,   ROUND(     (       SUM(IIF([Split.DocType] = 'I', [Split.Qty], 0))       /       SUM(IIF([Split.DocType] = 'R', [Split.Qty], 0))     ) * 100,     2   ),   0 )) >= 93 AND (IIF(   SUM(     IIF([Split.DocType] = 'R', [Split.Qty], 0)   ) <> 0,   ROUND(     (       SUM(IIF([Split.DocType] = 'I', [Split.Qty], 0))       /       SUM(IIF([Split.DocType] = 'R', [Split.Qty], 0))     ) * 100,     2   ),   0 )) <= 103, 'Green', 'Red')

 

This new column could be used in a shared filter to quickly identify which lines belong to which group. Again, no real color though.

 

For 2 you can use a schema field (a field to borrow the formatting from). In this case, INTran.TranAmt is a good one to format to 2 decimals.

 

For number 3, this sounds like a very doable BE. Just make sure you have all key fields from every table added to the GI. Uncheck the visible field in the GI grid editor to hide these fields so that they do not mess up how your report is presented. They need to be available, but not necessarily visible. 


  • Author
  • Freshman I
  • July 18, 2025

Thank you for the detailed reply! I’ll give this all a try and upload a new version when I get the chance.


Forum|alt.badge.img+1

Good work Nathan!  Complex GI’s are always a rewarding feat and so glad Acumatica provided a platform for doing these types of things relatively easily. Especially without the unnecessary complexities that might come with report writers or basic SQL query tools.  I always find myself whipping up small 1-off GI’s versus old software I had to dive into a report generator to make something.