Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support Teams Worldwide

How to utilize the Last Match Status field for Vendor Invoices to automatically approve Vendor Invoices tied to Purchase Orders involving Charges

I have recently worked with customers whom leverage Workflow for Vendor Invoices so that when a Vendor invoice is received and entered into Dynamics AX, the Vendor Invoice needs to be routed through a Workflow process before it can be posted. This customer also utilized Three-way matching for Vendor Invoices against Product Receipts. However, some of their Suppliers\Vendors would apply Freight Charges on the Vendor Invoice which would not be present on the Product Receipt when the Inventory was received. This created a problematic scenario in their Vendor Invoice Workflow as when the Miscellaneous Charge was applied to the Vendor Invoice and the Vendor Invoice was submitted, this would require a Manual approval of the Vendor invoice instead of the Vendor invoice being automatically approved by the Workflow engine. This was problematic for the customer as there really isn’t a variance between the Product Receipt and the Vendor Invoice, as the only variance\difference was seemingly the Freight Charge that would be present on the Vendor Invoice.

So the customer’s business requirement would be to have Vendor Invoices automatically approved\posted when the only difference between the Purchase Order Product Receipt (When the Inventory was Received) and the Vendor Invoice were Freight Charges applicable on the Vendor Invoice. To accomplish this scenario, we applied an Automatic Approval Condition on the Vendor Invoice.Last Match Status field so that when a Freight Charge was applicable on the Vendor Invoice, the submitted Vendor Invoice would be automatically approved and posted via the Workflow engine WITHOUT requiring manual user invention. The following steps below provide an example for how you can use an Automatic approval condition on the Vendor invoice.Last Match Status field so that Vendor Invoices captured with Freight Charges can still be automatically approved\posted by the Workflow Engine without requiring manual user intervention. Hopefully, this provides an example for how this business requirement can be accomplished for other customers!

 

1. Login to CEU.

2.  Configure AP matching parameters by taking the following steps:

  • Go to Accounts payable | Setup | Accounts payable parameters.
  • In the Accounts payable parameters form, click the Invoice validation tab.
  • Enter the following on the Invoice validation tab:

Enable invoice matching validation = mark this

Post invoice with discrepancies = Allow with warning

Automatically update invoice header status = mark this

Match invoice totals = mark this

Display invoice totals match icon = If greater than tolerance

Invoice totals tolerance percentage = 0.00

Line matching policy = Three-way matching

Allow matching policy override = Higher than company policy

Display unit price match icon = If greater than tolerance

Match price totals = Percentage

Purchase price total tolerance percent = 5.00

Display price total match icon = If greater than tolerance

Match charges = unmark this

work1

  • Close the Accounts payable parameters form.

NOTE:  Notice that I do not have the ‘Match charges’ option enabled in Accounts payable parameters.

3.  Create a Workflow for Vendor invoices with an automatic action on the Last match status value by taking the following steps:

  • Go to Accounts payable | Setup | Accounts payable workflows.
  • From the Accounts payable workflows list page, click New | New.
  • In the Create workflow form, click the Vendor invoice workflow option, and then click the Create workflow button.

work2

  • In the Vendor invoice workflow form, drag the Review vendor invoice task onto the Canvas.

work3

  • In the Vendor invoice workflow form, drag the Post vendor invoices Automated tasks to the Canvas area underneath the Review vendor invoices task.

work4

  •  Connect the Start node to the Review vendor invoices node, connect the Review vendor invoices node to the Post vendor invoices node, and connect the Post vendor invoices node to the End node.

work5

  • Right-click on the Review vendor invoices node, and then click Properties.
  • In the Review vendor invoice 1 form, enter ‘test’ in the Work item subject and Work item instructions areas.

work6

  • In the Review vendor invoice 1 form, click the Assignment tab, and select ‘User’ on the Assignment type tab.

work7

  • Click the User tab, and select the Admin user so that it appears in the Selected users area.

work8

  • Click the Time limit tab, and enter the following:

Duration = Days

Days = 1

Calendar name = Non-calendar

Days available per week = mark all checkboxes.

work9

  • Click the Automatic actions tab, and mark the ‘Enable automatic actions’ checkbox.

work10

  • Enter the following condition:

Where Vendor invoices.Last match status is OK

Auto complete action = Complete

work11

  • Click Close out of the Review vendor invoice 1 form.
  • Back in the Vendor invoice workflow form, click the Save and close button.

