Skip to content

E-Document PO matching improvements#7021

Merged
mynjj merged 4 commits into
mainfrom
bugs/pomatching-bugs
Mar 10, 2026
Merged

E-Document PO matching improvements#7021
mynjj merged 4 commits into
mainfrom
bugs/pomatching-bugs

Conversation

@mynjj
Copy link
Copy Markdown
Contributor

@mynjj mynjj commented Mar 6, 2026

  • Fix PO match warning severity display and refactor into dedicated procedure
  • Add missing UoM validation check during invoice finalization
  • Fix finalization to block on correct warning types
  • Improve warning messages and formatting

Fixes AB#621954

@mynjj mynjj requested a review from a team as a code owner March 6, 2026 13:30
@mynjj mynjj requested a review from a team March 6, 2026 13:30
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Mar 6, 2026
@mynjj mynjj requested a review from Groenbech96 March 6, 2026 13:31
@github-actions github-actions Bot added this to the Version 29.0 milestone Mar 6, 2026
@Groenbech96 Groenbech96 requested review from Copilot and removed request for a team and Groenbech96 March 6, 2026 14:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors E-Document purchase order matching warnings to replace the coarse-grained QuantityMismatch and NotYetReceived warning types with more specific, granular warning types: ExceedsInvoiceableQty, ExceedsRemainingToInvoice, and OverReceipt. It also improves the UI presentation by adding severity-based styling, a drill-down detail view, and a warning message field. Additionally, it adds a missing UoM validation check during invoice finalization.

Changes:

  • Replaced QuantityMismatch/NotYetReceived warnings with three new granular warning types (ExceedsInvoiceableQty, ExceedsRemainingToInvoice, OverReceipt) with computed warning messages stored in a new "Warning Message" field on the table
  • Refactored the draft subform page to display warnings with severity-based styling (Unfavorable/Ambiguous/Subordinate) and added a drill-down to show detailed warning messages
  • Added a MissingInformationForMatch check during invoice finalization to block creation when UoM information is missing

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
EDocPOMatchWarning.Enum.al Added three new enum values: ExceedsInvoiceableQty, ExceedsRemainingToInvoice, OverReceipt
EDocPOMatchWarning.Table.al Added "Warning Message" Text[250] field to store computed warning details
EDocPOMatching.Codeunit.al Replaced old warning logic with new granular quantity checks (I vs R, I vs J) and updated finalization/validation references
EDocPurchaseDraftSubform.Page.al Extracted UpdateMatchWarnings and ShowMatchWarningDetails procedures; added severity-based styling and drill-down
EDocCreatePurchaseInvoice.Codeunit.al Updated finalization to check ExceedsInvoiceableQty and added MissingInformationForMatch blocking check
EDocPOMatchingUnitTests.Codeunit.al Expanded tests from 2 to 5 quantity warning scenarios, updated all references to new warning types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Groenbech96
Groenbech96 previously approved these changes Mar 7, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mynjj mynjj enabled auto-merge (squash) March 10, 2026 10:59
@mynjj mynjj merged commit 9ece32b into main Mar 10, 2026
37 checks passed
@mynjj mynjj deleted the bugs/pomatching-bugs branch March 10, 2026 10:59
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.

5 participants