AddProduct_Comfort_Quick

Methode (Function) · gibt Integer zurück

AddProduct_Comfort_Quick ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BG-25 (Rechnungsposition), BT-126 (Kennung der Rechnungsposition), BT-153 (Artikelname), BT-154 (Artikelbeschreibung).

Beschreibung (Originaltext der englischen SDK-Dokumentation): BG-25: Adds an invoice line with simplified parameters (gross price, optional per-unit discount, VAT). The line ID (BT-126) is assigned automatically.

Rückgabe: Zero-based index of the new line item, or -1 on error

Hinweis: Simplified wrapper of AddProduct_Comfort: the net price (BT-146) is calculated as gross price minus discount, the price base quantity is 1, and the discount is written as an allowance (not a charge). The line ID is set to the item index + 1.

Deklaration

Public Function AddProduct_Comfort_Quick(ByVal ProductName As String, ByVal ProductDescription As String, ByVal ProductCode As String, ByVal ProductNote As String, ByVal BilledQuantity As Double, ByVal QuantityUnit As String, ByVal GrossPrice_Per_Unit As Double, ByVal CurrencyID As String, ByVal Discount_per_Unit As Double, ByVal DiscountText As String, Optional ByVal TAXPercent As String = "", Optional ByVal TaxTypeCode As String = "VAT", Optional ByVal TaxExemptionReason As String = "", Optional ByVal TAXCategoryCode As String = "", Optional ByVal TotalAmount As String = "") As Integer

Parameter

NameTypPflichtBeschreibung
ProductNameStringerforderlichBT-153: Item name
ProductDescriptionStringerforderlichBT-154: Item description
ProductCodeStringerforderlichBT-155: Seller assigned item identifier
ProductNoteStringerforderlichBT-127: Free text note of the line item
BilledQuantityDoubleerforderlichBT-129: Invoiced quantity (rounded to 2 decimals)
QuantityUnitStringerforderlichBT-130: Unit of measure code of the invoiced quantity; also used as unit of the price base quantity
GrossPrice_Per_UnitDoubleerforderlichBT-148: Item gross price per unit ex VAT (rounded to 2 decimals)
CurrencyIDStringerforderlichCurrency code for all amounts of the line (default EUR if empty)
Discount_per_UnitDoubleerforderlichBT-147: Discount per unit deducted from the gross price. Only used if greater than 0 and not greater than GrossPrice_Per_Unit
DiscountTextStringerforderlichReason text of the item price discount
TAXPercentStringoptional (Standard: "")BT-152: Line VAT rate. If empty: ZUGFeRD 1.0 ignores TAXCategoryCode; ZUGFeRD 2.x keeps the category and uses 0 for E, Z, AE, K, G (FIX 2026-10-07 (100))
TaxTypeCodeStringoptional (Standard: "VAT")BT-151-0: Tax type code (default VAT)
TaxExemptionReasonStringoptional (Standard: "")VAT exemption reason text. If given, the profile is set to Extended; ZUGFeRD 1.0 ignores TAXPercent and TAXCategoryCode, ZUGFeRD 2.x keeps them (FIX 2026-10-07 (100))
TAXCategoryCodeStringoptional (Standard: "")BT-151: Line VAT category code, e.g. S, Z, E, AE, K
TotalAmountStringoptional (Standard: "")BT-131: Line net amount. If empty it is calculated as (GrossPrice_Per_Unit - Discount_per_Unit) * BilledQuantity

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim ProductName As String = ""
Dim ProductDescription As String = ""
Dim ProductCode As String = ""
Dim ProductNote As String = ""
Dim BilledQuantity As Double = 0
Dim QuantityUnit As String = ""
Dim GrossPrice_Per_Unit As Double = 0
Dim CurrencyID As String = ""
Dim Discount_per_Unit As Double = 0
Dim DiscountText As String = ""
Dim ergebnis = alo.AddProduct_Comfort_Quick(ProductName, ProductDescription, ProductCode, ProductNote, BilledQuantity, QuantityUnit, GrossPrice_Per_Unit, CurrencyID, Discount_per_Unit, DiscountText)

Aufruf (C#)

var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL");
string productName = "";
string productDescription = "";
string productCode = "";
string productNote = "";
double billedQuantity = 0;
string quantityUnit = "";
double grossPrice_Per_Unit = 0;
string currencyID = "";
double discount_per_Unit = 0;
string discountText = "";
var ergebnis = alo.AddProduct_Comfort_Quick(productName, productDescription, productCode, productNote, billedQuantity, quantityUnit, grossPrice_Per_Unit, currencyID, discount_per_Unit, discountText);

Business Terms (EN 16931)

Artikel mit AddProduct_Comfort_Quick

COM-Schnittstelle

AddProduct_Comfort_Quick ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 81 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.