[Bug]: Add "VATEX Code" field to VAT Clause table in E-Document Core to support BT-121 (TaxExemptionReasonCode) export#7580
Open
miljance wants to merge 4 commits intomicrosoft:mainfrom
Open
Conversation
Add table extension and page extension to expose a 'VATEX Code' (Code[30]) field on the VAT Clause table and VAT Clauses page. This allows users to configure tax exemption reason codes (BT-121) per VAT clause, enabling PEPPOL BIS 3.0 TaxExemptionReasonCode export from the CEF VATEX code list (e.g. VATEX-EU-AE, VATEX-EU-G). Add E-Document VAT Helper codeunit with GetVATClauseInfo procedure that resolves VAT Bus./Prod. Posting Group to VATEX Code and VAT Clause Description. This shared helper can be used by all e-document format implementations. Includes unit tests for the helper.
Contributor
Author
|
@pri-kise Could you take a look please? |
pri-kise
suggested changes
Apr 8, 2026
src/Apps/W1/EDocument/App/src/Extensions/EDocVATClauses.PageExt.al
Outdated
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Extensions/EDocVATClauses.PageExt.al
Outdated
Show resolved
Hide resolved
- Move ToolTip from page extension to table field definition - Change addafter(Code) to addlast(group) on VAT Clauses page extension - Add XML documentation to GetVATClauseInfo public procedure - Add test for translation scenario verifying translated description is returned
pri-kise
approved these changes
Apr 8, 2026
- Add codeunit 5379 'Create E-Doc. VAT Clause Data' that sets VATEX Code 'VATEX-EU-O' on the existing NO VAT clause created by Contoso Coffee - Wire into E-Document Contoso Module CreateSetupData phase
pri-kise
suggested changes
Apr 8, 2026
src/Apps/W1/EDocument/Demo Data/1.Setup Data/CreateEDocVATClauseData.Codeunit.al
Outdated
Show resolved
Hide resolved
pri-kise
approved these changes
Apr 8, 2026
Groenbech96
reviewed
Apr 10, 2026
| /// <param name="LanguageCode">The language code for VAT Clause description translation. Empty for default.</param> | ||
| /// <param name="VATEXCode">Return value: the VATEX exemption reason code from the VAT Clause.</param> | ||
| /// <param name="VATClauseDescription">Return value: the VAT Clause description, translated if available.</param> | ||
| procedure GetVATClauseInfo(VATBusPostingGroup: Code[20]; VATProductPostingGroup: Code[20]; LanguageCode: Code[10]; var VATEXCode: Text; var VATClauseDescription: Text) |
Contributor
There was a problem hiding this comment.
Could we move this to the PEPPOL 1P app?
Since it seems related to that BT-121.
Contributor
Author
There was a problem hiding this comment.
Makes sense, will do, thanks for checking out.
Contributor
Author
There was a problem hiding this comment.
@Groenbech96 Wait, question: The PEPPOL app came with BC28.0. Is that correct? That means that the VATX Codes can be made possible with BC28.0 but not with BC27.0? I hope this will suffice.
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.
Summary
Add VATEX Code field and VAT Helper for BT-121 support
Add table extension and page extension to expose a 'VATEX Code' (Code[30]) field on the VAT Clause table and VAT Clauses page. This allows users to configure tax exemption reason codes (BT-121) per VAT clause, enabling PEPPOL BIS 3.0 TaxExemptionReasonCode export from the CEF VATEX code list (e.g. VATEX-EU-AE, VATEX-EU-G).
Add E-Document VAT Helper codeunit with GetVATClauseInfo procedure that resolves VAT Bus./Prod. Posting Group to VATEX Code and VAT Clause Description. This shared helper can be used by all e-document format implementations.
Includes unit tests for the helper.
Work Item(s)
Fixes #7545