---
id: object/codeunit/13648-dk
type: object
title: Codeunit 13648 "OIOUBL-Common Logic" (DK)
summary: Codeunit 13648 "OIOUBL-Common Logic" (DK) in the DK country layer (Microsoft.EServices.EDocument). 33 public procedures, 1 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - dk layer
versions:
  introduced: "29"
  last_changed: null
  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: 065f7e12f8b298da4f79693d32308a022c9027b894fde84b1f2babcbb384763b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/DK/OIOUBL/app/src/Management/OIOUBLCommonLogic.Codeunit.al
    title: src/Apps/DK/OIOUBL/app/src/Management/OIOUBLCommonLogic.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/dk
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9749
object_type: codeunit
object_id: 13648
name: OIOUBL-Common Logic
namespace: Microsoft.EServices.EDocument
app: OIOUBL
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: DK
counts:
  fields: 0
  procedures: 49
  events: 1
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 13648 "OIOUBL-Common Logic" (DK)

> Codeunit 13648 "OIOUBL-Common Logic" (DK) in the DK country layer (Microsoft.EServices.EDocument). 33 public procedures, 1 events. Introduced in BC29, still in BC30.

DK country layer · Microsoft.EServices.EDocument · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/DK/OIOUBL/app/src/Management/OIOUBLCommonLogic.Codeunit.al) · facts from BC29

An object of the [DK localization](../../localizations/dk.md), not part of W1.

## Events published

- `OnInsertCustomerPartyOnBeforeInsertPartyIdentification(var PartyElement: XmlElement; VATRegNo: Text[20]; CountryRegionCode: Code[10]; GLN: Code[13]; DocNameSpaceCAC: Text[250]; DocNameSpaceCBC: Text[250]; var IsHandled: Boolean)` (integration)

## Procedures

- `InsertOrderReference(var RootElement: XmlElement; ID: Code[35]; SalesOrderID: Code[20]; IssueDate: Date)`
- `InsertTaxScheme(var RootElement: XmlElement; SchemeAgencyID: Text)`
- `InsertPartyTaxScheme(var PartyElement: XmlElement)`
- `InsertAddress(var RootElement: XmlElement; ElementName: Text; Address: Record "Standard Address"; InhouseMail: Text)`
- `InsertAccountingSupplierParty(var InvoiceElement: XmlElement; SalespersonCode: Code[20])`
- `InsertAccountingCustomerParty(var InvoiceElement: XmlElement; GLN: Code[13]; VATRegNo: Text[20]; PartyName: Text[100]; PostalAddress: Record "Standard Address"; PartyContact: Record Contact)`
- `InsertDelivery(var InvoiceElement: XmlElement; DeliveryAddress: Record "Standard Address"; ShipmentDate: Date)`
- `InsertPaymentMeans(var InvoiceElement: XmlElement; DueDate: Date)`
- `InsertPaymentTerms(var InvoiceElement: XmlElement; PaymentTermsCode: Code[20]; PmtDiscountPercent: Decimal; CurrencyCode: Code[10]; PmtDiscountDate: Date; DueDate: Date; Amount: Decimal)`
- `InsertAllowanceCharge(var RootElement: XmlElement; Id: Integer; AllowanceChargeReason: Text; TaxCategoryID: Text[15]; Amount: Decimal; CurrencyCode: Code[10]; Percent: Decimal)`
- `InsertTaxSubtotal(var RootElement: XmlElement; VATCalculationType: Option; TaxableAmount: Decimal; TaxAmount: Decimal; VATPercentage: Decimal; CurrencyCode: Code[10])`
- `InsertTaxSubtotal(var RootElement: XmlElement; VATCalculationType: Enum "Tax Calculation Type"; TaxableAmount: Decimal; TaxAmount: Decimal; VATPercentage: Decimal; CurrencyCode: Code[10])`
- `InsertTaxSubtotalByCategory(var RootElement: XmlElement; TaxCategoryID: Text; VATPercentage: Decimal; TaxableAmount: Decimal; TaxAmount: Decimal; CurrencyCode: Code[10])`
- `InsertLineTaxTotal(var RootElement: XmlElement; AmountIncludingVAT: Decimal; Amount: Decimal; VATCalculationType: Option; VATPercent: Decimal; CurrencyCode: Code[10])`
- `InsertLineTaxTotal(var RootElement: XmlElement; TaxableAmount: Decimal; TaxAmount: Decimal; VATCalculationType: Enum "Tax Calculation Type"; VATPercent: Decimal; CurrencyCode: Code[10])`
- `GetLineTaxAmounts(Amount: Decimal; AmountIncludingVAT: Decimal; InvDiscountAmount: Decimal; VATPercent: Decimal; AmountRoundingPrecision: Decimal; var TaxableAmount: Decimal; var TaxAmount: Decimal)`: Computes a document line's (pre-header-level-discount) taxable amount and the matching line-level tax amount. Line-level discount is considered in the taxable amount. Taxable equals the line's LineExtensionAmount (Amount + Inv. Discount Amount). Tax reuses the posted line VAT (Amount Including VAT -...
- `AddLineToTaxGroups(var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; SalesInvoiceLine: Record "Sales Invoice Line")`: Accumulate one Sales Invoice line into the per-(TaxCategory, VAT %) tax groups.
- `AddLineToTaxGroups(var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; SalesCrMemoLine: Record "Sales Cr.Memo Line")`: Accumulate one Sales Credit Memo line into the per-(TaxCategory, VAT %) tax groups.
- `AddLineToTaxGroups(var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; ServiceInvoiceLine: Record "Service Invoice Line")`: Accumulate one Service Invoice line into the per-(TaxCategory, VAT %) tax groups.
- `AddLineToTaxGroups(var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; ServiceCrMemoLine: Record "Service Cr.Memo Line")`: Accumulate one Service Credit Memo line into the per-(TaxCategory, VAT %) tax groups.
- `InsertGroupedInvoiceTaxTotal(var RootElement: XmlElement; var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; CurrencyCode: Code[10])`: Inserts document's TaxTotal with one TaxSubtotal per tax-category group
- `InsertInvoiceDiscountAllowanceCharges(var RootElement: XmlElement; var TempTaxGroupBuffer: Record "OIOUBL-Tax Group Buffer"; CurrencyCode: Code[10])`: Inserts the header level discounts as document's AllowanceCharge. One per tax-category group present in the buffer.
- `InsertLegalMonetaryTotal(var InvoiceElement: XmlElement; LineAmount: Decimal; TaxAmount: Decimal; TotalAmount: Decimal; TotalInvDiscountAmount: Decimal; CurrencyCode: Code[10])`
- `InsertReminderLine(var ReminderElement: XmlElement; ID: integer; Note: Text[100]; Amount: Decimal; CurrencyCode: Code[10]; AccountCode: Code[30])`
- `InsertItem(var RootElement: XmlElement; Description: Text[100]; LineNo: Code[20])`
- `InsertPrice(var RootElement: XmlElement; UnitPrice: Decimal; UnitOfMeasureCode: Code[10]; CurrencyCode: Code[10])`
- `GetPaymentChannelCode(): Text`
- `GetInvoiceHeader(): Text`
- `GetReminderHeader(): Text`
- `GetCrMemoHeader(): Text`
- `GetTaxCategoryID(Type: Option "Normal VAT","Reverse Charge VAT","Full VAT","Sales Tax"; VATPercent: Decimal): Text[15]`
- `GetTaxCategoryID(Type: Enum "Tax Calculation Type"; VATPercent: Decimal): Text[15]`
- `init(var XmlNameSpaceCBC: Text[250]; var XmlNameSpaceCAC: Text[250])`

Plus 15 local procedures.

## Recent changes

- 2026-08-10 [#9749 OIOUBL fixes after schematron update](../../changes/bcapps/9749.md) (main, BC30, fix)

## Across versions

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

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: "OIOUBL-Common Logic")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A DK country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
