AddProduct_Basic

Methode (Function) · gibt Integer zurück

AddProduct_Basic ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK. Sie betrifft BG-25 (Rechnungsposition), BT-129 (In Rechnung gestellte Menge), BT-130 (Code der Maßeinheit der in Rechnung gestellten Menge), BT-153 (Artikelname).

Beschreibung (Originaltext der englischen SDK-Dokumentation): BG-25: Adds a new invoice line with quantity, name, description and optional gross / net price.

Rückgabe: Zero-based index of the new line item

Hinweis: No line ID (BT-126) is set; use AddProduct_Comfort for full line data.

Deklaration

Public Function AddProduct_Basic(ByVal BilledQuantity As String, ByVal QuantityUnit As String, ByVal ProductName As String, Optional ByVal ProductDescription As String = "", Optional ByVal GrossPrice As String = "", Optional ByVal NetPrice As String = "", Optional ByVal NetPriceBasisQuantity As String = "", Optional ByVal CurrencyID As String = "") As Integer

Parameter

NameTypPflichtBeschreibung
BilledQuantityStringerforderlichBT-129: Invoiced quantity
QuantityUnitStringerforderlichBT-130: Unit of measure code of the invoiced quantity; also used as net price base quantity unit
ProductNameStringerforderlichBT-153: Item name
ProductDescriptionStringoptional (Standard: "")BT-154: Item description
GrossPriceStringoptional (Standard: "")BT-148: Item gross price
NetPriceStringoptional (Standard: "")BT-146: Item net price. Only written together with NetPriceBasisQuantity
NetPriceBasisQuantityStringoptional (Standard: "")BT-149: Item price base quantity. Only written together with NetPrice
CurrencyIDStringoptional (Standard: "")Currency code of the prices; sets the invoice currency if not yet set. Empty uses the invoice currency

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim BilledQuantity As String = ""
Dim QuantityUnit As String = ""
Dim ProductName As String = ""
Dim ergebnis = alo.AddProduct_Basic(BilledQuantity, QuantityUnit, ProductName)

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);
string billedQuantity = "";
string quantityUnit = "";
string productName = "";
var ergebnis = alo.AddProduct_Basic(billedQuantity, quantityUnit, productName);

Business Terms (EN 16931)

Artikel mit AddProduct_Basic

COM-Schnittstelle

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