work12

  • In the Save workflow form, enter a Comment, and then click OK.

work13

  • In the Do you want to activate the workflow pop-up form, select ‘Activate the new version’, and then click OK.

work14

 

NOTE:  In the Vendor Invoice Workflow that I’ve defined above, I have the Approver just going to myself for example Purposes. (The Admin User) I configured the Vendor Invoice Workflow in this manner for example purposes only. Obviously in a real-life environment, you would have a different Workflow configuration with different nodes\tiers involved. The point here was to configure, as an example, a simple Workflow Configuration with the Automatic approval condition on the Vendor Invoice.Last Match Status field.

4.  Create a PO by taking the following steps:

  • Go to Accounts payable | Common | Purchase orders | All purchase orders.
  • From the All purchase orders list page, click New | Purchase order.
  • In the Create purchase order form, select ‘1001’ from the Vendor account drop-down field.
  • Expand the General fast tab, and select ‘1’ in the Site field and ‘11’ in the Warehouse field.
  • Click OK out of the Create purchase order form.

work15

  • In the Purchase order form, enter the following line:

Item number = 10000

Size = 01

Site = 1

Warehouse = 11

Quantity = 100.00

Unit = Pcs

Unit price = 17.50

work16

  • At the top of the Purchase order form, click the Purchase tab, and then click Generate | Confirm.

5.  Enter a Product receipt for the Purchase order by taking the following steps:

  • In the Purchase order form, click the Receive tab at the top, and then click Generate | Product receipt.

work17

  • In the Posting product receipt form, select ‘Ordered quantity’ from the Quantity drop-down field, enter ‘TESTPR’ in the Product receipt field, and then click OK.

NOTE: The scenario now is that we have received the invoice for this PO from the vendor, and there is a Freight Charge of $100.00 on the Vendor invoice. We did not know about the $100.00 Freight Charge at the time that the Product Receipt capturing the receipt of Inventory into the Warehouse. As a result o this, the $100.00 Freight Charge is applied at the time that the Vendor Invoice is received.

6.  Enter a Vendor Invoice for the PO and apply a $100.00 miscellaneous charge to the vendor invoice by taking the following steps:

  • While still in the Purchase order form, click the Invoice tab, and then click Generate | Invoice.
  • In the Vendor invoice form, select ‘Ordered quantity’ from the Product receipt quantity field.
  • In the Number and Invoice description fields, enter ‘test1’.

work19

  • Save the Vendor invoice.
  • Click on the Vendor invoice line, and then click Financials | Maintain charges.
  • In the Charges transactions form, enter the following:

Charges code = 01

Category = Fixed

Charges value = 100.00

work20

  • Close the Charges transactions form.
  • Back in the Vendor invoice form, right-click anywhere in the Form, and click Personalize.
  • In the Personalization form, click the Add fields button.

work21

NOTE:  In the next few steps below, I am merely showing you how to Personalize the Vendor Invoice form so that you can see the Vendor Invoice.Last Match Status field being populated for which your Automatic Approval condition is triggered.

  • In the Select fields, select the Vendor invoices.Last match status field, and then click the Add button.

work22

  • Close the Select fields form.
  • Close the Personalization form.
  • In the Vendor invoice form, notice that the Last match status field says ‘OK’.

work23

NOTE: Because the Last match status says ‘Ok’, when I submit this invoice through approval, the automatic action will be completed and the Invoice will be approved\posted WITHOUT manual invoice approval.

7.  Submit the invoice through approval and verify that it automatically approves\posts by taking the following steps:

  • In the Vendor invoice form, click the Submit button, enter a Comment, and then click Submit.

work24

NOTE:  In a Standard environment, it’s not necessary to Start the Tutorial_WorkflowProcessor as you’d have a Batch Job that will trigger the Workflow engine ‘behind the scenes’. I’m merely starting the Tutorial_WorkflowProcessor in my environment to expedite the Workflow engine.

  • Click Control-D to open a Development workspace.
  • Login to the Development workspace.
  • Open the AOT, and expand Forms.
  • Right-click on the Tutorial_WorkflowProcessor form, and click Open.
  • In the Demo form, click the Start button.

work25

At this point in time, the Workflow engine is going to automatically approve and post the Vendor invoice because the Last Match Status field was flagged as ‘OK’ and the Automatic condition on that field sends the Vendor invoice down an automatic approval route. As a result of this, there will be no further manual intervention necessary in order to approve and post the vendor invoice.