WriteItemTradeTax

Methode (Sub)

WriteItemTradeTax ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BG-30 (Umsatzsteuerinformationen auf der Ebene der Rechnungsposition), BT-152 (Umsatzsteuersatz für den in Rechnung gestellten Artikel), BT-151 (Code der Umsatzsteuerkategorie des in Rechnung).

Beschreibung (Originaltext der englischen SDK-Dokumentation): BG-30: Sets the VAT information of an invoice line (replaces any existing line VAT data).

Hinweis: With an empty or zero VAT rate, category AE and neither Reason nor ExemptionReasonCode, the line exemption reason code VATEX-EU-AE is set automatically only when the profile is already Extended (FIX 2026-10-08 (109)); it no longer switches the profile.

Deklaration

Public Sub WriteItemTradeTax(ByVal ItemIndex As Integer, ByVal RateApplicablePercent As String, ByVal CategoryCode As String, Optional ByVal Reason As String = "", Optional ByVal ExemptionReasonCode As String = "", Optional ByVal CalculatedAmount As String = "", Optional ByVal TypeCode As String = "VAT")

Parameter

NameTypPflichtBeschreibung
ItemIndexIntegererforderlichZero-based index of the line item. Ignored if out of range
RateApplicablePercentStringerforderlichBT-152: Invoiced item VAT rate
CategoryCodeStringerforderlichBT-151: Invoiced item VAT category code
ReasonStringoptional (Standard: "")BT-X-96: VAT exemption reason text (sets profile Extended)
ExemptionReasonCodeStringoptional (Standard: "")BT-X-97: VAT exemption reason code (sets profile Extended)
CalculatedAmountStringoptional (Standard: "")BT-X-95: Line tax amount (sets profile Extended)
TypeCodeStringoptional (Standard: "VAT")BT-151-0: Tax type code (default VAT; empty is treated as VAT)

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim ItemIndex As Integer = 0
Dim RateApplicablePercent As String = ""
Dim CategoryCode As String = ""
alo.WriteItemTradeTax(ItemIndex, RateApplicablePercent, CategoryCode)

Aufruf (C#)

var zfStandard = Aloaha_ZUGFeRD.iXML.ZUGFeRDVersion.xInvoice;   // Optional ByRef im Konstruktor: in C# mit ref übergeben
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL", ref zfStandard);
int itemIndex = 0;
string rateApplicablePercent = "";
string categoryCode = "";
alo.WriteItemTradeTax(itemIndex, rateApplicablePercent, categoryCode);

Business Terms (EN 16931)

Artikel mit WriteItemTradeTax

COM-Schnittstelle

WriteItemTradeTax ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 279 von 343) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.

Quelle: XML-Dokumentationskommentare des Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM. In C# werden ByRef-Parameter mit ref übergeben, VB-Eigenschaften mit Parametern heißen get_…/set_…, optionale Parameter können entfallen.