Hjelp
Jens Glad Balchen
Logg ut
Bytt passord
Innstillinger
Timeliste
Legg til engangsbeløp
Reiseregning
Administrasjon
Fakturaliste
Fakturér
Kunder
Reiseregninger
Merverdiavgift
Rapporter
Timerapport
Årlig fakturarapport
System
Maler
Filer
Salg
Ordre
Produkter
Innkjøp
Lagerstyring
Varelager
Salgsrapport
Vareforbruksrapport
Kassarapport
Innstillinger
Navn
Dokumenttype
Prosessor
XslFoToPdf
Xslt
Neste mal
Ingen
Saint Etienne - faktura PDF
Energibarrer.no - faktura HTML
Saint Etienne - purring
Energibarrer.no - purring
Energibarrer.no - kreditnota
XSL-FO til PDF
Energibarrer.no - ordrebekreftelse tekst
Energibarrer.no - ordrebekreftelse HTML
Angreskjema
Energibarrer.no - leveringsbekreftelse tekst
Energibarrer.no - leveringsbekreftelse HTML
Energibarrer.no - fraktetikett
Energibarrer.no - ordrekvittering HTML
Energibarrer.no - ordrekvittering tekst
Tittel
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" omit-xml-declaration="yes" indent="no"/> <xsl:template match="invoice">Faktura <xsl:value-of select="./@number"/> fra Energibarrer.no</xsl:template> </xsl:stylesheet>
Innhold
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/> <xsl:template match="invoice"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="simple" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="0cm" margin-left="1cm" margin-right="1cm"> <fo:region-body margin-top="3cm" margin-bottom="2cm"/> <fo:region-before extent="4cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:static-content flow-name="xsl-region-before"> <fo:table table-layout="fixed"> <fo:table-column column-width="140mm"/> <fo:table-column column-width="70mm"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block> <fo:external-graphic src="logo-eb.png" scaling="uniform" max-width="70mm" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:table table-layout="fixed" color="grey" font-size="8pt"> <fo:table-column column-width="20mm"/> <fo:table-column column-width="30mm"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block>Adresse</fo:block> </fo:table-cell> <fo:table-cell> <xsl:apply-templates select="./company/formattedAddress"/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>E-post</fo:block> </fo:table-cell> <fo:table-cell> <fo:block> post@energibarrer.no </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>Telefon</fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="./company/phone"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>Bankkonto</fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="./company/bankAccountNumber"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>Foretaksnr</fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="./company/registrationNumber"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:static-content> <fo:flow flow-name="xsl-region-body" font-family="Arial"> <fo:block-container position="absolute" left="5mm" top="0mm" width="100mm" height="70mm"> <fo:block> <xsl:apply-templates select="./customer/formattedAddress"/> </fo:block> </fo:block-container> <fo:block-container position="absolute" left="100mm" top="0mm" width="100mm" height="70mm"> <fo:block> <fo:block font-size="20pt" font-weight="bold" space-after="2mm">FAKTURA</fo:block> <fo:table table-layout="fixed" font-size="10pt"> <fo:table-column column-width="30mm"/> <fo:table-column column-width="40mm"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block>Fakturanr:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold"> <xsl:value-of select="./@number"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>Fakturadato:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold"> <xsl:value-of select="./date"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>Forfallsdato:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold"> <xsl:value-of select="./due"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:block-container> <fo:block-container position="absolute" left="5mm" top="50mm" width="100%" height="120mm"> <fo:table table-layout="fixed" font-size="10pt"> <xsl:choose> <xsl:when test="./items/item/discountWithoutVat"> <fo:table-column column-width="75mm"/> </xsl:when> <xsl:otherwise> <fo:table-column column-width="95mm"/> </xsl:otherwise> </xsl:choose> <fo:table-column column-width="20mm"/> <fo:table-column column-width="30mm"/> <xsl:if test="./items/item/discountWithoutVat"> <fo:table-column column-width="20mm"/> </xsl:if> <fo:table-column column-width="20mm"/> <fo:table-header border-bottom-style="solid" border-bottom-width="1pt" border-bottom-color="black"> <fo:table-row font-weight="bold"> <fo:table-cell> <fo:block>PRODUKT</fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block>ANTALL</fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block>ENHETSPRIS</fo:block> </fo:table-cell> <xsl:if test="./items/item/discountWithoutVat"> <fo:table-cell text-align="right"> <fo:block>RABATT</fo:block> </fo:table-cell> </xsl:if> <fo:table-cell text-align="right"> <fo:block>SUM</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-footer> <fo:table-row> <fo:table-cell> <fo:block></fo:block> </fo:table-cell> <xsl:if test="./items/item/discountWithoutVat"> <fo:table-cell> <fo:block></fo:block> </fo:table-cell> </xsl:if> <fo:table-cell border-top="1pt solid black" border-bottom="double black"> <fo:block></fo:block> </fo:table-cell> <fo:table-cell padding-before="0.5mm" text-align="right" border-top="1pt solid black" border-bottom="double black"> <fo:block>TOTALT</fo:block> </fo:table-cell> <fo:table-cell padding-before="0.5mm" text-align="right" border-top="1pt solid black" border-bottom="double black"> <fo:block font-weight="bold"> <xsl:value-of select="./amountWithVat"/> </fo:block> </fo:table-cell> </fo:table-row> <xsl:apply-templates select="./vatBreakdown"/> </fo:table-footer> <fo:table-body space-before="2mm"> <xsl:apply-templates select="./items/item"> <xsl:sort select="description/text()" order="ascending"/> </xsl:apply-templates> <xsl:apply-templates select="./shipping"/> </fo:table-body> </fo:table> </fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="shipping"> <fo:table-row height="5mm"> <fo:table-cell> <fo:block/> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> </fo:table-cell> <xsl:if test="//items/item/discountWithVat"> <fo:table-cell> </fo:table-cell> </xsl:if> <fo:table-cell number-columns-spanned="2"> <fo:block> Frakt </fo:block> <fo:block margin-left="4mm" font-size="8pt"> <xsl:value-of select="./details/shipper"/> </fo:block> <fo:block margin-left="4mm" font-size="8pt"> <xsl:value-of select="./product/name"/> </fo:block> <xsl:choose> <xsl:when test="./details/canTrack[text() = 'true']"> <fo:block margin-left="4mm" font-size="8pt" font-style="italic"> Denne forsendelsen kan spores </fo:block> </xsl:when> <xsl:otherwise> <fo:block margin-left="4mm" font-size="8pt" font-style="italic"> Denne forsendelsen kan ikke spores </fo:block> </xsl:otherwise> </xsl:choose> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block> <xsl:value-of select="./totalWithVat"/> </fo:block> </fo:table-cell> </fo:table-row> </xsl:template> <xsl:template match="item"> <fo:table-row> <fo:table-cell text-align="left"> <fo:block> <fo:block> <xsl:value-of select="./description/text()"/> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block> <xsl:value-of select="./units"/> <xsl:value-of select="./product/uom"/> </fo:block> </fo:table-cell> <fo:table-cell text-align="right"> <fo:block> <xsl:value-of select="./rateWithVat"/> </fo:block> </fo:table-cell> <xsl:if test="//items/item/discountWithVat"> <fo:table-cell text-align="right"> <fo:block> <xsl:value-of select="./totalDiscountWithVat"/> <!-- <xsl:choose> <xsl:when test="./absoluteDiscountWithVat"> (<xsl:value-of select="./absoluteDiscountWithVat"/>/stk) </xsl:when> <xsl:when test="./percentDiscount"> (<xsl:value-of select="./percentDiscount"/>%) </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> --> </fo:block> </fo:table-cell> </xsl:if> <fo:table-cell text-align="right"> <fo:block> <xsl:value-of select="./totalWithVat"/> </fo:block> </fo:table-cell> </fo:table-row> </xsl:template> <xsl:template match="vatBreakdown/rate"> <fo:table-row> <fo:table-cell padding-before="2mm" text-align="right"> <fo:block margin-right="3mm"> herav MVA <fo:inline text-transform="lowercase"> <xsl:value-of select="./class"/> </fo:inline> </fo:block> </fo:table-cell> <fo:table-cell padding-before="2mm" text-align="right"> <fo:block> <xsl:value-of select="./percent"/>% </fo:block> </fo:table-cell> <fo:table-cell padding-before="2mm" text-align="right"> <fo:block> <xsl:value-of select="./basis"/> </fo:block> </fo:table-cell> <fo:table-cell padding-before="2mm" text-align="right"> <fo:block> <xsl:value-of select="./amount"/> </fo:block> </fo:table-cell> </fo:table-row> </xsl:template> <xsl:template match="formattedAddress"> <xsl:apply-templates select="text()"/> </xsl:template> <xsl:template match="text()"> <xsl:call-template name="break"/> </xsl:template> <xsl:template name="break"> <xsl:param name="text" select="."/> <xsl:choose> <xsl:when test="contains($text, '
')"> <fo:block> <xsl:value-of select="substring-before($text, '
')"/> </fo:block> <xsl:call-template name="break"> <xsl:with-param name="text" select="substring-after($text, '
')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <fo:block> <xsl:value-of select="$text"/> </fo:block> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
CreditNoteXmlProvider
CustomsDeclarationXmlProvider
InvoiceXmlProvider
ReminderXmlProvider
SalesOrderXmlProvider