SetTradeAllowanceChargeExemption
Methode (Function) · gibt Boolean zurück
SetTradeAllowanceChargeExemption ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BG-20 (Abschläge auf Dokumentenebene), BG-21 (Zuschläge auf Dokumentenebene), BT-120 (Umsatzsteuerbefreiungsgrund), BT-121 (Code für den Umsatzsteuerbefreiungsgrund).
Beschreibung (Originaltext der englischen SDK-Dokumentation): EXTENDED: sets the VAT exemption reason of a document level allowance or charge (BG-20 / BG-21) that was added with AddTradeAllowanceCharge. Written as ram:CategoryTradeTax/ram:ExemptionReason and ram:ExemptionReasonCode. Use exactly the same text and code as in the matching VAT breakdown (AddTradeTax, BT-120 / BT-121): the Factur-X EXTENDED rules BR-FXEXT-..-08rev only count allowances/charges whose exemption reason is identical to the VAT breakdown. A non-empty reason or code switches the profile to Factur-X EXTENDED (EN 16931 and XRechnung have no exemption reason on allowances/charges); for an EN 16931 invoice or an XRechnung do not call this function.
Rückgabe: True if stored; False if there is no document level allowance/charge with this index (see Last_Error)
Deklaration
Public Function SetTradeAllowanceChargeExemption(ByVal Index As Integer, ByVal ExemptionReason As String, Optional ByVal ExemptionReasonCode As String = "") As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
Index | Integer | erforderlich | Zero-based index of the document level allowance/charge in the order of the AddTradeAllowanceCharge calls; -1 = the last one added |
ExemptionReason | String | erforderlich | VAT exemption reason text, identical to BT-120 of the matching VAT breakdown. Empty removes it |
ExemptionReasonCode | String | optional (Standard: "") | Optional VAT exemption reason code (e.g. VATEX-EU-IC), identical to BT-121 of the matching VAT breakdown. 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.SetTradeAllowanceChargeExemption(Index, ExemptionReason) Then
Console.WriteLine("Fehler: " & alo.Last_Error)
End If
Aufruf (C#)
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL");
int index = 0;
string exemptionReason = "";
if (!alo.SetTradeAllowanceChargeExemption(index, exemptionReason))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}