SaveAsXeroCSV
Methode (Function) · gibt Boolean zurück
SaveAsXeroCSV ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Exports the loaded invoice as a Xero sales invoice import CSV file (one row per line item, UTF-8 with BOM). Contains buyer contact and address, invoice number, reference, invoice date, due date, total, item code, description, quantity, unit price, tax type, tax amount and currency.
Rückgabe: True if the file exists after writing; False if the path has a wrong extension, the invoice has no line items, no buyer name is set, or an error occurred
Hinweis: AccountCode is always 200 and Discount always 0. The tax type is derived from the VAT category code and rate (e.g. VAT19, ZERORATED, EXEMPTEXPENSES, EC-SERVICES).
Deklaration
Public Function SaveAsXeroCSV(ByVal OutputCSV As String, Optional ByVal DoOverwrite As Boolean = False) As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
OutputCSV | String | erforderlich | Path of the CSV file to write; must end with .csv or .txt |
DoOverwrite | Boolean | optional (Standard: False) | True deletes an existing file at OutputCSV before writing. An existing file is overwritten in either case |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim OutputCSV As String = ""
If Not alo.SaveAsXeroCSV(OutputCSV) 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);
string outputCSV = "";
if (!alo.SaveAsXeroCSV(outputCSV))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}
COM-Schnittstelle
SaveAsXeroCSV ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 320 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.