SetSpecifiedAdvancePaymentExemption

Methode (Function) · gibt Boolean zurück

SetSpecifiedAdvancePaymentExemption ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BT-120 (Umsatzsteuerbefreiungsgrund), BT-121 (Code für den Umsatzsteuerbefreiungsgrund).

Beschreibung (Originaltext der englischen SDK-Dokumentation): EXTENDED: sets the VAT exemption reason text and code of the tax included in an advance payment that was added with AddSpecifiedAdvancePayment. Written as ram:SpecifiedAdvancePayment/ram:IncludedTradeTax/ram:ExemptionReason and ram:ExemptionReasonCode. AddSpecifiedAdvancePayment itself only takes the text; use this function for the code (e.g. VATEX-EU-AE). Use the same text and code as on the lines and in the VAT breakdown (AddTradeTax, BT-120 / BT-121). Available from version 11.0.0.20.

Rückgabe: True if stored; False if there is no advance payment with this index or it has no included tax (see Last_Error)

Hinweis: The advance payment needs an included tax entry: pass "0.00" (not an empty string) as CalculatedTAXAmount of AddSpecifiedAdvancePayment for an exempt payment. Text and code are set together; an empty text removes the text passed to AddSpecifiedAdvancePayment.

Deklaration

Public Function SetSpecifiedAdvancePaymentExemption(ByVal Index As Integer, ByVal ExemptionReason As String, Optional ByVal ExemptionReasonCode As String = "") As Boolean

Parameter

NameTypPflichtBeschreibung
IndexIntegererforderlichZero-based index of the advance payment in the order of the AddSpecifiedAdvancePayment calls; -1 = the last one added
ExemptionReasonStringerforderlichVAT exemption reason text. Empty removes it
ExemptionReasonCodeStringoptional (Standard: "")Optional VAT exemption reason code (e.g. VATEX-EU-AE). Empty removes it

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim Index As Integer = 0
Dim ExemptionReason As String = ""
If Not alo.SetSpecifiedAdvancePaymentExemption(Index, ExemptionReason) Then
    Console.WriteLine("Fehler: " & alo.Last_Error)
End If

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 index = 0;
string exemptionReason = "";
if (!alo.SetSpecifiedAdvancePaymentExemption(index, exemptionReason))
{
    Console.WriteLine("Fehler: " + alo.Last_Error);
}

Business Terms (EN 16931)

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.