Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.49455.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/29.0.49708.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "29.0",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions Apps/FR/EDocument_FR/EReportingFR/app/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id": "44469049-4bb4-4a32-82ab-f6c34d0204d3",
"name": "E-Reporting FR",
"publisher": "Microsoft",
"brief": "The E-Reporting extension makes it easy to export the transactions in the format that the tax authorities in France require.",
"description": "The E-Reporting extension makes it easy to export the transactions in the format that the tax authorities in France require. This is currently mandated for: sales to individuals (B2C), cross-border business-to-business transactions, exports outside the EU, intra-community deliveries and acquisitions and transactions involving French overseas territories.",
"version": "29.0.0.0",
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://go.microsoft.com/fwlink/?linkid=2204541",
"url": "https://go.microsoft.com/fwlink/?LinkId=724011",
"logo": "ExtensionLogo.png",
"contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2204541",
"dependencies": [
{
"id": "e1d97edc-c239-46b4-8d84-6368bdf67c8b",
"name": "E-Document Core",
"publisher": "Microsoft",
"version": "29.0.0.0"
}
],
"screenshots": [],
"platform": "29.0.0.0",
"idRanges": [
{
"from": 10970,
"to": 10975
}
],
"resourceExposurePolicy": {
"allowDebugging": true,
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"application": "29.0.0.0",
"internalsVisibleTo": [
{
"id": "9b8abc90-e306-4da0-9d3f-2b10111d3a04",
"name": "E-Reporting FR Tests",
"publisher": "Microsoft"
}
],
"target": "Cloud",
"features": [
"TranslationFile"
]
}
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.eServices.EDocument.Formats;

using Microsoft.eServices.EDocument;

