Fix AL0296 errors in DK Clean build: add VAT return reporting frequency support#9658
Closed
djukicmilica with Copilot wants to merge 2 commits into
Closed
Fix AL0296 errors in DK Clean build: add VAT return reporting frequency support#9658djukicmilica with Copilot wants to merge 2 commits into
djukicmilica with Copilot wants to merge 2 commits into
Conversation
…ng frequency feature
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Build Apps DK (Clean)
Fix AL0296 errors in DK Clean build: add VAT return reporting frequency support
Jul 22, 2026
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.
The "Build Apps DK (Clean)" CI job was failing with 8 AL0296 errors because the
Electronic VAT Declaration for Denmark Testsapp declared"target": "Cloud"while its new tests called[Scope('OnPrem')]Azure Key Vault mock methods.Root cause
test/app.jsonhad"target": "Cloud", blocking use ofInitMockAzureKeyvaultSecretProvider,UseAzureKeyvaultSecretProvider, andAddMockAzureKeyvaultSecretProviderMapping— all[Scope('OnPrem')]— even from test procedures individually marked[Scope('OnPrem')].Changes
test/app.json—"target": "Cloud"→"target": "OnPrem"(the fix)app/app.json— addedinternalsVisibleToentry for the test appElecVATDeclRepFrequency.Enum.al(new) —Monthly,Quarterly,Semi-Annualenum valuesElecVATDeclAzKeyVault.Codeunit.al— addedIsReportingFrequencyEnabled()readingDKElecVAT-ReportingFrequencyEnabledfrom AKV; defaults totruewhen secret is missing or unparseableElecVATDeclGetPeriods.Codeunit.al— refactored to dispatch between frequency-aware (GetFrequencyAwareVATReturnPeriods) and legacy quarterly-only (GetQuarterlyVATReturnPeriods) paths; addedCalcPeriodEndDate/CalcPeriodStartDate/GetReportingFrequency; overlap detection on insertElecVATDeclXml.Codeunit.al— addedTryGetPeriodNodesFromResponseText,TryGetDueDateNodeFromPeriodNode,TryGetFrequencyNodeFromPeriodNodefor period-level XML traversalElecVATDeclTests.Codeunit.al— replaced placeholder with tests covering period date math, frequency-aware parsing, duplicate prevention, overlap detection, and AKV flag evaluation