---
id: object/codeunit/37218
type: object
title: Codeunit 37218 "PEPPOL30 Common"
summary: Codeunit 37218 "PEPPOL30 Common" in PEPPOL (Microsoft.Peppol). 9 public procedures. Introduced in BC29, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - peppol
versions:
  introduced: "29"
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 83724ee241cb5870c07c8b492a6f86ea710147c55bb0229eea92660f9bae433e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PEPPOL/app/src/Common/PEPPOL30Common.Codeunit.al
    title: src/Apps/W1/PEPPOL/app/src/Common/PEPPOL30Common.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11560
    - change/bcapps/11023
object_type: codeunit
object_id: 37218
name: PEPPOL30 Common
namespace: Microsoft.Peppol
app: PEPPOL
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 9
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 37218 "PEPPOL30 Common"

> Codeunit 37218 "PEPPOL30 Common" in PEPPOL (Microsoft.Peppol). 9 public procedures. Introduced in BC29, still in BC30, changed in BC30.

PEPPOL · Microsoft.Peppol · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/PEPPOL/app/src/Common/PEPPOL30Common.Codeunit.al) · facts from BC29

## Procedures

- `ConvertPostedHeaderToSalesHeader(var PostedRecRef: RecordRef; var SalesHeader: Record "Sales Header")`: Converts a posted document header RecordRef to a Sales Header buffer. Supports Sales Invoice Header, Sales Cr.Memo Header, Service Invoice Header, and Service Cr.Memo Header.
- `ConvertPostedLineToSalesLine(var PostedLineRecRef: RecordRef; var SalesLine: Record "Sales Line")`: Converts a posted document line RecordRef to a Sales Line buffer. Supports Sales Invoice Line, Sales Cr.Memo Line, Service Invoice Line, and Service Cr.Memo Line.
- `GetTotals(var PostedDocHeaderRecRef: RecordRef; var PostedDocLineRecRef: RecordRef; var TempVATAmtLine: Record "VAT Amount Line" temporary; var TempVATProductPostingGroup: Record "VAT Product Posting Group" temporary; PEPPOLFormat: Enum "PEPPOL 3.0 Format")`: Calculates and retrieves VAT totals for a posted document. Supports Sales Invoice, Sales Credit Memo, Service Invoice, and Service Credit Memo.
- `GetTotals(var PurchaseHeaderRecRef: RecordRef; var PurchaseLineRecRef: RecordRef; var TempVATAmtLine: Record "VAT Amount Line" temporary; var TempVATProductPostingGroup: Record "VAT Product Posting Group" temporary; PEPPOLPurchaseFormat: Enum "PEPPOL 3.0 Purchase")`: Calculates and retrieves VAT totals for a purchase order.
- `SetDocumentAttachmentFilters(var PostedDocHeaderRecRef: RecordRef; var DocumentAttachments: Record "Document Attachment")`: Sets document attachment filters based on the posted document header.
- `GetInvoiceRoundingLine(PostedDocHeaderRecRef: RecordRef; var TempSalesLineRounding: Record "Sales Line" temporary; PEPPOLFormat: Enum "PEPPOL 3.0 Format")`: Gets the invoice rounding line from the posted document lines.
- `GetInvoiceRoundingLine(PurchaseHeaderRecRef: RecordRef; var TempPurchaseLineRounding: Record "Purchase Line" temporary; PEPPOLPurchaseFormat: Enum "PEPPOL 3.0 Purchase")`: Gets the invoice rounding line from purchase order lines using a RecordRef header.
- `SetFilters(var PostedDocHeaderRecRef: RecordRef; var PostedDocLineRecRef: RecordRef; TempSalesLineRounding: Record "Sales Line" temporary)`: Sets filters on posted document lines, excluding the rounding line if present.
- `SetFilters(var PurchaseHeaderRecRef: RecordRef; var PurchaseLineRecRef: RecordRef; TempPurchaseLineRounding: Record "Purchase Line" temporary)`: Sets filters on purchase order lines using RecordRefs, excluding the rounding line if present.

## Recent changes

- 2026-10-07 [#11560 [E-Documents Core] [Peppol] - Enabling EDI capabilities with E-Documents. Send path (Self-Billed Purchase Invoice/Credit Memo → E-Document)](../../changes/bcapps/11560.md) (main, BC30, feature)
- 2026-09-10 [#11023 BE's PEPPOL "escompte" compensation](../../changes/bcapps/11023.md) (main, BC30, fix)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: BC30

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "PEPPOL30 Common")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
