web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Retail statement Calculation didn't consider automatic reservation for batch tracking items

(0) ShareShare
ReportReport
Posted on by 1,165

in AX 2012 R2 for retail, if items are defined with the tracking dimension batch and sold on POS. At statement calculation an error is thrown that the batch number must be specified.

VERSION

============

AX 2012 R2

Kernel Version: 6.2.1000.4051

Application Version: 6.2.1000.4051

how can i setup system to automatically reserve batches according to system rules (like FEFO)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ibrahim Salah Mohamed Profile Picture
    1,165 on at
    RE: Retail statement Calculation didn't consider automatic reservation for batch tracking items

    the dimension batch is not supported by AX Retail. As you cannot enter batch numbers on POS you will run into this error at statement calculation and posting, unless you allow empty issue and receipts for batch.

    To avoid the error message at statement calculation there is code update to system classes can solve the issue:

    This condition for batch number is checked in method \Classes\RetailTransactionSalesTransMark\reserveInventory

    There is revoked method inventMovement.checkDimPhysical

    // Check if all required product dimensions are set, if not abort the inventory reservation process.

       if (

           !inventMovement.checkDimPhysical(rboTransactionSalesTrans.qty,

                                           InventDim::find(rboTransactionSalesTrans.inventDimId),

                                           true)

       )

       {

           ttsAbort;

           throw error("@SYS18447");

       }


    In the code suggestion we have created a new method \Classes\InventMovement\checkDimPhysical_NoBatch similar to method \Classes\InventMovement\checkDimPhysical.

     

    We changed only one condition in this new method to avoid checking Dimension = Batch number

    …

    while (enumerator.moveNext())

        {

            inventDimGroupFieldSetup = enumerator.current();

            inventDimFieldId = inventDimGroupFieldSetup.dimFieldId();

     

            okTmp = true;

     

            if ((_specificDimensionsToCheck == null || _specificDimensionsToCheck.in(inventDimFieldId)) && (inventDimFieldId != 2))

    …

     

     

    And we used this new method in \Classes\RetailTransactionSalesTransMark\reserveInventory

    …

        // Check if all required product dimensions are set, if not abort the inventory reservation process.

        if (

            !inventMovement.checkDimPhysical_NoBatch(rboTransactionSalesTrans.qty,

                                            InventDim::find(rboTransactionSalesTrans.inventDimId),

                                            true)

        )

        {

            ttsAbort;

            throw error("@SYS18447");

        }

    Please test it very thoroughly because it is not official fix but only code suggestion.

    I have attached to this email 2 modified classes for comparison.

     

    Disclaimer:

    "Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This mail message assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures."

     


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans