Codeunit 1612 Exp. Serv.Inv. PEPPOL BIS3.0

Base Application, Microsoft.Sales.Peppol

src/Layers/W1/BaseApp/Service/Sales/Peppol/ExpServInvPEPPOLBIS30.Codeunit.al48 lines, Copyright (c) Microsoft Corporation. MIT

#if not CLEAN29// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace Microsoft.Sales.Peppol;using Microsoft.Service.History;using System.IO;codeunit 1612 "Exp. Serv.Inv. PEPPOL BIS3.0"{    TableNo = "Record Export Buffer";    ObsoleteState = Pending;    ObsoleteReason = 'Replaced by PEPPOL App';    ObsoleteTag = '29.0';    trigger OnRun()    var        ServiceInvoiceHeader: Record "Service Invoice Header";        PEPPOLServiceValidation: Codeunit "PEPPOL Service Validation";        RecordRef: RecordRef;        OutStr: OutStream;    begin        RecordRef.Get(Rec.RecordID);        RecordRef.SetTable(ServiceInvoiceHeader);        PEPPOLServiceValidation.CheckServiceInvoice(ServiceInvoiceHeader);        Rec."File Content".CreateOutStream(OutStr);        GenerateXMLFile(ServiceInvoiceHeader, OutStr);        Rec.Modify();    end;    [Scope('OnPrem')]    procedure GenerateXMLFile(VariantRec: Variant; var OutStr: OutStream)    var        SalesInvoicePEPPOLBIS30: XMLport "Sales Invoice - PEPPOL BIS 3.0";    begin        SalesInvoicePEPPOLBIS30.Initialize(VariantRec);        SalesInvoicePEPPOLBIS30.SetDestination(OutStr);        SalesInvoicePEPPOLBIS30.Export();    end;}#endif