Inventory management

In Microsoft Dynamics NAV, inventory is kept for items in locations using Item Ledger Entries and Value Entries. On top of this, we can use Stock Keeping Units to have different inventory settings per item, location, and variant.

Let's start by looking at the design patterns of the inventory in Microsoft Dynamics NAV:

Inventory management

Keeping inventory can be extended with the use of warehouse management. This is designed to run on top of the Basic Item Inventory functionality.

The item table hosts the master data for inventory management like a G/L Account does for financial management.

Items

In this table, we can do the set up for each individual item such as pricing, inventory and production strategies, and tracking options.

The location table defines which level of inventory management is done. A location can either be a physical warehouse somewhere or a part of a warehouse, if one warehouse uses different warehouse strategies.

If we look at the Location Card, we see what we can set up:

Locations

Let's see these settings in detail:

Item variants is a powerful feature in Microsoft Dynamics NAV. It enables us to split an item into different categories without having to create a new item.

The variant code is maintained in the item ledger entries and used when applying them. Let's see an example of how this can be used.

Our company sells t-shirts. We have three sizes; small, medium, and large, and four colors; white, black, red, and blue. This enables us to create the following twelve unique variant codes:

Size and color

S-WHITE

S-BLACK

S-RED

S-BLUE

M-WHITE

M-BLACK

M-RED

M-BLUE

L-WHITE

L-BLACK

L-RED

L-BLUE

When we purchase or produce these t-shirts, we need to specify the variant code, which is inherited into the item ledger entry.

If we sell or transfer one of these items, we can specify the same variant code. Microsoft Dynamics NAV will then use this variant code when searching for inventory.

Variants

Sometimes, the same item can have more than one unit cost, replenishment system, or production method. To support this, we can use stock keeping units.

A stock keeping unit refers to an existing item, location, and variant. These three fields are the unique primary key. Let's see an example of how this can be used. Our t-shirts need to have different unit costs. In order to do this, we need to create a SKU for each variant we just created:

Stock keeping units

When we now create two purchase order lines for the same item with a different variant code, we can see that the Last Direct Cost is different for each variant.

The basic unit price of an item can be set in the Item table. This is a static field, which is used when a new sales document is created. To use more flexible unit prices, we can use the Sales Prices and Sales Discounts functionality:

Sales pricing

More information about pricing can be found in Chapter 1, Introduction to Microsoft Dynamics NAV, and Chapter 2, A Sample Application.

When the inventory is created and used, the system will apply and close positive and negative item ledger entries with each other. This enables us to trace inventory.

The application is saved in Item Application Entry table (339). Let's have a look at the C/AL code that handles the item application.

Item application is done in codeunit Item Jnl.-Post Line (22) in the ApplyItemLedgEntry function. The function starts with checking whether reservations are used. Using reservations changes the way inventory application is used. We'll discuss reservations later in this chapter.

If there are no reservations made, the system will start the application code. This allows two possibilities: manual application and automatic application.

Manual application is done when the user populates the Applies-to Entry field in the item journal line. This is also used when users change the application.

In this case, the system checks whether the Item Ledger Entry we have specified matches the requirements. When the application is done automatically, the system will search for the best item ledger entry based on the same requirements.

The actual application entry is created in the InsertApplEntry function.

In Microsoft Dynamics NAV, the physical information for Inventory is stored separately from the financial information. This information is stored in a one-to-many relation, meaning one Item Ledger Entry can have multiple Value Entries.

This enables us to specify the value information in detail in a time dimension and cost type dimension.

To move inventory from one location to another location, it is possible to do a negative and a positive adjustment in the Item Journal Line, but we can also use a Transfer Order, as shown in the following screenshot:

Transfer orders

The Transfer Order creates the item ledger entries for each location and maintains the link for the value entries.

This means that if we move 100 items from location blue to green without having received the purchase invoice yet, the system will create value entries for the moved inventory when the invoice is posted. Let's try this for a new item.

For trading companies, it is very important to have just enough inventories; not too many, not too few. In order to do this, we can use the requisition journals together with the reordering policy on the item.