Contents

    Example of custom overviews in the sales management

    On this page you will find a sample SQL for custom overviews in the sales management of JTL-Wawi. Read the Creating custom overviews page to learn how to create custom overviews.

    Shipping information

    Create a custom overview in which you can see all shipping information for a selected sales order. The following information is dispalyed:

    • Delivery note ID
    • Shipped on
    • Shipping service provider
    • Shipping method
    • Tracking ID
    • Tracking link
    • Note
    • User
    SELECT tLieferschein.cLieferscheinNr AS Lieferscheinnummer
            , CONVERT(VARCHAR, tVersand.dVersendet, 104) AS 'Versendet am'
            , tVersandart.cAmazonCarrierCode AS 'Logistiker'
            , tVersandart.cName AS 'Versandart'
            , tVersand.cIdentCode AS 'Tracking ID'
            , REPLACE(tVersandart.cTrackingUrlTemplate, '#IdentCode#', tVersand.cIdentCode) AS 'Trackinglink'
            , tVersand.cHinweis AS 'Hinweis'
            , eazybusiness.dbo.tbenutzer.cName AS Benutzer
    FROM tbestellung
    JOIN tLieferschein ON tLieferschein.kBestellung = tBestellung.kBestellung
    LEFT JOIN tVersand ON tVersand.kLieferschein = tLieferschein.kLieferschein
    LEFT JOIN tVersandart ON tVersandart.kVersandart = tVersand.kVersandArt
    JOIN eazybusiness.dbo.tbenutzer ON eazybusiness.dbo.tbenutzer.kBenutzer = tVersand.kBenutzer
    WHERE tBestellung.kBestellung = @Key

    Related topics