POS + General Ledger + Inventory + Payroll — All Included on Every Plan | Free Updates Forever

Stock Tracking Within a Location: Zone-Level Inventory

Stock Tracking Within a Location: Zone-Level Inventory

Within each location, AccuArk can track stock at a more granular level using storage zones. This two-tier model lets you know not just that you have 500 units at your warehouse, but exactly which shelf, bin, or area those units are in.

The Two-Tier Stock Model

AccuArk tracks stock at two levels simultaneously:

LevelTableWhat It Tracks
Location Levelinventory_stock_locationTotal quantity of an item at a location, last cost, last transaction date
Zone Levelinventory_stock_zoneQuantity of an item at a specific zone within a location, reserved quantity, last transaction date

These two levels are maintained independently. When stock is received, moved, or adjusted, both the location-level and zone-level records are updated within the same database transaction.

Zone Stock Table Structure

The inventory_stock_zone table stores:

FieldDescription
item_idThe inventory item
location_idThe location this zone belongs to
zone_idThe specific storage zone
quantityThe current stock quantity in this zone
qty_reservedThe quantity reserved (e.g., for pending orders)
latest_transactionTimestamp of the last stock change in this zone

The Available quantity is calculated as: Available = Quantity - QtyReserved

Each unique combination of item + location + zone creates one record. The zone stock uses an UPSERT pattern: if a record already exists for the item/location/zone combination, the quantity is incremented or decremented. If no record exists, one is created.

Viewing Zone Stock on the Item Form

The item form has a Zone Stock tab that shows the dgvZoneStock grid. This grid displays the zone-level breakdown for the selected item across all locations:

ColumnDescription
LocationThe location name
ZoneThe storage zone name, sorted by zone depth and sort order
QuantityThe current stock in this zone
ReservedThe reserved quantity
AvailableQuantity minus Reserved

Only zones with non-zero quantity or non-zero reserved quantity are shown. This keeps the view clean by hiding zones where the item has never been stocked.

How Zone Stock Updates

Zone stock is updated through four main operations:

1. Purchase Order Receiving

When stock is received on a PO, the system determines the target zone using the AccuArk's routing system (see Article 71). The received quantity is added to both the location-level stock and the zone-level stock for the resolved zone. If the user manually overrides the zone via the zone picker on the PO form, the override zone is used instead.

2. Stock Moves

When transferring stock, the From Zone and To Zone are specified on the stock move form. The transfer subtracts from the source zone and adds to the destination zone, all within the same atomic transaction.

3. Stock Adjustments

Adjustments can target a specific zone using the zone picker on the adjustment form. The adjustment quantity (positive or negative, based on the reason direction) is applied to both the location and zone stock.

4. Cycle Counts

Cycle counts can optionally be scoped to a specific zone. When finalized, the system generates adjustment transactions for each variance, and those adjustments target the zone that was counted.

Zone Stock vs. Location Stock

An important detail: the location total and the sum of zone quantities are maintained as independent aggregates. They may not always match exactly in these scenarios:

  • Stock exists outside zones — If stock was added to a location before storage zones were set up, or if a receiving operation did not assign a zone, the stock exists at the location level but not in any zone
  • Legacy data — Stock from before zone tracking was enabled may have location quantities without corresponding zone records

The location-level quantity is always the authoritative total for that location. Zone-level data provides the breakdown of where within the location the stock is physically stored.

The UPSERT Pattern

Zone stock changes use an INSERT ... ON DUPLICATE KEY UPDATE pattern:

INSERT INTO inventory_stock_zone (item_id, location_id, zone_id, quantity, latest_transaction)
VALUES (@item_id, @location_id, @zone_id, @quantity, NOW())
ON DUPLICATE KEY UPDATE
quantity = quantity + VALUES(quantity),
latest_transaction = NOW()

This means:

  • If no record exists for this item/location/zone, a new one is created with the given quantity
  • If a record already exists, the quantity is incremented (or decremented for negative values)
  • The timestamp is always updated

This approach eliminates race conditions and avoids the need to check whether a record exists before updating.

Tips

  • Set up zones before receiving stock — If you create zones after stock has already been received, existing stock will not have zone assignments. You would need to perform stock adjustments or moves to assign existing stock to zones.
  • Use the Zone Stock tab for warehouse audits — The zone-level breakdown shows exactly where items are stored, which is invaluable during physical counts
  • Zone stock supports fractional quantities — Just like location stock, zone quantities can be fractional (e.g., 2.50 liters)
  • The Unassigned zone catches unrouted stock — If no routing rule matches and the location's OverflowToUnassigned setting is enabled, stock goes to the system-managed Unassigned zone. This ensures stock is never lost, even without explicit routing.
  • Querying zone stock — You can view all items at a specific zone using the Zone Explorer, or view all zones for a specific item using the Zone Stock tab on the item form
Was this article helpful?
Back to Inventory & Stock Management Contact Support
Please note: This article is intended as a general guide. AccuArk© is continuously improved through regular software updates, so some screens, labels, or features described here may appear slightly different in your version. If something doesn't match or you need further assistance, please don't hesitate to contact our support team.
Still need help?

Our support team is ready to assist you.

Submit a Ticket