Skip to content

[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
miljance:EDocVATEXCodes
Open

[Bug]: Add "VATEX Code" field to VAT Clause table in E-Document Core to support BT-121 (TaxExemptionReasonCode) export#7580
miljance wants to merge 4 commits intomicrosoft:mainfrom
miljance:EDocVATEXCodes

Conversation

@miljance
Copy link
Copy Markdown
Contributor

@miljance miljance commented Apr 8, 2026

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

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.
@miljance miljance requested review from a team as code owners April 8, 2026 09:24
@github-actions github-actions bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Apr 8, 2026
@miljance
Copy link
Copy Markdown
Contributor Author

miljance commented Apr 8, 2026

@pri-kise Could you take a look please?

- 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
- 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
/// <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)
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.

Could we move this to the PEPPOL 1P app?
Since it seems related to that BT-121.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, will do, thanks for checking out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@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.

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 From Fork Pull request is coming from a fork

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Add "VATEX Code" field to VAT Clause table in E-Document Core to support BT-121 (TaxExemptionReasonCode) export

3 participants