[Bug]: xRechnung/ZUGFeRD export missing TaxExemptionReason and unsupported VATEX codes#29904
Open
miljance wants to merge 3 commits intomicrosoft:mainfrom
Open
[Bug]: xRechnung/ZUGFeRD export missing TaxExemptionReason and unsupported VATEX codes#29904miljance wants to merge 3 commits intomicrosoft:mainfrom
miljance wants to merge 3 commits intomicrosoft:mainfrom
Conversation
… rule fixes **VATEX Implementation:** - Export dynamic VATEX code and tax exemption reason from VAT Posting Setup - Support 'Not Subject to VAT' (Category O) via VAT Clause integration - Added comprehensive test coverage for XRechnung and ZUGFeRD with all VATEX codes **EN16931 & BR-DE Compliance Fixes:** - BR-O-02: Skip Seller/Buyer VAT ID only when ALL invoice lines are category 'O' (fixed critical bug: previously skipped if ANY line was 'O', breaking mixed invoices) - BR-O-05: Remove tax percent from line-level 'O' category elements - BR-DE-14: Always include tax percent at document level **Code Architecture:** - Split tax category insertion into line-level and document-level procedures - Separated AllowanceCharge handling by context (6-param line-level, 11-param document-level) - Thread document language code to GetVATClauseInfo for localized exemption descriptions **Files Changed:** - XRechnung: Export logic refactored for UBL compliance - ZUGFeRD: CII format aligned with EN16931 requirements - Tests: Added VATEX scenarios for all supported exemption categories
Contributor
Author
|
@pri-kise Could you take a look please? |
Contributor
|
@miljance, could you resolve the merge conflict? |
pri-kise
reviewed
Apr 8, 2026
…nto EDocVATEXCodes # Conflicts: # Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al
pri-kise
suggested changes
Apr 8, 2026
Apps/DE/EDocumentDE/app/src/XRechnung/ExportXRechnungDocument.Codeunit.al
Outdated
Show resolved
Hide resolved
…nto helper procedure Replace hardcoded comparisons to 'O' (Not Subject to VAT) with a named helper procedure for better maintainability and code clarity. - Add IsTaxCategoryNotSubjectToVAT() helper procedure - Update InsertClassifiedTaxCategory to use the helper - Update both DetectNotSubjectToVATLines overloads to use the helper - Centralizes the 'O' value in one location for easier future maintenance
pri-kise
approved these changes
Apr 8, 2026
Contributor
|
Processing this PR. The branch is now locked 🔒 Please don't push updates unless otherwise agreed. |
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
E-Document for Germany - XRechnung/ZUGFeRD VATEX compliance and BR-DE rule fixes
VATEX Implementation:
EN16931 & BR-DE Compliance Fixes:
Code Architecture:
Files Changed:
Work Item(s)
Fixes #29863
Fixes AB#630660