[Master]-Payment Reference from Purchase Order Prepayment Invoice is not Transferred to Vendor Ledger Entries. - #10061
Draft
neeleshsinghal wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures Payment Reference set on a Purchase Order is carried through prepayment invoice posting into the resulting Vendor Ledger Entry, aligning prepayment posting behavior with existing purchase posting behavior.
Changes:
- Updated
Gen. Journal Line.CopyFromPurchHeaderPrepmtPost()to populate"Payment Reference"from"Purchase Header"(with fallback to"Vendor Invoice No."whenPurchases & Payables Setup."Copy Inv. No. To Pmt. Ref."is enabled). - Added new test
PaymentReferenceTransferredToVLEOnPurchasePrepaymentInvoice()(W1 + APAC) to validate the end-to-end transfer into"Vendor Ledger Entry".
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Layers/W1/Tests/Prepayment/ERMPurchasePrepayments.Codeunit.al | Adds a regression test verifying Payment Reference transfer on prepayment invoice posting. |
| src/Layers/APAC/Tests/Prepayment/ERMPurchasePrepayments.Codeunit.al | Mirrors the new regression test for APAC layer. |
| src/Layers/W1/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Copies Payment Reference during purchase prepayment posting journal line creation. |
| src/Layers/SE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for SE layer. |
| src/Layers/RU/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for RU layer. |
| src/Layers/NO/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for NO layer. |
| src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for NL layer. |
| src/Layers/NA/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for NA layer. |
| src/Layers/IT/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for IT layer. |
| src/Layers/GB/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for GB layer. |
| src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for FR layer. |
| src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for FI layer. |
| src/Layers/ES/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Adds Payment Reference copy logic for ES layer (but currently drops Recipient Bank Account assignment; see comment). |
| src/Layers/DACH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for DACH layer. |
| src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for CH layer. |
| src/Layers/BE/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for BE layer. |
| src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJournalLine.Table.al | Same Payment Reference copy logic for APAC layer. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
7454
to
+7458
| "Payment Method Code" := PurchHeader."Payment Method Code"; | ||
| "Recipient Bank Account" := PurchHeader."Vendor Bank Acc. Code"; | ||
| if PurchHeader."Payment Reference" <> '' then | ||
| "Payment Reference" := PurchHeader."Payment Reference" | ||
| else begin | ||
| PurchasesPayablesSetup.Get(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes AB#646227