Allow warehouse or location negative physical inventory in AX2012

Problem.

We have to allow negative stock level on selected location or selected warehouse. It cannot be defined by item model groups as it is related per location/warehouse.

Tool.

In Microsoft Dynamics AX2012 R2/R3 there are already two ways to enable negative stock levels. The first one is to use item model group configuration. However, here we can only allow negative stock levels for products, which are included in selected item model group.

Allowing negative stock level with accuracy to warehouse level is also possible by enabling Retail (ID 467) configuration key in Microsoft Dynamics AX2012. However, if we do not want to turn on all Retail functionalities, we can achieve it by minor customization.

Step by step.

Case 1: Retail configuration key is enabled and negative stock level per warehouse

If we are using „Retail” configuration key, we do not have to make any customizations to allow negative stock level at specific warehouse. We can use „Physical negative inventory” field for this purpose.

Case 2: Retail configuration key is disabled or we want to allow negative stock level per location.

To make sure we will not skip any checking or validation, which Dynamics does to determine if the physical inventory muse be checked, I used cross-reference tool for InventLocation.RetailInventNegPhysical field.

So „checklist” looks like this:

Create new Extended Data Type extending NoYesId called AllowInventNegPhysical_ISV.

Create new field in InventLocation (negative physical inventory per warehouse) or WMSLocation (negative physical inventory per location) called AllowInventNegPhysical_ISV.

Edit following methods (examples are prepared for „location level” scenario, „warehouse level” is going to be easier):

1: \Classes\InventUpdate\setParmAllowDefault

2: \Classes\InventUpdateOnhand\mustCheckPhysicalOnhand

3: \Classes\InventUpdateOnhand\mustCheckPhysicalInvent

4: \Classes\WHSInventOnHand\isNegativeWarehouseAdjustmentRequired

5: \Classes\ReleaseUpdateDB63_WHSMinorUpdat\selectInventReserveForNegativeWarehouses

So if everything went right, we will be able to get this:

If you think that there is a better way to solve this problem, please send me an email through „Contact” form or leave a comment, I will keep this post updated!

Dodaj komentarz