enumextension 10970 "E-Document Format FR" extends "E-Document Format"
{
value(10970; "E-Reporting FR")
{
Caption = 'E-Reporting FR';
Implementation = "E-Document" = "E-Reporting FR Format";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.Sales.Customer;

pageextension 10972 "E-Reporting Customer Card FR" extends "Customer Card"
{
layout
{
addafter("VAT Registration No.")
{
field("FR E-Reporting Trans. Type"; Rec."FR E-Reporting Trans. Type")
{
ApplicationArea = Basic, Suite;
Caption = 'E-Reporting Transaction Type';
ToolTip = 'Specifies the transaction type for French e-reporting. This determines how transactions for this customer are categorized in the e-reporting file sent to the tax authorities.';
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.Sales.Customer;

tableextension 10972 "E-Reporting Customer FR" extends Customer
{
fields
{
field(10972; "FR E-Reporting Trans. Type"; Enum "FR E-Reporting Trans. Type")
{
Caption = 'E-Reporting Transaction Type';
DataClassification = CustomerContent;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.eServices.EDocument;

pageextension 10974 "E-Reporting E-Documents FR" extends "E-Documents"
{
layout
{
addlast(DocumentList)
{
field("Clearance Date"; Rec."Clearance Date")
{
ApplicationArea = Basic, Suite;
Caption = 'E-Reporting Acceptance Date';
ToolTip = 'Specifies the date and time when the e-reporting transaction was accepted by the tax authority.';
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.eServices.EDocument;
using System.Utilities;

codeunit 10970 "E-Reporting FR Format" implements "E-Document"
{
Access = Internal;

procedure Check(var SourceDocumentHeader: RecordRef; EDocumentService: Record "E-Document Service"; EDocumentProcessingPhase: Enum "E-Document Processing Phase")
begin
end;

/// <summary>
/// Creates the e-reporting XML for a single E-Document by delegating to the Export E-Reporting FR codeunit.
/// </summary>
/// <param name="EDocumentService">The E-Document Service record.</param>
/// <param name="EDocument">The E-Document record to export.</param>
/// <param name="SourceDocumentHeader">The source document header reference.</param>
/// <param name="SourceDocumentLines">The source document lines reference.</param>
/// <param name="TempBlob">The Temp Blob to write the generated XML to.</param>
procedure Create(EDocumentService: Record "E-Document Service"; var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef; var TempBlob: Codeunit "Temp Blob")
var
EDocumentSingle: Record "E-Document";
ExportEReportingFR: Codeunit "Export E-Reporting FR";
begin
EDocumentSingle.SetRange("Entry No", EDocument."Entry No");
ExportEReportingFR.CreateBatchXML(EDocumentSingle, TempBlob);
end;

/// <summary>
/// Creates the e-reporting batch XML for multiple E-Documents by delegating to the Export E-Reporting FR codeunit.
/// </summary>
/// <param name="EDocumentService">The E-Document Service record.</param>
/// <param name="EDocuments">The E-Document records to include in the batch export.</param>
/// <param name="SourceDocumentHeaders">The source document headers reference.</param>
/// <param name="SourceDocumentsLines">The source document lines reference.</param>
/// <param name="TempBlob">The Temp Blob to write the generated XML to.</param>
procedure CreateBatch(EDocumentService: Record "E-Document Service"; var EDocuments: Record "E-Document"; var SourceDocumentHeaders: RecordRef; var SourceDocumentsLines: RecordRef; var TempBlob: Codeunit "Temp Blob")
var
ExportEReportingFR: Codeunit "Export E-Reporting FR";
begin
ExportEReportingFR.CreateBatchXML(EDocuments, TempBlob);
end;

procedure GetBasicInfoFromReceivedDocument(var EDocument: Record "E-Document"; var TempBlob: Codeunit "Temp Blob")
begin
end;

procedure GetCompleteInfoFromReceivedDocument(var EDocument: Record "E-Document"; var CreatedDocumentHeader: RecordRef; var CreatedDocumentLines: RecordRef; var TempBlob: Codeunit "Temp Blob")
begin
Error(GetCompleteInfoNotSupportedErr);
end;

[EventSubscriber(ObjectType::Table, Database::"E-Document Service", 'OnAfterValidateEvent', 'Document Format', false, false)]
local procedure OnAfterValidateDocumentFormat(var Rec: Record "E-Document Service"; var xRec: Record "E-Document Service"; CurrFieldNo: Integer)
var
EDocServiceSupportedType: Record "E-Doc. Service Supported Type";
begin
if Rec."Document Format" <> Rec."Document Format"::"E-Reporting FR" then
exit;

EDocServiceSupportedType.SetRange("E-Document Service Code", Rec.Code);
if not EDocServiceSupportedType.IsEmpty() then
exit;

EDocServiceSupportedType.Init();
EDocServiceSupportedType."E-Document Service Code" := Rec.Code;
EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Sales Invoice";
EDocServiceSupportedType.Insert();

EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Sales Credit Memo";
EDocServiceSupportedType.Insert();

EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Purchase Invoice";
EDocServiceSupportedType.Insert();

EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Purchase Credit Memo";
EDocServiceSupportedType.Insert();

EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Service Invoice";
EDocServiceSupportedType.Insert();

EDocServiceSupportedType."Source Document Type" := EDocServiceSupportedType."Source Document Type"::"Service Credit Memo";
EDocServiceSupportedType.Insert();
end;

[EventSubscriber(ObjectType::Table, Database::"E-Document", 'OnBeforeModifyEvent', '', false, false)]
local procedure SetClearanceDateOnModify(var Rec: Record "E-Document"; var xRec: Record "E-Document"; RunTrigger: Boolean)
var
EDocumentServiceStatus: Record "E-Document Service Status";
EDocumentService: Record "E-Document Service";
begin
if Rec.Service = '' then
exit;

EDocumentService.SetLoadFields("Document Format");
if not EDocumentService.Get(Rec.Service) then
exit;

if EDocumentService."Document Format" <> EDocumentService."Document Format"::"E-Reporting FR" then
exit;

if not EDocumentServiceStatus.Get(Rec."Entry No", Rec.Service) then
exit;

case EDocumentServiceStatus.Status of
EDocumentServiceStatus.Status::Approved,
EDocumentServiceStatus.Status::Cleared:
Rec."Clearance Date" := CurrentDateTime();
EDocumentServiceStatus.Status::Rejected,
EDocumentServiceStatus.Status::"Not Cleared":
Rec."Clearance Date" := 0DT;
end;
end;

var
GetCompleteInfoNotSupportedErr: Label 'Getting complete info from received document is not supported for this e-document format.';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.Purchases.Vendor;

pageextension 10973 "E-Reporting Vendor Card FR" extends "Vendor Card"
{
layout
{
addafter("VAT Registration No.")
{
field("FR E-Reporting Trans. Type"; Rec."FR E-Reporting Trans. Type")
{
ApplicationArea = Basic, Suite;
Caption = 'E-Reporting Transaction Type';
ToolTip = 'Specifies the transaction type for French e-reporting. This determines how transactions for this vendor are categorized in the e-reporting file sent to the tax authorities.';
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.Formats;

using Microsoft.Purchases.Vendor;

tableextension 10973 "E-Reporting Vendor FR" extends Vendor
{
fields
{
field(10973; "FR E-Reporting Trans. Type"; Enum "FR E-Reporting Trans. Type")
{
Caption = 'E-Reporting Transaction Type';
DataClassification = CustomerContent;
}
}
}
Loading
Loading