CyberStore Ecommerce 2023 Documentation
CustomerReturnDisplay.xslt

The following is the default XML transformation file applied to a RMAQRY output during Return History lookup.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <div class="divTable">
      <div class="divTableBody">
        <div class="logoWrapper">
          <div class="divTableCell logo"></div>
          <div class="divTableCell title">Return</div>
        </div>
        <div class="divTableRow invoiceDetails">
          <div class="divTableCell">
            <div class="detailRow">
              <div class="orderdisplayLabel">RMA Number: </div>
              <div class="orderdisplaydetailField"><xsl:value-of select="//RMAHeader/RMANumber" /></div>
            </div>
          <div class="detailRow">
            <div class="orderdisplayLabel">Entry Date: </div>
            <div class="orderdisplaydetailField">
              <xsl:variable name="LenCheck" select="substring(//RMAHeader/EntryDate, 6, 2)" />  
            <xsl:choose>
              <xsl:when test="string-length($LenCheck) = 0">
              </xsl:when>
              <xsl:otherwise>
                <xsl:value-of
                  select="concat(substring(//RMAHeader/EntryDate, 6, 2), '/',substring(//RMAHeader/EntryDate, 9, 2), '/',substring(//RMAHeader/EntryDate, 1, 4))" />
              </xsl:otherwise>
            </xsl:choose>
        </div>
        </div> 
              <div class="detailRow">
                <div class="orderdisplayLabel"></div>
                <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/CustomerName" /></div>
              </div>
              <div class="detailRow">
                <div class="orderdisplayLabel"></div>
                <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/Contact" /></div>
              </div>
              <div class="detailRow">
                <div class="orderdisplayLabel"></div>
                <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/Telephone" /></div>
              </div>
        </div>
        <div class="divTableRow customerDetails">
          <div class="divTableCell divTableRight">
                <div class="detailRow">
                  <div class="orderdisplayLabel"></div>
                       <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/CustomerName" /></div>
                     </div>
                <div class="detailRow">
                  <div class="orderdisplayLabel"></div>
                  <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/address1" /></div></div>
                <div class="detailRow">
                  <div class="orderdisplayLabel"></div>
                  <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/address2" /></div> </div>
                <div class="detailRow">
                  <div class="orderdisplayLabel"></div>
                  <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/address3" />, 
                   <xsl:value-of select="//CustomerInformation/address3loc" />, 
                   <xsl:value-of select="//CustomerInformation/address4" /></div>
                </div>
                <div class="detailRow">
                  <div class="orderdisplayLabel">   </div>
                  <div class="orderdisplaydetailField"><xsl:value-of select="//CustomerInformation/address5" /></div> </div>
            </div>
          </div>
        </div>  
      </div>

      <div class="divTableBody returnData">
        <div class="divTableRow detailRow headerRow">
          <div class="divTableCell divTableHead divTableItem">Item</div>
          <div class="divTableCell divTableHead divTableQTY">Auth Qty</div>
          <div class="divTableCell divTableHead divTableDate">Purchase Date</div>
          <div class="divTableCell divTableHead divTableStatus">Status</div>
          <div class="divTableCell divTableHead divTableDate">Issue Date</div>
          <div class="divTableCell divTableHead divTablePrice">Unit cost</div>
          <div class="divTableCell divTableHead divTableProblemCode">Problem Code</div>
          <div class="divTableCell divTableHead divTableInvoice">Invoice</div>
        </div>
        <xsl:for-each select="RMAQuery/DetailLines/DetailLine">
          <div class="divTableRow">
            <div class="divTableCell StockCode">
              <xsl:value-of select="LineInformation/StockCode" />
            </div>
            <div class="divTableCell Qty">
              <xsl:value-of select="format-number(LineInformation/AuthorizedQty, '0')" />
            </div>
            <div class="divTableCell PurchaseDate">
              <xsl:variable name="LenCheck" select="substring(LineInformation/PurchaseDate, 6, 2)" />
              <xsl:choose>
                <xsl:when test="string-length($LenCheck) = 0">
                </xsl:when>
                <xsl:otherwise>
                  <xsl:value-of
                    select="concat(substring(LineInformation/PurchaseDate, 6, 2), '/',
              substring(LineInformation/PurchaseDate, 9, 2), '/',
              substring(LineInformation/PurchaseDate, 1, 4))" />
                </xsl:otherwise>
              </xsl:choose>
            </div>
            <div class="divTableCell ">
              <xsl:value-of select="LineInformation/LineStatus" />
            </div>
            <div class="divTableCell  IssueDate">
              <xsl:variable name="LenCheck2" select="substring(LineInformation/IssueDate, 6, 2)" />
              <xsl:choose>
                <xsl:when test="string-length($LenCheck2) = 0">
                </xsl:when>
                <xsl:otherwise>
                  <xsl:value-of
                    select="concat(substring(LineInformation/IssueDate, 6, 2), '/',
              substring(LineInformation/IssueDate, 9, 2), '/',
              substring(LineInformation/IssueDate, 1, 4))" />
                </xsl:otherwise>
              </xsl:choose>
            </div>
            <div class="divTableCell divTableRight format-currency">
              <xsl:value-of select="LineInformation/UnitCost" />
            </div>
            <div class="divTableCell ">
              <xsl:value-of select="LineInformation/ProblemCode" />
            </div>
            <div class="divTableCell invoicePopupLink">
              <xsl:choose>
                <xsl:when test="LineInformation/Invoice='NONE'"></xsl:when>
                <xsl:otherwise>
                  <!--<xsl:value-of select="format-number(LineInformation/Invoice,'#')" />-->
                  <xsl:value-of select="LineInformation/Invoice" />
                </xsl:otherwise>
              </xsl:choose>
            </div>
          </div>
        </xsl:for-each>
      </div>
    </div>
  </xsl:template>
</xsl:stylesheet>