CyberStore 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="logoWrapper">
        <div class="divTableCell logo"></div>
      </div>
      <div class="orderdisplayTitle dispatchNotePopupLink" align="center" >
              Dispatch Note - <xsl:value-of select="/DispatchNoteDetail/DispatchNote" />
      </div>
        <table class="orderdisplayTable"  border="0">
          <tr>
            <td class="orderdisplayLabel"  nowrap="on" width="30%">Customer Number:</td>
            <td class="orderdisplayField"  nowrap="on" width="30%">
              <xsl:value-of select="/DispatchNoteDetail/CustomerName" />
            </td>
            
            
            <td class="orderdisplayField" />
            <td rowspan="7" class="orderdisplayLabel" nowrap="on" valign="top" width="10%">
              Ship To:
            </td>
            <td class="orderdisplayField" nowrap="on"  width="30%">
              <xsl:value-of select="/DispatchNoteDetail/DispatchCustName" />
            </td>
          </tr>
          <tr>
            <td class="orderdisplayLabel" nowrap="on">Date of Delivery:</td>
            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/ActualDeliveryDate" />
            </td>
            <td class="orderdisplayField" nowrap="on">

            </td>
            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/DispatchAddress1" />
            </td>
          </tr>
          <tr>

            <td class="orderdisplayLabel" nowrap="on">Invoice Number:</td>
            <td class="orderdisplayField invoicePopupLink" nowrap="on" colspan="2">
              <xsl:value-of select="/DispatchNoteDetail/Invoice" />
            </td>

            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/DispatchAddress2" />
            </td>
          </tr>
          <tr>
            <td class="orderdisplayLabel" nowrap="on">Invoice Amount:</td>
            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/TotalInvoiceAmount" />
            </td>
            <td></td>
            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/DispatchAddress3" />
            </td>
          </tr>
          <tr>
            <td class="orderdisplayLabel" nowrap="on">Shipping Method:</td>
            <td class="orderdisplayField" nowrap="on" colspan="2">
              <xsl:value-of select="/DispatchNoteDetail/ShippingInstrs" />
            </td>

            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/DispatchAddress4" />
            </td>
          </tr>
          <tr>
            <td class="orderdisplayLabel" nowrap="on">Tracking Number:</td>
            <td class="orderdisplayField" nowrap="on" colspan="2">
              
            </td>
            <td class="orderdisplayField" nowrap="on">
              <xsl:value-of select="/DispatchNoteDetail/DispatchAddress5" />
            </td>
          </tr>
          <tr>

            <!--
                                Display of DETAIL LINES
                        -->
            <td colspan="5">
              <br />
              <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">Qty</td>
                </tr>
                <xsl:for-each select="DispatchNoteDetail/DispatchNoteLine">
                  <tr>
                    <xsl:choose>
                      <xsl:when test="position() mod 2 = 1">
                        <xsl:attribute name="class">TableRow</xsl:attribute>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:attribute name="class">HighlightTableRow</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" nowrap="on" align="right">
                        <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>
            </td>
          </tr>
        </table>
      </BODY>
    </HTML>
  </xsl:template>
</xsl:stylesheet>