CyberStore Ecommerce 2023 Documentation
CustomerDispatchDisplay.xslt

The following is the default XML transformation file applied to the SORQDN output for the Dispatch Note lookup.

<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:TBLART="TBLART" xmlns:SALBRN="SALBRN" xmlns:SALARE="SALARE" xmlns:SALSLS="SALSLS">

  <xsl:template match="/">
    <HTML>
      <HEAD>
        <title>
          Dispatch Lookup
        </title>
        <script type="text/javascript" language="javascript" src="../../main/scripts/query.js">
        </script>
      </HEAD>
      <BODY>
 <div class="divTable">
      <div class="divTableBody">  
        <div class="logoWrapper">
          <div class="divTableCell logo"></div>
          <div class="divTableCell title">Dispatch Note</div>
        </div>
      <!--<div class="orderdisplayTitle dispatchNotePopupLink" align="center" >
              Dispatch Note - <xsl:value-of select="/DispatchNoteDetail/DispatchNote" />
      </div>-->        
    <div class="divTableRow invoiceDetails">
    <div class="divTableCell dispatchNote">
      <div class="detailRow">
        <div class="orderdisplayLabel">Dispatch Note Number:</div>
        <div class="orderdisplaydetailField">
          <xsl:value-of select="/DispatchNoteDetail/DispatchNote" />
        </div>
      </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Customer Number: </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/CustomerName" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Date of Delivery: </div>
            <div class="orderdisplaydetailField">
            <xsl:variable name="LenCheck2" select="substring(/DispatchNoteDetail/ActualDeliveryDate, 6, 2)" />
            <xsl:choose>
              <xsl:when test="string-length($LenCheck2) = 0">
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of
                  select="concat(substring(/DispatchNoteDetail/ActualDeliveryDate, 6, 2), '/',
              substring(/DispatchNoteDetail/ActualDeliveryDate, 9, 2), '/',
              substring(/DispatchNoteDetail/ActualDeliveryDate, 1, 4))" />
              </xsl:otherwise>
            </xsl:choose>
        </div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Invoice Number: </div>
            <div class="orderdisplaydetailField invoicePopupLink" ><xsl:value-of select="/DispatchNoteDetail/Invoice" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Invoice Amount: </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/TotalInvoiceAmount" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Shipping Method: </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/ShippingInstrs" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">Tracking Number: </div>
            <div class="orderdisplaydetailField"> </div>
        </div>

    </div>
        <div class="divTableRow customerDetails">
          <div class="divTableCell dispatchNote divTableRight">
        <div class="detailRow">
            <div class="orderdisplayLabel shipToLabel"> Ship To: </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchCustName" /></div>
        </div> 
        <div class="detailRow">
            <div class="orderdisplayLabel">   </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchAddress1" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">   </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchAddress2" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">   </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchAddress3" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">   </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchAddress4" /></div>
        </div>
        <div class="detailRow">
            <div class="orderdisplayLabel">   </div>
            <div class="orderdisplaydetailField"><xsl:value-of select="/DispatchNoteDetail/DispatchAddress5" /></div>
        </div>
    </div>
  </div>
  </div>
</div>

            <!--
                                Display of DETAIL LINES
                        -->
   <div class="divTableBody">
              <table width="100%" align="center" cellpadding="5" cellspacing="0" border="0">

                <tr class="detailhdg2" valign="bottom">
                  <td class="orderDisplayDetailLabel" nowrap="on">
                    Stock Code
                  </td>
                  <td class="orderDisplayDetailLabel">
                    Description
                  </td>
                  <td class="orderDisplayDetailLabel center">Qty</td>
                </tr>
                <xsl:for-each select="DispatchNoteDetail/DispatchNoteLine">
                  <tr>
                    <xsl:choose>
                      <xsl:when test="position() mod 2 = 1">
                        <xsl:attribute name="class">oddRow</xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">evenRow</xsl:attribute>
                      </xsl:otherwise>
                    </xsl:choose>
                    <!--   
                                            MERCHANDISE LINES
                                        -->
                    <xsl:if test="Merchandise[. !=' ']">
                      <td class="orderdisplaydetailField" nowrap="on">
                        <xsl:value-of select="Merchandise/MStockCode" />
                      </td>
                      <td class="orderdisplaydetailField" nowrap="on">
                        <xsl:value-of select="Merchandise/MStockDes" />
                      </td>

                      <td class="orderdisplaydetailField center" nowrap="on">
                        <xsl:value-of select="format-number(Merchandise/MOrderQty,'###,###,##0')" />
                      </td>
                    </xsl:if>
                    
                    <!-- 
                                                COMMENT LINES 
                                        -->
                    <xsl:if test="CommentLine[. !=' ']">
                      <td class="orderdisplaydetailField" colspan="10" style="text-indent:10px">
                        <xsl:value-of select="CommentLine/NComment" />
                      </td>
                    </xsl:if>
                  </tr>
                </xsl:for-each>
              </table>
        </div>
      </div>
      </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>