### Print Order using CJTLwawiExtern in C# Source: https://developer.jtl-software.com/products/jtlwawiextern/druckmethoden This C# code snippet demonstrates how to print an order using the JTL_DruckeAuftrag method from the CJTLwawiExtern class. It requires server and database credentials, user authentication details, and specific keys for the user and the order. The 'id' parameter selects the print form from tFormular. ```csharp class Worker { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void Drucken(string server, string datenbank, string benutzer, string passwort, int kBenutzer, int key, int id) { this._wawiExtern.JTL_DruckeAuftrag(server, datenbank, benutzer, passwort, kBenutzer, key, id); } } ``` -------------------------------- ### Import XML Order using JTL_OrderXmlImport (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/auftragsimportbeispiel This C# code snippet demonstrates how to import an XML order file using the JTLwawiExtern.dll. It utilizes the JTL_OrderXmlImport method, requiring server connection details, user credentials, a user key, and the path to the XML file. The method returns the invoice number(s) associated with the imported order(s). ```csharp class Worker { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void Import(string server, string datenbank, string benutzer, string passwort, int kBenutzer, string filePath) { string cKRechnungen; this._wawiExtern.JTL_OrderXmlImport(server, datenbank, benutzer, passwort, kBenutzer, filePath, out cKRechnungen); } } ``` -------------------------------- ### JTLwawiExtern.dll: Pfad zur Wawi-Installation finden (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/jtlwawiexterndll_einbinden Diese C#-Methoden suchen den Installationspfad der JTL-Wawi, indem sie die Windows-Registrierung abfragen. Sie unterstützen sowohl 32-Bit- als auch 64-Bit-Systeme und geben den Pfad zurück, falls die JTL-Wawi gefunden wird. ```csharp private string FindInstallLocation() { var cLocation = FindUninstallSubkey(@"Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"); return !string.IsNullOrEmpty(cLocation) ? cLocation : FindUninstallSubkey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall"); } private string FindUninstallSubkey(string baseKey) { var oKey = Registry.LocalMachine.OpenSubKey(baseKey); if (oKey == null) return null; return oKey.GetSubKeyNames() .Select(oKey.OpenSubKey) .Where(oSubKey => Equals("JTL-Wawi", oSubKey.GetValue("DisplayName"))) .Select(oSubKey => Convert.ToString(oSubKey.GetValue("InstallLocation"))) .FirstOrDefault(); } ``` -------------------------------- ### C# Workflow-Methode ansteuern mit JTLwawiExtern Source: https://developer.jtl-software.com/products/jtlwawiextern/workflowmethoden Diese C#-Code-Methode demonstriert die Nutzung der JTL_WorkflowAuftrag-Funktion aus der JTLwawiExtern.dll. Sie erfordert Server- und Datenbankanmeldeinformationen, Benutzerdetails und spezifische IDs zur Ausführung eines Auftrags-Workflows. Die Methode ist Teil einer Worker-Klasse, die eine Instanz von CJTLwawiExtern initialisiert. ```csharp class Worker { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void WorkFlow(string server, string datenbank, string benutzer, string passwort, int kBenutzer, int key, int id) { this._wawiExtern.JTL_WorkflowAuftrag(server, datenbank, benutzer, passwort, kBenutzer, key, id); } } ``` -------------------------------- ### JTLwawiExtern.dll: DLLs zur Laufzeit nachladen (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/jtlwawiexterndll_einbinden Diese C#-Methode ist ein Event-Handler für AssemblyResolve. Sie lädt DLLs dynamisch aus dem Installationspfad der JTL-Wawi, wenn diese zur Laufzeit benötigt werden und nicht gefunden werden können. Sie gibt die geladene Assembly zurück oder null, wenn die DLL nicht existiert. ```csharp private Assembly LoadAssemblys(object sender, ResolveEventArgs args) { var folderPath = Path.GetDirectoryName(this._wawiPath); var assemblyPath = Path.Combine(folderPath ?? throw new InvalidOperationException(), $"{new AssemblyName(args.Name).Name}.dll"); if (!File.Exists(assemblyPath)) return null; var assembly = Assembly.LoadFrom(assemblyPath); return assembly; } ``` -------------------------------- ### JTLwawiExtern.dll: Versionsprüfung der DLL (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/jtlwawiexterndll_einbinden Diese C#-Methode prüft, ob die Version der lokal gefundenen JTLwawiExtern.dll mindestens so aktuell ist wie die in den Projekteigenschaften angegebene Version. Dies ist wichtig, da ältere Versionen möglicherweise nicht alle erforderlichen Methoden enthalten. ```csharp private bool ValidExternDllVersion() { var externDllPath = Path.Combine(this._wawiPath, "JTLwawiExtern.dll"); var externDllVersion = new Version(FileVersionInfo.GetVersionInfo(externDllPath).FileVersion); var eingebundeneExternDllVersion = new Version(1, 1, 0, 9); // Manuell angegebene Version return externDllVersion >= eingebundeneExternDllVersion; } ``` -------------------------------- ### C# Versanddaten Import mit JTLwawiExtern Source: https://developer.jtl-software.com/products/jtlwawiextern/versanddatenimportbeispiel Dieser C#-Code importiert Versanddaten mithilfe der JTLwawiExtern.dll. Er initialisiert einen `VersanddatenImporter`, fügt einzelne Versandinformationen hinzu und wendet diese schließlich auf die Datenbank an. Die `Versandinformation`-Klasse dient als Datenstruktur für die zu importierenden Daten. ```csharp class Versandinformation { public string Id { get; set; } public DateTime Versanddatum { get; set; } public string TrackingId { get; set; } public string VersandInfo { get; set; } } class WorkerVersand { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void VersanddatenImport(string server, string datenbank, string benutzer, string passwort, int kBenutzer, IList versandinformationen) { //Ein Objekt vom VersanddatenImporter erzeugen var versanddatenImporter = this._wawiExtern.VersanddatenImporter(server, datenbank, benutzer, passwort, kBenutzer); //Versandinformationen in einer Schleife durchlaufen und dem VersanddatenImporter übergeben foreach (var versandinformation in versandinformationen) { versanddatenImporter.Add(versandinformation.Id, versandinformation.Versanddatum, versandinformation.TrackingId, versandinformation.VersandInfo); } //Den Import bestätigen. Hier werden die Daten in die DB geschrieben. versanddatenImporter.Apply(); } } ``` -------------------------------- ### Define Order Item with Stock Movement (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag This XML snippet defines a single order item within JTL Wawi. It includes essential details like article ID, name, price, tax, quantity, and discount. Crucially, it also specifies a stock movement (``) to potentially generate a delivery note. ```xml 33968 4.20 19.00 1.00 1 7.00 0.0000 33968 415 1 1.00 0 ``` -------------------------------- ### Hinzufügen eines Angebotstyps in JTL-Wawi Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag Dieses XML-Snippet zeigt, wie der Tag mit dem Wert 'A' hinzugefügt wird, um einen reinen Angebotstyp zu erstellen. Es ist wichtig zu beachten, dass bei Verwendung dieses Tags die Attribute nRechnungErstellen und nLieferscheinErstellen unbedingt auf 0 gesetzt werden müssen, um die Erstellung von Rechnungen und Lieferscheinen zu verhindern. ```xml A ``` -------------------------------- ### JTLwawiExtern.dll: Event für Assembly Resolve abonnieren (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/jtlwawiexterndll_einbinden Diese C#-Zeile abonniert das AssemblyResolve-Event der aktuellen AppDomain. Dies ist entscheidend, um benötigte DLLs zur Laufzeit aus dem Installationspfad der JTL-Wawi nachladen zu können und Laufzeitfehler zu vermeiden. ```csharp AppDomain.CurrentDomain.AssemblyResolve += this.LoadAssemblys; ``` -------------------------------- ### JTLwawiExtern.dll: Instanz der externen Klasse erstellen (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/jtlwawiexterndll_einbinden Diese C#-Code-Kombination zeigt, wie Sie eine Instanz der externen Klasse CJTLwawiExtern erstellen. Dies geschieht im Konstruktor der Worker-Klasse und ermöglicht die Nutzung der Methoden der JTLwawiExtern.dll. ```csharp private readonly CJTLwawiExtern _wawiExtern; public Worker() { this._wawiExtern = new CJTLwawiExtern(); } ``` -------------------------------- ### Speichern von Rechnungen mit JTLwawiExtern.dll in C# Source: https://developer.jtl-software.com/products/jtlwawiextern/speichermethoden Diese Methode kapselt den Aufruf von JTL_SpeicherRechnung aus der JTLwawiExtern.dll. Sie benötigt Server- und Datenbankzugangsdaten, Benutzeranmeldeinformationen sowie spezifische Keys für Benutzer, Rechnung und Formular. Der Speicherpfad wird standardmäßig von der Wawi verwaltet. ```csharp class Worker { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void Speichern(string server, string datenbank, string benutzer, string passwort, int kBenutzer, int key, int id) { this._wawiExtern.JTL_SpeicherRechnung(server, datenbank, benutzer, passwort, kBenutzer, key, id); } } ``` -------------------------------- ### Importieren von XML Gutschriften mit JTLwawiExtern.dll (C#) Source: https://developer.jtl-software.com/products/jtlwawiextern/gutschriftimportbeispiel Dieses Code-Beispiel zeigt, wie die Methode JTL_CreditXmlImport() der Klasse CJTLwawiExtern verwendet wird, um eine XML-Gutschriftsdatei in die JTL Wawi-Datenbank zu importieren. Es erfordert die JTLwawiExtern.dll und akzeptiert Server-Zugangsdaten sowie den Pfad zur XML-Datei als Eingabe. Der Ausgabeparameter liefert die ID der importierten Gutschrift(en). ```csharp class Worker { CJTLwawiExtern _wawiExtern = new CJTLwawiExtern(); public void Import(string server, string datenbank, string benutzer, string passwort, int kBenutzer, string filePath) { string cKGutschriften; this._wawiExtern.JTL_CreditXmlImport(server, datenbank, benutzer, passwort, kBenutzer, filePath, out cKGutschriften); } } ``` -------------------------------- ### Specify Order Item Properties (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag This XML demonstrates how to assign specific properties or variations to an order item within JTL Wawi using the `` tag. Each `` tag links to a specific property value (`kEigenschaftWert`), allowing for detailed customization of items like clothing sizes or colors. ```xml ... 119 117 ... ``` -------------------------------- ### Define Payment Information with Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag The tag provides additional payment details for an order. It includes fields for bank name, IBAN, BIC, and account holder, all of which are text-based. ```xml ``` -------------------------------- ### XML Payment Details Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag Represents individual payment entries for an order, allowing for multiple payment methods per order. Each payment tag details the amount, whether it's a down payment, the payment method (by ID or name), and any relevant notes or payment types (payment, reminder, discount). ```xml 93.11 0 0 Mit Bargeld 10.00 0 0 Mit Karte 0 ``` -------------------------------- ### XML Order Structure Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag Defines the main structure for an order, including general order information, shipping, and payment details. It allows for specific attributes to control document creation (invoice, delivery note) and references to company and customer data. Child elements specify language, currency, order numbers, shipping methods, dates, and payment types. ```xml 1 EUR BELEG 123456789 2 2012-08-01 2012-07-13 Anmerkung 2012-07-16 K 2 14 ``` -------------------------------- ### Define Stock Entry for Credit Note Item (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift This XML snippet defines a stock entry for a credit note item, used to increase the inventory of an article. It specifies the item, warehouse location, quantity, batch number, expiration date, and net cost price. This tag is optional and can be omitted for free items. ```xml 2594860 1 1.00 2.00 ``` -------------------------------- ### XML Attributes for Order Control Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag These attributes within the tag allow for granular control over the order import process, including whether to create and print invoices or delivery notes, and specifying form templates. ```xml ``` -------------------------------- ### XML Tags für Gutschrift Details (Gutschriftenimport) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift Beispiele für Tags, die innerhalb des -Elements zur Übermittlung spezifischer Gutschriftinformationen verwendet werden. Dies umfasst Belegnummer, Preise, Datum und weitere Details. ```xml Beleg 4723 47.11 19.00 2012-08-10 EUR 1 151 ``` -------------------------------- ### XML Structure for Multiple Orders Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag The tag serves as the root element for importing orders. It can contain multiple tags, each representing an individual order to be imported. ```xml ``` -------------------------------- ### Assign Delivery Address with Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag The tag assigns a delivery address to an order. It contains various free-text fields for address details such as salutation, name, company, street, city, country, and contact information. ```xml LCTT_Anrede LCTT_Vorname LCTT_Name LCTT_Titel LCTT_Firma LCTT_Straße LCTT_AZusatz LCTT_PLZ LCTT_Ort LCTT_Bundesland Marshallinseln LCTT_Tel LCTT_Mobil LCTT_Fax LCTT@jtl-software.de ``` -------------------------------- ### Define Credit Note Position with Stock Entry (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift This XML snippet defines a single position within a credit note. It includes item details, price, tax, quantity, and an optional stock entry to increase item inventory. The stock entry specifies the item, warehouse location, quantity, batch number, expiration date, and cost price. ```xml 2594860 47.11 19.00 1.00 0.00 16.7227 2594860 45 47.11 2594860 1 1.00 2.00 ``` -------------------------------- ### XML Header for Order Import Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag The XML file must begin with this header declaration. It specifies the XML version and the character encoding, which should be ISO-8859-1 (Latin-1) for correct data processing and display in JTL-Wawi. ```xml ``` -------------------------------- ### XML Struktur für Gutschriftenimport (tGutschriften und tGutschrift) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift Grundlegende XML-Struktur für den Gutschriftenimport. Der Tag umschließt beliebig viele einzelne -Elemente, die jeweils eine Gutschrift repräsentieren. ```xml ``` -------------------------------- ### XML Header für Gutschriftenimport Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift Der notwendige XML-Header für den Gutschriftenimport. Die Datei muss in Latin-1 codiert sein, um korrekte Datenübernahme und Darstellung in der Wawi zu gewährleisten. ```xml ``` -------------------------------- ### XML Attribute für tGutschrift (Gutschriftenimport) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift Definition von Attributen für den -Tag im XML-Import. Diese Attribute steuern individuelle Importoptionen wie Druckeinstellungen und die Zuordnung zu Firma und Kunde. ```xml ``` -------------------------------- ### Define Warehouse Outgoing Items with Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateiauftrag The tag specifies items to be fulfilled from an order. It includes article ID, warehouse input details, location, quantity, and article ID in the warehouse. This tag is crucial for inventory management and should be used with caution, especially with serialized items. ```xml 33963 0 1 6.00 0 33964 0 1 4.00 0 ``` ```xml 15 0 1 1.00 10 15 0 1 1.00 11 ``` -------------------------------- ### Assign Billing Address with trechnungsadresse Tag (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift This XML snippet demonstrates the structure of the tag. It is used within JTL WAWI to assign a billing address to a credit note. All fields within this tag are free-text inputs, allowing for flexible data entry for address and contact details. ```xml LCTT_Anrede LCTT_Vorname LCTT_Name LCTT_Titel LCTT_Firma LCTT_Straße LCTT_AZusatz LCTT_PLZ LCTT_Ort LCTT_Bundesland Marshallinseln LCTT_Tel LCTT_Mobil LCTT_Fax LCTT_EMail ``` -------------------------------- ### Define Credit Note Item Property (XML) Source: https://developer.jtl-software.com/products/jtlwawiextern/aufbauxmldateigutschrift This XML snippet defines a property for a credit note item. It links an item to a specific property value and specifies the net price for that variation. This is used for items with variations, such as size or color. ```xml 2594860 45 47.11 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.