<?xml version="1.0" encoding="windows-1250" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="html" />

   <xsl:template match="/">
      <html>
         <head>
            <h2>Faktura XML wyeksportowana z programu WF-MAG</h2>
            <link rel="stylesheet" href="Invoice.css" />
         </head>
         <body>
            <h3>Nagwek faktury</h3>            
            <table class="itemTable" cellspacing="2" cellpadding="2" border="1">
               <thead class="tblHeader">
               <tr>
                  <td>Numer faktury</td>
                  <td>Data faktury</td>
                  <td>Data sprzeday</td>
				  <td>ILN sprzedajcego</td>
				  <td>ILN kupujcego</td>
               </tr>
               </thead>
               <tr class="itemCell">
                  <td><xsl:value-of select="/Document-Invoice/Invoice-Header/InvoiceNumber"/></td>
                  <td><xsl:value-of select="/Document-Invoice/Invoice-Header/InvoiceDate"/></td>
                  <td><xsl:value-of select="/Document-Invoice/Invoice-Header/SalesDate"/></td>
				  <td><xsl:value-of select="/Document-Invoice/Invoice-Parties/Seller/ILN"/><br/></td>
				  <td><xsl:value-of select="/Document-Invoice/Invoice-Parties/Buyer/ILN"/><br/></td>
                </tr>
            </table>
            <h3>Pozycje faktury</h3>
            <table class="itemTable" cellspacing="2" cellpadding="2" border="1">
               <thead class="tblHeader">
               <tr>
                  <td>EAN</td>
                  <td>Nazwa</td>
                  <td>Ilosc</td>
				  <td>Stawka VAT</td>
                  <td>Cena netto</td>
				  <td>Warto netto pozycji</td>
				  <td>VAT pozycji</td>
               </tr>
               </thead>
               <xsl:for-each select="/Document-Invoice/Invoice-Lines/Line/Line-Item">
                  <tr class="itemCell">
                     <td><xsl:value-of select="EAN"/></td>
                     <td><xsl:value-of select="ItemDescription"/></td>
                     <td><xsl:value-of select="InvoiceQuantity"/></td>
					 <td><xsl:value-of select="TaxRate"/></td>
                     <td><xsl:value-of select="InvoiceUnitNetPrice"/></td>
					 <td><xsl:value-of select="NetAmount"/></td>
					 <td><xsl:value-of select="TaxAmount"/></td>
                  </tr>
               </xsl:for-each>
               <tfoot class="tblHeader">
               <tr>
                  <td colspan="5"><h3>Podsumowanie </h3> </td>
                  <td colspan="1"><xsl:value-of select="Document-Invoice/Invoice-Summary/TotalNetAmount"/></td>
				  <td colspan="1"><xsl:value-of select="Document-Invoice/Invoice-Summary/TotalTaxAmount"/></td>
               </tr>
               </tfoot>
            </table>
            <hr size="1" color="#443300" />
         </body>
      </html>
   </xsl:template>
</xsl:stylesheet>