Skip to content

[FR E-Reporting] Implement and send invoice lifecycle messages - #10374

Closed
Milica Đukić (djukicmilica) wants to merge 87 commits into
mainfrom
feature/fr-edocument-lifecycle-messages
Closed

[FR E-Reporting] Implement and send invoice lifecycle messages#10374
Milica Đukić (djukicmilica) wants to merge 87 commits into
mainfrom
feature/fr-edocument-lifecycle-messages

Conversation

@djukicmilica

@djukicmilica Milica Đukić (djukicmilica) commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Why

French e-reporting requires payment applications and reversals for accepted e-invoices to be captured as lifecycle occurrences and reported through the invoice's approved French service. The application needs end-to-end lifecycle processing, from immutable payment and VAT data through message creation, delivery, failure handling, and retry.

Summary

  • Added immutable French invoice lifecycle and VAT records for collected payments and reversals linked to e-documents and customer ledger entries.
  • Captured payment applications and unapplications automatically and allocated reported amounts across the invoice VAT rates.
  • Built French CrossDomainAcknowledgementAndResponse lifecycle XML, including PPF context and regulatory identities when configured.
  • Added synchronous outgoing E-Document message sending with payload, integration, and returned-status validation.
  • Persisted deterministic French service routing and rejected nonaccepted or ambiguous service selections.
  • Updated background processing to create and send lifecycle messages, track failures and Message Sent, and retry without creating duplicate messages.
  • Added lifecycle pages, service configuration, permissions, telemetry, and focused automated coverage.

Fixes
AB#637593

@djukicmilica
Milica Đukić (djukicmilica) requested a review from a team as a code owner August 19, 2026 09:15
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Team: Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Aug 19, 2026
@djukicmilica Milica Đukić (djukicmilica) changed the title [FR E-Reporting] Send invoice lifecycle messages [FR E-Reporting] Implement and send invoice lifecycle messages Aug 19, 2026
@djukicmilica
Milica Đukić (djukicmilica) changed the base branch from bugs/master_442216_Payments to main August 19, 2026 10:37
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 19, 2026
{
addlast(Processing)
{
action(ViewFREInvoiceLifecycles)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$\textbf{🟠\ High\ Severity\ —\ AppSource}$

This pageextension relies on the app's namespace for owned objects, but the new action identifier ViewFREInvoiceLifecycles is added to the base E-Documents page without the member affix pattern used elsewhere in this app's extension members. A namespace does not exempt pageextension actions from AppSource member-affix requirements.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟠\ High\ Severity\ —\ Error\ Handling}$

CheckSIRENNotEmpty, CheckSIRETNotEmpty, and CheckSellerCountryCode raise dead-end plain Error calls for recoverable setup problems even though the only fix is on Company Information. Use ErrorInfo with PageNo = Page::"Company Information", RecordId, and an AddNavigationAction so the user can jump straight to the missing setup instead of being blocked by a non-actionable dialog.

Knowledge:

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

{
fields
{
field(10970; "FR Sender Platform ID"; Text[50])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$\textbf{🟠\ High\ Severity\ —\ Privacy}$

The new FR Sender Platform ID and FR Sender Platform Name table-extension fields are classified as SystemMetadata, even though they store the approved platform's identifier and name. That under-classifies organization-identifying tenant data, so telemetry, GDPR exports, and admin reports will treat it as system metadata.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

begin
// [FEATURE] [AI test]
// [SCENARIO] A payment application is captured as an immutable Collected lifecycle occurrence
Initialize();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$\textbf{🟠\ High\ Severity\ —\ Testing}$

Most of this new test codeunit calls Initialize(), and that helper unconditionally executes Commit() after writing setup data. Methods such as CaptureCollectedOccurrenceCreatesCapturedLifecycle therefore run the commit path under the default AutoRollback transaction model, which can fail with an infrastructure Commit error instead of producing the intended test verdict. These tests need AutoCommit (with an isolated runner) or the committing setup must be reworked so non-AutoCommit tests do not execute Commit().

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4

@djukicmilica

Copy link
Copy Markdown
Contributor Author

Superseded by #10437, which is now the authoritative implementation for AB#637593.

The replacement uses a smaller, normalized E-Document message model, generic payment occurrences, queued delivery, and focused payment/buyer lifecycle coverage. Continuing review in #10437 avoids carrying forward this PR's long and conflicting commit history.

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 Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants