Sunday 27 May 2018

Post purchase confirmation journal with ordered quantity excluding canceled line.

I got a business requirement to post only ordered line quantity and the canceled line shouldn't be come into confirmation journal.

However, you can cancel the total quantity or any remaining quantity on an order, provided that the quantity hasn’t been received or invoiced.

The problem here is, the purchase confirmation journal doesn't inserts record into purchparmline table and the posted/confirmed purchase lines are displayed using the view PurchLineArchivedVersions.

At the time of posting the purchase order confirmation, we can restrict the canceled line by adding a condition purchLine.purchStatus != PurchStatus::Canceled to query when selecting the lines for confirmation journal posting. This condition skips processing the canceled lines on confirmation posting.

Also, the line needs to skipped while processing the total amount of the purchase order confirmation.
PurchTotals_Trans is the exact class where the query needs to added to skip the canceled line on calculating the total amount.










Also, setting up range on the query used on views PurchLineArchivedVersions hides the canceled line after the confirmation posted.








2 comments:

  1. Hey, thanks for the valuable tips - this is very useful. I use software axapta from AX Dynamics for my activities in the company. I also recommend to try ;)

    ReplyDelete
  2. Algo trading is the new popular trading mechanism in the Indian stock market for Algo trading profits.

    ReplyDelete

Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO

There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...