Understanding the Inventory Give-Back Loop

The “inventory give-back loop” is the part of the aACE COGS engine that accounts for returns and reuse.  

For example, suppose we have an inventory lot for ten units of boxes; we ship ten units to a customer, and then the customer returns two. The COGS engine will “give back” two units to that inventory lot, so it has two units available for another shipment to a customer. This example would be reflected in the system as:

  • 10 units received from supplier — Inventory Lot created — Lot: 10 units
  • 10 units sent to customer — Inventory Usage created (+10 units) — Lot: 0 units
  • 2 units received from customer — Inventory Usage created (-2 units) — Lot: 2 units

Give-Back Limits for Inventory Lots

An inventory lot's current Used balance is the largest number of units that can be given back to that lot:

A product return may include more units than can be associated with a single inventory lot:

  • If other inventory lots for that line item code are available, those lots are used for the additional inventory usage quantity.
    Note: For returns, additional inventory lots are always selected using LIFO logic, even if your accounting preferences specify FIFO. This is because FIFO logic for returns means the cost of the first inventory lot would be used in perpetuity, even though those costs would be increasingly irrelevant over time.
  • If no other inventory lots are available, the give-back loop iterates, allocating as much negative usage quantity as possible to the lot, then allocating a corresponding amount of positive usage quantity.

Example of the Inventory Give-Back Loop

The give-back loop is used to resolve unallocated inventory usage, as shown in this example:

For line item code Tech-003a, a shipment of 50 units was sent to a customer, followed by a return shipment of 50. Both shipments generate inventory usage records:

Tech-003a only has one inventory lot in the system. All 10 units have been allocated to previous inventory usage records from previous shipments, so the inventory lot is currently closed. Because the Lot Quantity is 10 and the Current Quantity is zero, this lot's current give-back limit is 10 (i.e. the lot's quantity Used).

Before the COGS Reconciliation process begins, the inventory balance is at zero: 0 current inventory (inventory lot) + 50 unallocated quantity (positive usage) - 50 unallocated quantity (negative usage) = 0.

First Allocation Loop

When the COGS Reconciliation process runs, aACE recognizes that there are no lots with available inventory, so the unallocated positive usage (i.e. the shipment to the customer) remains at 50; however, the negative usage (i.e. the product return) can give back 10 units to that lot, reducing the negative unallocated quantity to -40.

At this point, the inventory lot is open again and has 10 units.

Second Allocation Loop

Because there was a change in the usage quantities, aACE loops through the allocation process again.

Now the COGS engine can allocate 10 units of positive usage to the inventory lot, decreasing the unallocated positive usage to 40. This also reduces the inventory lot to zero again, preparing the way for 10 more negative usage records to be allocated, leaving -30.

This leaves the inventory lot with 10 units again, identical to the screenshot shown previously.

Third Allocation Loop

The process loops again, reducing both the positive and negative unallocated usage by 10 (i.e. +30/-20) as the inventory lot is depleted and replenished again.

Fourth Allocation Loop

The process loops again, reducing unallocated usage to +20/-10 as the inventory lot is depleted and replenished.

Fifth Allocation Loop

With this loop, the unallocated usage quantities are reduced  +10/0. When the inventory lot is replenished this time, the negative inventory usage quantity reaches zero, so that usage record is closed.

Final Allocation

The remaining 10 units of positive unallocated usage are allocated to the lot, reducing that quantity to zero and closing the inventory usage record.

This step also leaves the inventory lot record at zero units again, so it is closed.

After the COGS Reconciliation process ends, the inventory balance is again at zero: 0 current inventory (inventory lot) + 0 unallocated quantity (positive usage) - 0 unallocated quantity (negative usage) = 0. 

On the inventory lot detail view, we can review the quantities that were processed. Even though the lot can only receive 10 units (i.e. its give-back limit), the Inventory COGS section shows -50/+50 for the usage quantities that were processed. This is because the give-back loop processed those 10 units  ~five times.