Codeunit 6125 Prepare Purchase E-Doc. Draft

E-Document Core, Microsoft.eServices.EDocument.Processing.Import

src/Apps/W1/EDocument/App/src/Processing/Import/PrepareDraft/PreparePurchaseEDocDraft.Codeunit.al49 lines, Copyright (c) Microsoft Corporation. MIT

// ------------------------------------------------------------------------------------------------// 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.Processing.Import;using Microsoft.eServices.EDocument;using Microsoft.eServices.EDocument.Processing.Interfaces;using Microsoft.Purchases.Vendor;using System.Config;codeunit 6125 "Prepare Purchase E-Doc. Draft" implements IProcessStructuredData{    Access = Internal;    var        PrepareDraftHelper: Codeunit "EDoc Prepare Purch. Draft";    procedure PrepareDraft(EDocument: Record "E-Document"; EDocImportParameters: Record "E-Doc. Import Parameters"): Enum "E-Document Type"    var        FeatureConfiguration: Codeunit "Feature Configuration";    begin        if FeatureConfiguration.GetConfiguration(AgentDrivenLineMatchingTok) = AgentDrivenTreatmentTok then            exit("E-Document Type"::"Purchase Invoice");        PrepareDraftHelper.PrepareDraft(EDocument, EDocImportParameters);        exit("E-Document Type"::"Purchase Invoice");    end;    procedure OpenDraftPage(var EDocument: Record "E-Document")    begin        PrepareDraftHelper.OpenDraftPage(EDocument);    end;    procedure CleanUpDraft(EDocument: Record "E-Document")    begin        PrepareDraftHelper.CleanUpDraft(EDocument);    end;    procedure GetVendor(EDocument: Record "E-Document"; Customizations: Enum "E-Doc. Proc. Customizations") Vendor: Record Vendor    begin        Vendor := PrepareDraftHelper.GetVendor(EDocument, Customizations);    end;    var        AgentDrivenLineMatchingTok: Label 'PAAgentDrivenLineMatching', Locked = true;        AgentDrivenTreatmentTok: Label 'agent_driven', Locked = true;}