CyberStore Documentation
CustomerInvoiceDisplay.xslt

The following is the default XML transformation file applied to either a SORQID ouput or SORQND output for the Sales Order Invoice or Dispatch Invoice 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>
        <div class="divTableRow invoiceDetails">

          <div class="divTableCell divTableRight">

            Invoice #:
            <xsl:value-of select="//Header/DocumentNumber" />
            <br />
            Invoice Date:
            <xsl:value-of select="concat(substring(//Header/EntInvoiceDate, 6, 2), '/', substring(//Header/EntInvoiceDate, 9, 2), '/', substring(//Header/EntInvoiceDate, 1, 4))" />
            <br />
            Due Date:
            <xsl:value-of select="concat(substring(//Totals/InvoiceDueDate, 6, 2), '/', substring(//Totals/InvoiceDueDate, 9, 2), '/', substring(//Totals/InvoiceDueDate, 1, 4))" />
          </div>
        </div>
        <div class="divTableRow customerDetails">
          <div class="divTableCell">
            <xsl:value-of select="//Header/CustomerName" />
            <br />
            <xsl:value-of select="//Header/Contact" />
            <br />
            <xsl:value-of select="//Header/Email" />
            <br />
            <xsl:value-of select="//Header/CompanyName" />
            <br />
            <xsl:value-of select="//Header/CompanyAddress2" />
            <br />
            <xsl:value-of select="//Header/CompanyAddress3" />
            ,
            <xsl:value-of select="//Header/CompanyAddress4" />

            <xsl:value-of select="//Header/CompanyAddress5" />
          </div>
        </div>
      </div>
      <br />
      <div class="divTableBody">

        <div class="divTableRow detailRow headerRow">
          <div class="divTableCell divTableHead divTableItem">Item</div>
          <div class="divTableCell divTableHead divTableDesc">Description</div>
          <div class="divTableCell divTableHead divTableQTY">Qty</div>
          <div class="divTableCell divTableHead divTableEA">EA</div>
          <div class="divTableCell divTableHead divTablePrice">Price</div>
        </div>
        <xsl:for-each select="//Merchandise">
          <div class="divTableRow itemDetails">
            <div class="divTableCell StockCode">
              <xsl:value-of select="MStockCode" />
            </div>
            <div class="divTableCell StockDes">
              <xsl:value-of select="MStockDes" />
            </div>
            <div class="divTableCell divTableRight Qty">
              <xsl:value-of select="format-number(MShipQty, '0')" />
            </div>
            <div class="divTableCell divTableRight Price format-currency">
              <xsl:value-of select="MPrice" />
            </div>
            <div class="divTableCell divTableRight Gross format-currency">
              <xsl:value-of select="LineGrossAmount" />
            </div>
          </div>
        </xsl:for-each>
        <div class="divTableRow invoiceTotals">
          <div class="divTableCell"></div>
          <div class="divTableCell divTableRight orderTotal">
            Sub Total: <span class='format-currency'>
              <xsl:value-of select="//Totals/TotalInvAmtExclTax" />
            </span>
          </div>
        </div>
        <div class="divTableRow invoiceTotals">
          <div class="divTableCell"></div>
          <div class="divTableCell divTableRight orderTotal">
            Tax: <span class='format-currency'>
              <xsl:value-of select="//Totals/TotalSalesTax" />
            </span>
          </div>
        </div>
        <div class="divTableRow invoiceTotals">
          <div class="divTableCell"></div>
          <div class="divTableCell divTableRight orderTotal">
            Shipping: <span class='format-currency'>
              <xsl:value-of select="//Totals/TotalFreightAmount" />
            </span>
          </div>
        </div>
        <div class="divTableRow invoiceTotals">
          <div class="divTableCell"></div>
          <div class="divTableCell divTableRight orderTotal">
            Total: <span class='format-currency'>
              <xsl:value-of select="//Totals/TotalInvoiceAmount" />
            </span>
          </div>
        </div>
      </div>
    </div>

  </xsl:template>
</xsl:stylesheet>