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
grossReplacementPricedecimalGross 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
partsIReadOnlyList<AltteilsteuerExchangePart>The exchange parts already created by CreateExchangePart(string, InvoiceLine, decimal, string) or CreateExchangePartFromNetValue(string, InvoiceLine, decimal, string).
Returns
Exceptions
- ArgumentException
Thrown when
partsis 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
baseLineIdstringBase line identifier; the two Altteilsteuer lines receive IDs
{baseLineId}-AT+and{baseLineId}-AT-.replacementPartLineInvoiceLineThe replacement part line as built by the caller.
grossReplacementPricedecimalGross price of the replacement part (including 19% VAT).
itemNameAltteilestringItem 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
baseLineIdstringBase line identifier; the two Altteilsteuer lines receive IDs
{baseLineId}-AT+and{baseLineId}-AT-.replacementPartLineInvoiceLineThe replacement part line as built by the caller.
oldPartNetValuedecimalPre-computed old-part net value (positive).
itemNameAltteilestringItem name used on both Altteilsteuer lines (default: "Altteil").
Returns
- AltteilsteuerExchangePart
A fully constructed AltteilsteuerExchangePart.