Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.70 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:template match="/"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="page" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"> <fo:region-body region-name="body" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="page"> <fo:flow flow-name="body"> <xsl:apply-templates select="data" /> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="data"> <xsl:param name="currency"> € </xsl:param>
  3.  
  4. <fo:table> <fo:table-column column-width="50%" /> <fo:table-column column-width="50%" /> <fo:table-body> <fo:table-row> <fo:table-cell font-size="10pt" padding="8pt" border-right="thin solid black"> <fo:block font-weight="bold" margin-bottom="8pt">SUPPLIER:</fo:block> <fo:block><xsl:value-of select="invoice_info/site_info/organization" /></fo:block> <fo:block><xsl:value-of select="invoice_info/site_info/address" /></fo:block> <fo:block><xsl:value-of select="invoice_info/site_info/city" /></fo:block> <fo:block margin-bottom="2pt"><xsl:value-of select="invoice_info/site_info/country" /></fo:block> <fo:block>ID: 123423423423</fo:block> <fo:block>Tax ID: 123423423423</fo:block> <fo:block margin-bottom="10pt">VAT ID: SI1231231231</fo:block>
  5.  
  6. <fo:table margin="5pt 0 5pt 0"> <fo:table-column column-width="100%" border-top="thin black solid" margin="5pt 0 5pt 0" /> <fo:table-body> <fo:table-row border-width="1px"> <fo:table-cell font-size="10pt"> <fo:block font-weight="bold" margin-bottom="2pt" margin-top="10pt" /> <fo:block>UniCredit Bank d.d.</fo:block> <fo:block>SWIFT: BACXSI22</fo:block> <fo:block>IBAN: SI56290001900030037</fo:block> <fo:block>SWIFT: BACXSI22</fo:block> <fo:block font-weight="bold" margin-bottom="2pt" /> <fo:block>Reference: <xsl:text> </xsl:text><xsl:value-of select="invoice/customer_id" /></fo:block> <fo:block>Payment method: <xsl:value-of select="invoice_info/pay_info/payment_method" /></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table>
  7.  
  8. </fo:table-cell> <fo:table-cell padding="8pt 0pt 0pt 25pt"> <fo:block> <fo:block font-weight="normal" text-align="left"> </fo:block>
  9.  
  10. <fo:table margin="10pt 0 0 0"> <fo:table-column column-width="100%" border-top="thin black solid" border-bottom="thin black solid" /> <fo:table-body> <fo:table-row border-width="1px"> <fo:table-cell font-size="10pt"> <fo:block font-weight="bold" margin-bottom="8pt" margin-top="10pt">CLIENT:</fo:block> <fo:block><xsl:value-of select="invoice_info/pay_info/first_name" /> <xsl:value-of select="invoice_info/pay_info/last_name" /></fo:block> <fo:block><xsl:value-of select="invoice_info/pay_info/address" /></fo:block> <fo:block><xsl:value-of select="invoice_info/pay_info/zip" /> <xsl:value-of select="invoice_info/pay_info/city" /></fo:block> <fo:block><xsl:value-of select="invoice_info/pay_info/country_iso" /></fo:block> <fo:block><xsl:value-of select="invoice_info/pay_info/phone" /></fo:block> <fo:block margin-bottom="10pt"><xsl:value-of select="invoice_info/pay_info/email" /></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table>
  11.  
  12. <fo:block font-weight="normal" text-align="left" margin="10pt 0 0 0" font-size="14pt"> Invoice No. </fo:block> <fo:block font-weight="bold" text-align="left" font-size="26pt"> 2017<xsl:value-of select="invoice/reference" /> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="8pt 0pt 8pt 8pt" number-columns-spanned="2"> <fo:table> <fo:table-column column-width="40%" /> <fo:table-column column-width="12%" /> <fo:table-column column-width="10%" /> <fo:table-column column-width="10%" /> <fo:table-column column-width="10%" /> <fo:table-column column-width="16%" /> <fo:table-body> <fo:table-row border-width="1px" font-weight="bold" background-color="#eeeeee"> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 12pt" text-align="left"> <fo:block>Name</fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0" text-align="right"> <fo:block text-align="right">Quantity</fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0" text-align="right"> <fo:block>Discount</fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0" text-align="right"> <fo:block>Amount</fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0" text-align="right"> <fo:block>Tax</fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 12pt 12pt 0" text-align="right"> <fo:block>Total</fo:block> </fo:table-cell> </fo:table-row> <xsl:for-each select="invoice/items"> <fo:table-row border-width="1px" border-bottom="thin solid black"> <fo:table-cell font-size="10pt" padding="12pt 0 12pt 12pt" text-align="left"> <fo:block><xsl:value-of select="name" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="12pt 0 12pt 0"> <fo:block text-align="right"><xsl:value-of select="quantity" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="12pt 0 12pt 0" text-align="right"> <fo:block><xsl:value-of select="discount_amount" /><xsl:text> </xsl:text><xsl:value-of select="$currency" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="12pt 0 12pt 0" text-align="right"> <fo:block><xsl:value-of select="amount_without_tax" /><xsl:text> </xsl:text> <xsl:value-of select="$currency" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="12pt 0 12pt 0" text-align="right"> <fo:block><xsl:value-of select="tax_amount" /><xsl:text> </xsl:text> <xsl:value-of select="$currency" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="12pt 12pt 12pt 0" text-align="right"> <fo:block><xsl:value-of select="amount" /><xsl:text> </xsl:text><xsl:value-of select="$currency" /></fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> </fo:table-body> </fo:table> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell padding="8pt"> <fo:block text-align="left">Note:</fo:block> </fo:table-cell> <fo:table-cell padding="8pt 0pt 0pt 25pt" border-left="thin solid black"> <fo:table> <fo:table-column column-width="60%" /> <fo:table-column column-width="40%" /> <fo:table-body> <fo:table-row border-width="1px"> <fo:table-cell font-size="10pt" padding="0pt 0pt 8pt 0pt" text-align="right" font-weight="bold"> <fo:block>Amount without tax: </fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="0pt 20pt 8pt 0pt" text-align="right"> <fo:block><xsl:value-of select="invoice/bill/total_amount_without_tax" /><xsl:text> </xsl:text><xsl:value-of select="$currency" /></fo:block> </fo:table-cell> </fo:table-row> <fo:table-row border-width="1px"> <fo:table-cell font-size="10pt" padding="0pt 0pt 8pt 0pt" text-align="right" font-weight="bold"> <fo:block>Tax amount: </fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="0pt 20pt 8pt 0pt" text-align="right"> <fo:block><xsl:value-of select="invoice/bill/total_tax_amount" /><xsl:text> </xsl:text><xsl:value-of select="$currency" /></fo:block> </fo:table-cell> </fo:table-row> <fo:table-row border-width="1px" border-top="thin solid black"> <fo:table-cell font-size="14pt" padding="8pt 0pt 8pt 0pt" text-align="right" font-weight="bold"> <fo:block>Invoice total: </fo:block> </fo:table-cell> <fo:table-cell font-size="16pt" padding="8pt 20pt 8pt 0pt" text-align="right"> <fo:block><xsl:value-of select="invoice/bill/total_amount" /><xsl:text> </xsl:text><xsl:value-of select="$currency" /></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:table-cell> </fo:table-row> <fo:table-row border-top="thin solid black" margin="10pt 0 0 0"> <fo:table-cell padding="8pt" number-columns-spanned="2"> <fo:table> <fo:table-column column-width="33.3%" /> <fo:table-column column-width="33.3%" /> <fo:table-column column-width="33.3%" /> <fo:table-body> <fo:table-row border-width="1px" font-weight="bold" color="#999999"> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 12pt" text-align="left"> <fo:block>Issued by:<xsl:text> </xsl:text><xsl:value-of select="invoice_info/site_info/organization" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0"> <fo:block text-align="center"><xsl:text> </xsl:text><xsl:value-of select="invoice_info/site_info/phone" /></fo:block> </fo:table-cell> <fo:table-cell font-size="10pt" padding="14pt 0 12pt 0" text-align="right"> <fo:block text-align="right">https://<xsl:value-of select="invoice_info/site_info/subdomain" />.flybilling.com</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table>
  13.  
  14. </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement