Class AltteilsteuerCalculator

Namespace
EInvoice.Core.GermanExtensions
Assembly
EInvoice.Core.dll

Computes the three invoice lines and BT-22 note required by the Altteilsteuer workaround per UStAE 10.5 Abs. 3 / e-rechnung-bund.de FAQ.

public static class AltteilsteuerCalculator
Inheritance
AltteilsteuerCalculator
Inherited Members

Methods

ComputeOldPartNetValue(decimal)

Computes the old-part net value from the gross replacement price. Formula: round(grossReplacementPrice / 1.19 × 0.10, 2).

public static decimal ComputeOldPartNetValue(decimal grossReplacementPrice)

Parameters

grossReplacementPrice decimal

Gross price of the replacement part (including 19% VAT).

Returns

decimal

Old-part net value rounded to 2 decimal places.

Exceptions

ArgumentOutOfRangeException

Thrown when grossReplacementPrice is zero or negative.

CreateCombinedNote(IReadOnlyList<AltteilsteuerExchangePart>)

Creates a single combined BT-22 invoice note summarising multiple Altteilsteuer exchange parts. Use this when calling AddAltteilsteuerExchangeParts(IReadOnlyList<AltteilsteuerExchangePart>) so that the invoice carries exactly one note instead of one per exchange part.

public static Note CreateCombinedNote(IReadOnlyList<AltteilsteuerExchangePart> parts)

Parameters

parts IReadOnlyList<AltteilsteuerExchangePart>

The exchange parts already created by CreateExchangePart(string, InvoiceLine, decimal, string) or CreateExchangePartFromNetValue(string, InvoiceLine, decimal, string).

Returns

Note

A single Note whose text references UStAE 10.5 Abs. 3 and shows the totals.

Exceptions

ArgumentException

Thrown when parts is empty.

CreateExchangePart(string, InvoiceLine, decimal, string)

Creates an AltteilsteuerExchangePart from the gross replacement price. Computes the old-part net value using ComputeOldPartNetValue(decimal) then delegates to CreateExchangePartFromNetValue(string, InvoiceLine, decimal, string).

public static AltteilsteuerExchangePart CreateExchangePart(string baseLineId, InvoiceLine replacementPartLine, decimal grossReplacementPrice, string itemNameAltteile = "Altteil")

Parameters

baseLineId string

Base line identifier; the two Altteilsteuer lines receive IDs {baseLineId}-AT+ and {baseLineId}-AT-.

replacementPartLine InvoiceLine

The replacement part line as built by the caller.

grossReplacementPrice decimal

Gross price of the replacement part (including 19% VAT).

itemNameAltteile string

Item name used on both Altteilsteuer lines (default: "Altteil").

Returns

AltteilsteuerExchangePart

A fully constructed AltteilsteuerExchangePart.

CreateExchangePartFromNetValue(string, InvoiceLine, decimal, string)

Creates an AltteilsteuerExchangePart from a pre-computed old-part net value. Use this overload when your ERP system already provides the net value directly.

public static AltteilsteuerExchangePart CreateExchangePartFromNetValue(string baseLineId, InvoiceLine replacementPartLine, decimal oldPartNetValue, string itemNameAltteile = "Altteil")

Parameters

baseLineId string

Base line identifier; the two Altteilsteuer lines receive IDs {baseLineId}-AT+ and {baseLineId}-AT-.

replacementPartLine InvoiceLine

The replacement part line as built by the caller.

oldPartNetValue decimal

Pre-computed old-part net value (positive).

itemNameAltteile string

Item name used on both Altteilsteuer lines (default: "Altteil").

Returns

AltteilsteuerExchangePart

A fully constructed AltteilsteuerExchangePart.