Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions build/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -7742,6 +7742,50 @@
}
]
},
{
"name": "XML Audit File",

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.

Should we use FR in the app name? Other countries can also have XML Audit File apps?

"groups": [
{
"name": "AllExtensions"
},
{
"name": "Financials"
},
{
"name": "FinancialsExtensions"
},
{
"name": "OnPrem",
"doNotInstall": true
},
{
"name": "OnPremExtensions",
"doNotInstall": true
}
]
},
{
"name": "XML Audit File Tests",
"groups": [
{
"name": "AllExtensions"
},
{
"name": "Financials"
},
{
"name": "FinancialsExtensions"
},
{
"name": "OnPrem",
"doNotInstall": true
},
{
"name": "OnPremExtensions",
"doNotInstall": true
}
]
},
{
"name": "Payment Practices",
"groups": [
Expand Down
26 changes: 26 additions & 0 deletions build/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -5636,6 +5636,32 @@
"ruleSetPathMinorRelease": "$ENV:INETROOT\\App\\Rulesets\\MinorRelease\\app.ruleset.json",
"owningteam": "\\AI Business Solutions\\Finance"
},
"XML Audit File": {
"projectPath": "$env:INETROOT\\App\\Apps\\FR\\XMLAuditFile\\app",
"dvdFolder": "Applications\\XMLAuditFile\\Source",
"hasTranslations": true,
"supportedCountries": [
"FR"
],
"runStaticCodeAnalysis": true,
"logLevel": "warning",
"installOnEnvironmentUpdate": true,
"ruleSetPath": "$ENV:INETROOT\\App\\Rulesets\\app.ruleset.json",
"ruleSetPathMinorRelease": "$ENV:INETROOT\\App\\Rulesets\\MinorRelease\\app.ruleset.json"
},
"XML Audit File Tests": {
"projectPath": "$env:INETROOT\\App\\Apps\\FR\\XMLAuditFile\\test",
"dvdFolder": "Applications\\XMLAuditFile\\Test",
"supportedCountries": [
"FR"
],
"isTest": true,
"runStaticCodeAnalysis": true,
"logLevel": "warning",
"ruleSetPath": "$ENV:INETROOT\\App\\Rulesets\\app.ruleset.json",
"ruleSetPathMinorRelease": "$ENV:INETROOT\\App\\Rulesets\\MinorRelease\\app.ruleset.json",
"owningteam": "\\AI Business Solutions\\Finance"
},
"EU 3-Party Trade Purchase": {
"projectPath": "$env:INETROOT\\App\\Apps\\W1\\EU3PartyTradePurchase\\app",
"dvdFolder": "Applications\\EU3PartyTradePurchase\\Source",
Expand Down
4 changes: 4 additions & 0 deletions src/Apps/FR/FECAuditFile/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
{
"from": 10826,
"to": 10832
},
{
"from": 10879,
"to": 10879
}
],
"resourceExposurePolicy": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enumextension 10826 "Audit File Export Format FEC" extends "Audit File Export Fo
{
Caption = 'FEC';
Implementation = "Audit File Export Data Handling" = "Data Handling FEC",
"Audit File Export Data Check" = "Data Check FEC";
"Audit File Export Data Check" = "Data Check FEC",
"Audit File Export Page Visibility" = "Page Visibility FEC";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,87 +38,38 @@ pageextension 10826 "Audit Export Doc. Card FEC" extends "Audit File Export Doc.
}
}
}

modify(GLAccountMappingCode)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify("Header Comment")
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(Contact)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(ZipFileGeneration)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(SplitByMonth)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(SplitByDate)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(CreateMultipleZipFiles)
modify(AuditFileExportFormat)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(LatestDataCheckDateTime)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
modify(DataCheckStatus)
{
Enabled = not FECFormat;
Visible = not FECFormat;
}
}
actions
{
modify(DataCheck)
{
Enabled = not FECFormat;
Visible = not FECFormat;
trigger OnAfterValidate()
begin
UpdateFECFormat();
CurrPage.Update();
end;
}
}

var
FECFormat: Boolean;

trigger OnOpenPage()
begin
FECFormat := IsFECFormat();
end;

trigger OnAfterGetCurrRecord()
begin
FECFormat := IsFECFormat();
UpdateFECFormat();
end;

local procedure IsFECFormat(): Boolean
local procedure UpdateFECFormat()
var
AuditFileExportSetup: Record "Audit File Export Setup";
AuditFileExportFormat: enum "Audit File Export Format";
IsFECFormatSelected: Boolean;
begin
AuditFileExportFormat := Rec."Audit File Export Format";
if AuditFileExportFormat = 0 then begin // if not initialized yet
if AuditFileExportFormat.AsInteger() = 0 then begin // if not initialized yet
AuditFileExportSetup.Get();
AuditFileExportFormat := AuditFileExportSetup."Audit File Export Format";
end;
IsFECFormatSelected := AuditFileExportFormat = AuditFileExportFormat::FEC;
exit(IsFECFormatSelected);
if Rec."Audit File Export Format" <> AuditFileExportFormat then begin
Rec."Audit File Export Format" := AuditFileExportFormat;
Rec.Modify(true);
end;
FECFormat := AuditFileExportFormat = AuditFileExportFormat::FEC;
end;
}
27 changes: 27 additions & 0 deletions src/Apps/FR/FECAuditFile/app/src/PageVisibilityFEC.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AuditFileExport;

codeunit 10879 "Page Visibility FEC" implements "Audit File Export Page Visibility"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

procedure GetUIVisibility(var FieldVisibility: Dictionary of [Text, Boolean]; var ActionVisibility: Dictionary of [Text, Boolean])
begin
// FEC format hides certain fields and actions from the base page
FieldVisibility.Set('GLAccountMappingCode', false);
FieldVisibility.Set('SplitByMonth', false);
FieldVisibility.Set('SplitByDate', false);
FieldVisibility.Set('HeaderComment', false);
FieldVisibility.Set('Contact', false);
FieldVisibility.Set('ZipFileGeneration', false);
FieldVisibility.Set('CreateMultipleZipFiles', false);
FieldVisibility.Set('LatestDataCheckDateTime', false);
FieldVisibility.Set('DataCheckStatus', false);
ActionVisibility.Set('DataCheck', false);
end;
}
47 changes: 47 additions & 0 deletions src/Apps/FR/XMLAuditFile/app/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id": "6086ffec-252c-43fd-b862-08c689e208c2",
"name": "XML Audit File",
"publisher": "Microsoft",
"version": "$(app_currentVersion)",
"brief": "Export G/L entries to XML via Audit File Export framework.",
"description": "XML export for general ledger entries using the Audit File Export framework.",
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://learn.microsoft.com/en-us/dynamics365/business-central/localfunctionality/france/how-to-export-general-ledger-entries-for-tax-audits",
"contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541",
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"logo": "ExtensionLogo.png",
"dependencies": [
{
"id": "a41b0c3e-bf1c-4c97-ad1b-b430a3933ada",
"name": "Audit File Export",
"publisher": "Microsoft",
"version": "$(app_minimumVersion)"
}
],
"internalsVisibleTo": [
{
"id": "86cb76b5-cdd3-4a37-809c-1c41b8bb7cab",
"name": "XML Audit File Tests",
"publisher": "Microsoft"
}
],
"screenshots": [],
"platform": "$(app_platformVersion)",
"application": "$(app_minimumVersion)",
"idRanges": [
{
"from": 10803,
"to": 10813
}
],
"resourceExposurePolicy": {
"allowDebugging": false,
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
},
"target": "Cloud",
"features": [
"TranslationFile"
]
}
Binary file added src/Apps/FR/XMLAuditFile/app/extensionlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AuditFileExport;

enumextension 10803 "Audit File Export Format XML" extends "Audit File Export Format"
{
value(10803; "GL Entries XML FR")
{
Caption = 'GL Entries XML FR';
Implementation = "Audit File Export Data Handling" = "Data Handling XML",
"Audit File Export Data Check" = "Data Check XML",
"Audit File Export Page Visibility" = "Page Visibility XML";
}
}
36 changes: 36 additions & 0 deletions src/Apps/FR/XMLAuditFile/app/src/DataCheckXML.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AuditFileExport;

using Microsoft.CRM.Contact;
using Microsoft.Foundation.Company;

codeunit 10805 "Data Check XML" implements "Audit File Export Data Check"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

procedure CheckDataToExport(var AuditFileExportHeader: Record "Audit File Export Header"): Enum "Audit Data Check Status"
var
Contact: Record Contact;
begin
Contact.Get(AuditFileExportHeader.Contact);
Contact.TestField(Address);
end;

procedure CheckAuditDocReadyToExport(var AuditFileExportHeader: Record "Audit File Export Header"): Enum "Audit Data Check Status"
var
CompanyInformation: Record "Company Information";
begin
AuditFileExportHeader.TestField("Starting Date");
AuditFileExportHeader.TestField("Ending Date");

CompanyInformation.Get();
CompanyInformation.TestField("Registration No.");

exit("Audit Data Check Status"::Passed);
end;
}
49 changes: 49 additions & 0 deletions src/Apps/FR/XMLAuditFile/app/src/DataHandlingXML.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Finance.AuditFileExport;

using System.Utilities;

codeunit 10806 "Data Handling XML" implements "Audit File Export Data Handling"
{
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

var
GLEntriesXMLLbl: Label 'G/L Entries XML';

procedure GenerateFileContentForAuditFileExportLine(var AuditFileExportLine: Record "Audit File Export Line"; var TempBlob: Codeunit "Temp Blob")
var
GenerateFileXML: Codeunit "Generate File XML";
begin
GenerateFileXML.GenerateXMLFile(AuditFileExportLine, TempBlob);
end;

procedure LoadStandardAccounts(StandardAccountType: Enum "Standard Account Type") Result: Boolean;
begin
end;

procedure CreateAuditFileExportLines(var Header: Record "Audit File Export Header")
var
AuditFileExportLine: Record "Audit File Export Line";
AuditFileExportMgt: Codeunit "Audit File Export Mgt.";
LineNo: Integer;
begin
AuditFileExportLine.SetRange(ID, Header.ID);
AuditFileExportLine.DeleteAll(true);

AuditFileExportMgt.InsertAuditFileExportLine(AuditFileExportLine, LineNo, Header.ID, "Audit File Export Data Class"::Custom, GLEntriesXMLLbl, Header."Starting Date", Header."Ending Date");
end;

procedure GetFileNameForAuditFileExportLine(var AuditFileExportLine: Record "Audit File Export Line"): Text[1024]
begin
exit('GLEntries_' + Format(AuditFileExportLine."Ending Date") + '.xml');
end;

procedure InitAuditExportDataTypeSetup();
begin
end;
}
Loading
Loading