Skip to content
Open

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ------------------------------------------------------------------------------------------------
// 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;

using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Formats;
using Microsoft.eServices.EDocument.Processing.Interfaces;

enumextension 13917 "XRechnung EDoc Read into Draft" extends "E-Doc. Read into Draft"
{
value(13914; "XRechnung")
{
Caption = 'XRechnung';
Implementation = IStructuredFormatReader = "E-Document XRechnung Handler";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>103033</cbc:ID>
<cbc:IssueDate>2026-01-22</cbc:IssueDate>
<cbc:DueDate>2026-02-22</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>XYZ</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>1</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>2</cbc:ID>
</cac:OrderReference>
<cac:ContractDocumentReference>
<cbc:ID>103033</cbc:ID>
</cac:ContractDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>103033</cbc:ID>
<cbc:DocumentType></cbc:DocumentType>
<cac:Attachment>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>103033</cbc:ID>
<cbc:DocumentType></cbc:DocumentType>
<cac:Attachment>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">seller@email.de</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>CRONUS International</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Main Street, 14</cbc:StreetName>
<cbc:CityName>Birmingham</cbc:CityName>
<cbc:PostalZone>B27 4KT</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>CRONUS International</cbc:RegistrationName>
<cbc:CompanyID>123456789</cbc:CompanyID>
<cbc:CompanyLegalForm>123/456/7890, HRA-Eintrag in […]</cbc:CompanyLegalForm>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Jim Olive</cbc:Name>
<cbc:ElectronicMail>JO@contoso.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">buyer@info.de</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>8712345000004</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>The Cannon Group PLC</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>192 Market Square</cbc:StreetName>
<cbc:CityName>Birmingham</cbc:CityName>
<cbc:PostalZone>B27 4KT</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB789456278</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>The Cannon Group PLC</cbc:RegistrationName>
<cbc:CompanyID>789456278</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2026-01-22</cbc:ActualDeliveryDate>
<cac:DeliveryLocation>
</cac:DeliveryLocation>
</cac:Delivery>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>58</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<cbc:ID>DE75512108001245126199</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Zahlbar sofort ohne Abzug.</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="XYZ">980</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="XYZ">14000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="XYZ">980</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="XYZ">14000</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="XYZ">14000</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="XYZ">14980</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="XYZ">0</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="XYZ">0.00</cbc:PrepaidAmount>
<cbc:PayableRoundingAmount currencyID="XYZ">0</cbc:PayableRoundingAmount>
<cbc:PayableAmount currencyID="XYZ">14980</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1000</cbc:ID>
<cbc:Note>Item</cbc:Note>
<cbc:InvoicedQuantity unitCode="PCS">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="XYZ">4000</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Bicycle</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="XYZ">4000</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2000</cbc:ID>
<cbc:Note>Item</cbc:Note>
<cbc:InvoicedQuantity unitCode="PCS">2</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="XYZ">10000</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Bicycle v2</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="XYZ">5000</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</ubl:Invoice>
9 changes: 6 additions & 3 deletions Apps/DE/EDocumentDE/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
{
"from": 13922,
"to": 13923
"to": 13926
}
],
"features": [
Expand All @@ -70,5 +70,8 @@
"allowDownloadingSource": true,
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
"application": "27.0.0.0",
"resourceFolders": [
".resources"
]
}
56 changes: 56 additions & 0 deletions Apps/DE/EDocumentDE/test/src/EDocFormatMock.Codeunit.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
codeunit 13926 "E-Doc. Format Mock" implements "E-Document"
{
SingleInstance = true;

procedure Check(var SourceDocumentHeader: RecordRef; EDocService: Record "E-Document Service"; EDocumentProcessingPhase: enum "E-Document Processing Phase");
begin
OnCheck(SourceDocumentHeader, EDocService, EDocumentProcessingPhase);
end;

procedure Create(EDocService: Record "E-Document Service"; var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
OnCreate(EDocService, EDocument, SourceDocumentHeader, SourceDocumentLines, TempBlob);
end;

procedure CreateBatch(EDocService: Record "E-Document Service"; var EDocuments: Record "E-Document"; var SourceDocumentHeaders: RecordRef; var SourceDocumentsLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
OnCreateBatch(EDocService, EDocuments, SourceDocumentHeaders, SourceDocumentsLines, TempBlob);
end;

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

procedure GetCompleteInfoFromReceivedDocument(var EDocument: Record "E-Document"; var CreatedDocumentHeader: RecordRef; var CreatedDocumentLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
OnGetCompleteInfoFromReceivedDocument(EDocument, CreatedDocumentHeader, CreatedDocumentLines, TempBlob);
end;

[IntegrationEvent(false, false)]
local procedure OnCheck(var SourceDocumentHeader: RecordRef; EDocService: Record "E-Document Service"; EDocumentProcessingPhase: enum "E-Document Processing Phase")
begin
end;

[IntegrationEvent(false, false)]
local procedure OnCreate(EDocService: Record "E-Document Service"; var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
end;

[IntegrationEvent(false, false)]
local procedure OnCreateBatch(EDocService: Record "E-Document Service"; var EDocuments: Record "E-Document"; var SourceDocumentHeaders: RecordRef; var SourceDocumentsLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
end;

[IntegrationEvent(false, false)]
local procedure OnGetBasicInfoFromReceivedDocument(var EDocument: Record "E-Document"; var TempBlob: codeunit "Temp Blob");
begin
end;

[IntegrationEvent(false, false)]
local procedure OnGetCompleteInfoFromReceivedDocument(var EDocument: Record "E-Document"; var CreatedDocumentHeader: RecordRef; var CreatedDocumentLines: RecordRef; var TempBlob: codeunit "Temp Blob");
begin
end;


}
7 changes: 7 additions & 0 deletions Apps/DE/EDocumentDE/test/src/EDocFormatMock.EnumExt.al
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enumextension 13918 "E-Doc. Format Mock" extends "E-Document Format"
{
value(6160; "Mock")
{
Implementation = "E-Document" = "E-Doc. Format Mock";
}
}
Loading
Loading