---
title: "Codeunit 6209 E-Doc Sample Purchase Invoice"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6209-e-doc-sample-purchase-invoice/
type: codeunit
id: 6209
name: "E-Doc Sample Purchase Invoice"
app: "E-Document Core"
namespace: Microsoft.eServices.EDocument.Processing.Import.Purchase
versions: "27-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/6209-e-doc-sample-purchase-invoice/source/?v=28 https://jonas-paprotka.de/ref/codeunit/6209-e-doc-sample-purchase-invoice/source/"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 6209 E-Doc Sample Purchase Invoice

JOP-AL, https://jonas-paprotka.de/ref/codeunit/6209-e-doc-sample-purchase-invoice/

| | |
| --- | --- |
| App | E-Document Core |
| Namespace | Microsoft.eServices.EDocument.Processing.Import.Purchase |
| Versions | 27-29 |
| Minors | W1 27.3-29.0; DE 27.3-29.0; US 27.3-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/6209-e-doc-sample-purchase-invoice/editions.json) |
| Source file | src/SampleInvoice/EDocSamplePurchaseInvoice.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetSampleInvoicePostingDate | () | Date | public | 27-29 | - | - |
| AddInvoice | (VendorNo: Code[20]; ExternalDocNo: Text[35]; Scenario: Text[2048]) | - | public | 27-29 | - | - |
| AddInvoice | (VendorNo: Code[20]; ExternalDocNo: Text[35]; Scenario: Text[2048]; TotalTaxAmount: Decimal) | - | public | 27-29 | - | - |
| SetMixLayoutsForPDFGeneration | () | - | public | 27-29 | - | - |
| InitSamplePurchInvHeader | (var EDocPurchaseHeader: Record "E-Document Purchase Header"; VendorNo: Code[20]; DocumentDate: Date; ExternalDocNo: Text[35]; TotalTaxAmount: Decimal) | - | internal | 27-29 | - | - |
| AddLine | (LineType: Enum "Purchase Line Type"; No: Code[20]; Description: Text[100]; Quantity: Decimal; DirectUnitCost: Decimal; UnitOfMeasureCode: Code[10]) | - | public | 27-29 | - | - |
| AddLine | (LineType: Enum "Purchase Line Type"; No: Code[20]; Description: Text[100]; Quantity: Decimal; DirectUnitCost: Decimal; DeferralCode: Code[10]; UnitOfMeasureCode: Code[10]) | - | public | 27-29 | - | - |
| AddLine | (EDocPurchaseHeader: Record "E-Document Purchase Header"; LineType: Enum "Purchase Line Type"; No: Code[20]; Description: Text[100]; Quantity: Decimal; DirectUnitCost: Decimal; DeferralCode: Code[10]; UnitOfMeasureCode: Code[10]) | - | internal | 27-29 | - | - |
| Generate | () | - | public | 27-29 | - | - |
| UpdateTotalVATInEDocPurchaseHeader | (var EDocPurchaseHeader: Record "E-Document Purchase Header"; var EDocPurchaseLine: Record "E-Document Purchase Line") | - | internal | 28-29 | - | - |

## Source

Symbols: Microsoft.E-DocumentCore.symbols.e1d97edc-c239-46b4-8d84-6368bdf67c8b, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
