Skip to content

Conversation

@mynjj
Copy link
Contributor

@mynjj mynjj commented Oct 27, 2025

Summary

Implementation of configuration settings for what to do when getting a new invoice and the underlying matched order has not yet been marked as received. There are 5 different configurations a user can select, found in EDocPOMConfiguration.Enum.al:

  • "Always ask"
  • "Always receive at posting"
  • "Never receive at posting"
  • "Receive at posting only for certain vendors"
  • "Receive at posting except for certain vendors"

Each of these affect the process of processing an invoice in the following ways:

  • When first trying to match
  • When deciding whether or not we should warn the user
  • When finalizing to create the final invoice.

Additionally an orthogonal setting to allow for receiving lines when they are of type G/L Account is also considered.

How the new settings affect the PO matching process

When first trying to match

When trying to match, we will prevent the match with an error if:

  • The configuration is set to "Never receive"
  • The configuration is set to "Receive at posting except for certain vendors", and the vendor of the invoice is selected

This happens in the procedure MatchPOLinesToEDocumentLine.

When deciding whether or not we should warn the user

We want to warn the user if the order has not been received only when the configuration is set to:

  • Always ask
  • Never receive
  • Receive at posting only for certain vendors (and one of the non-specified vendors is selected for this invoice)
  • Receive at posting except for certain vendors (and one of the specified vendors is selected for this invoice)

The logic for this is in the procedure AppendPOMatchWarnings.

When finalizing to create the final invoice

We want to ask the user if they want to continue in the following cases:

  • Configuration set to "Always ask"
  • Configuration set to "Receive at posting only for certain vendors" and the vendor of the invoice is not one of the configured vendors.

We want to error out in the following cases:

  • Configuration set to "Never receive"
  • Configuration set to "Receive at posting except for certain vendors" and one of the selected vendors is the vendor of the invoice

For the rest of the scenarios, we allow finalizing without user confirmation.

This happens in EDocCreatePurchaseInvoice.Codeunit.al.

image

Work Item(s)

Fixes AB#599135

Joshua Martínez Pineda added 3 commits October 26, 2025 13:10
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Oct 27, 2025
@github-actions github-actions bot added this to the Version 28.0 milestone Oct 27, 2025
@mynjj mynjj marked this pull request as ready for review October 27, 2025 13:29
@mynjj mynjj requested a review from a team as a code owner October 27, 2025 13:29
@mynjj mynjj requested review from a team, Groenbech96, Jose-agg and ventselartur October 27, 2025 13:31
Copy link
Contributor

@Groenbech96 Groenbech96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link

@Jose-agg Jose-agg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

@Jose-agg Jose-agg self-requested a review October 30, 2025 12:33
Copy link

@Jose-agg Jose-agg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

@mynjj mynjj merged commit 2176269 into main Oct 30, 2025
122 of 127 checks passed
@mynjj mynjj deleted the features/pa-ordermatch-config branch October 30, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants