Norādītais vecais variants no patreizējās lapas atšķiras ar:
Abās pusēs iepriekšējo versiju Iepriekšējā versija Nākamā versija | Iepriekšējā versija | ||
lv:procedures [2020/09/03 11:07] marija alphalane 02.09.2020 begin |
lv:procedures [2020/10/27 19:06] marija ALG_rek_0610 |
||
---|---|---|---|
Rinda 8: | Rinda 8: | ||
exclude-result-prefixes="msxsl js fo"> | exclude-result-prefixes="msxsl js fo"> | ||
<xsl:output method="html"/> | <xsl:output method="html"/> | ||
+ | <xsl:decimal-format name="N" NaN="0" decimal-separator='.' grouping-separator=' ' /> | ||
<xsl:template match="/"> | <xsl:template match="/"> | ||
- | |||
<xsl:variable name="item_per_page">25</xsl:variable> | <xsl:variable name="item_per_page">25</xsl:variable> | ||
- | + | <xsl:variable name="eiro"> | |
- | + | <xsl:choose> | |
- | + | <xsl:when test="/documents/document/valuuta='LVL'"> | |
- | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | + | 1.42287181 |
- | + | </xsl:when> | |
- | <html> | + | <xsl:when test="/documents/document/valuuta=''"> |
- | + | 1.42287181 | |
- | <head> | + | </xsl:when> |
- | <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> | + | <xsl:when test="/documents/document/valuuta='EUR'"> |
- | <title>Rekins</title> | + | 0.702804 |
- | </head> | + | </xsl:when> |
- | <body class="body"> | + | <xsl:when test="/documents/document/valuuta!='EUR' and /documents/document/valuuta!='LVL'"> |
- | <xsl:variable name="disc"> | + | <xsl:value-of select="/documents/document/kurssbv1"/> |
- | <xsl:for-each select="/documents/document/rows/row[pross!='' or pross!='0']"> | + | </xsl:when> |
- | <xsl:value-of select="pross"/> | + | </xsl:choose> |
- | </xsl:for-each> | + | </xsl:variable> |
- | </xsl:variable> | + | <xsl:variable name="nauda"> |
- | <style> | + | |
- | .body2{ font-size: 12pt;} | + | |
- | .body{ font-size: 8pt;} | + | |
- | .bodywol{ font-size: 8pt;} | + | |
- | .bodybold{ font-size: 8pt; font-weight:900; text-align: left;} | + | |
- | .bodyboldt{ font-size: 8pt; border-bottom: 1px solid black;} | + | |
- | </style> | + | |
- | <xsl:variable name="nauda"> | + | |
<xsl:choose> | <xsl:choose> | ||
<xsl:when test="/documents/document/valuuta='LVL'">LVL</xsl:when> | <xsl:when test="/documents/document/valuuta='LVL'">LVL</xsl:when> | ||
Rinda 44: | Rinda 36: | ||
</xsl:choose> | </xsl:choose> | ||
</xsl:variable> | </xsl:variable> | ||
- | <table width="660px" align="center" cellpadding="0" cellspacing="0"> | + | <xsl:variable name="nauda2"> |
- | <tr> | + | <xsl:choose> |
- | <td> | + | <xsl:when test="/documents/document/valuuta='LVL'">EUR</xsl:when> |
- | <table width="660px" cellpadding="0" cellspacing="0"> | + | <xsl:when test="/documents/document/valuuta=''">EUR</xsl:when> |
- | <tr> | + | <xsl:when test="/documents/document/valuuta!='' and /documents/document!='LVL'">LVL</xsl:when> |
- | <td width="380" align="left" ><img alt="logo" height="70"><xsl:attribute name="src"><xsl:value-of select="/documents/footer/firma_logo"/></xsl:attribute></img></td> | + | </xsl:choose> |
- | <td width="280" class="body2" valign="bottom">Rēķins/<font size="-2">Invoice</font>: <xsl:value-of select="/documents/document/number"/><br /> | + | </xsl:variable> |
- | Datums/<font size="-2">Date</font>: <xsl:value-of select="concat(substring(/documents/document/aeg,1,2),'-',substring(/documents/document/aeg,4,2),'-',substring(/documents/document/aeg,7,4))"/><br /> | + | <xsl:variable name="rekina_summa"> |
- | Apmaksa/<font size="-2">Due date</font>: <xsl:value-of select="concat(substring(/documents/document/aeg2,1,2),'-',substring(/documents/document/aeg2,4,2),'-',substring(/documents/document/aeg2,7,4))"/><br /><br /> | + | <xsl:choose> |
- | </td> | + | <xsl:when test="$nauda='LVL'"> |
- | + | <xsl:value-of select="format-number((/documents/document/converted_tasuda div 100) * $eiro, '0.00')" /> | |
- | </tr> | + | </xsl:when> |
- | <tr> | + | <xsl:when test="$nauda='EUR'"> |
- | <td style="border-bottom:1px solid black; height:1px;" colspan="2"> </td> | + | <xsl:value-of select="format-number(/documents/document/converted_tasuda div 100, '0.00')" /> |
- | </tr> | + | </xsl:when> |
- | <tr> | + | <xsl:when test="$nauda!='LVL' or $nauda!='EUR'"> |
- | <td colspan="2" style="border-bottom:1px solid black;"> | + | <xsl:value-of select="format-number(/documents/kontakt/saldo div /documents/document/kurssbv1, '0.00')"/> |
- | <table width="660" cellpadding="0" cellspacing="0"> | + | </xsl:when> |
- | <tr> | + | </xsl:choose> |
- | <td class="body" width="140">Piegādātājs/<font size="-2">Supplier</font></td> | + | </xsl:variable> |
- | <td class="body" width="240"><xsl:value-of select="/documents/footer/firma_nimi"/></td> | + | <xsl:variable name="saldo"> |
- | <td class="body" width="140">Banka/<font size="-2">Bank</font></td> | + | <xsl:choose> |
- | <td class="body" width="140"><xsl:value-of select="/documents/footer/firma_pank"/></td> | + | <xsl:when test="$nauda='LVL' or $nauda='EUR'"> |
- | </tr> | + | <xsl:value-of select="format-number(/documents/kontakt/saldo, '0.00')"/> |
- | <tr> | + | </xsl:when> |
- | <td class="body">Juridiskā adrese/<font size="-2">Address</font></td> | + | <xsl:when test="$nauda!='LVL' or $nauda!='EUR'"> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_aadress"/></td> | + | <xsl:value-of select="format-number(/documents/kontakt/saldo div /documents/document/kurssbv1, '0.00')"/> |
- | <td class="body">S.W.I.F.T</td> | + | </xsl:when> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_swift"/></td> | + | </xsl:choose> |
- | </tr> | + | |
- | <tr> | + | </xsl:variable> |
- | <td class="body"><b> </b></td> | + | <xsl:variable name="parads"> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_aadress2"/></td> | + | <xsl:value-of select="format-number($saldo - $rekina_summa ,'0.00')"/> |
- | <td class="body">Konts/<font size="-2">Account</font></td> | + | </xsl:variable> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_iban"/></td> | + | <xsl:variable name="neapm_summa"> |
- | </tr> | + | <xsl:choose> |
- | <tr> | + | <xsl:when test="/documents/document/valuuta!=''"> |
- | <td class="body">Reģ. nr./<font size="-2">Reg.No.</font></td> | + | <xsl:value-of select="format-number($parads, '0.00')"/> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_regnr"/></td> | + | </xsl:when> |
- | <td class="body" width="140">Banka//<font size="-2">Bank</font></td> | + | <xsl:when test="/documents/document/valuuta=''"> |
- | <td class="body" width="140"><xsl:value-of select="'Citadeles banka AS'"/></td> | + | <xsl:value-of select="$parads"/> |
- | </tr> | + | </xsl:when> |
- | <tr> | + | </xsl:choose> |
- | <td class="body">PVN Reģ. nr./<font size="-2">VAT</font></td> | + | </xsl:variable> |
- | <td class="body"><xsl:value-of select="/documents/footer/firma_kmnr"/></td> | + | <xsl:variable name="atlaide"> |
- | <td class="body">S.W.I.F.T</td> | + | <xsl:choose><xsl:when test="sum(documents/document/rows/row[pross > 0]/pross) > 0">1</xsl:when> |
- | <td class="body"><xsl:value-of select="'PARXLV22'"/></td> | + | <xsl:otherwise>0</xsl:otherwise> |
- | </tr> | + | </xsl:choose> |
- | <tr> | + | </xsl:variable> |
- | <td class="body"> </td> | + | <xsl:variable name="atlaides_summa"> |
- | <td class="body"> </td> | + | <xsl:for-each select="/documents/document/rows/row[pross > 0]"> |
- | <td class="body">Konts/<font size="-2">Account</font></td> | + | <a_summa> |
- | <td class="body"><xsl:value-of select="'LV91PARX0017238520001'"/></td> | + | <xsl:value-of select="format-number(hind*kogus*pross div 100, '0.0000')"/> |
- | </tr> | + | </a_summa> |
- | </table> | + | </xsl:for-each> |
- | </td> | + | </xsl:variable> |
- | </tr> | + | |
- | <tr> | + | <script language="JavaScript" type="text/javascript"><![CDATA[ |
- | <td colspan="2" style="border-bottom:1px solid black; height:10px;"> </td> | + | if (document.getElementById('first')) { |
- | </tr> | + | document.write('<div class="pbreak"></div>'); |
- | <tr> | + | } else { |
- | <td colspan="2" style="border-bottom:1px solid black;"> | + | document.write('<div id="first"></div>'); |
- | <table width="660" cellpadding="0" cellspacing="0"> | + | } |
- | <tr> | + | ]]></script> |
- | <td class="body" width="140">Saņēmējs/<font size="-2">Client</font></td> | + | |
- | <td class="body" width="240"><xsl:value-of select="/documents/kontakt/nimi"/></td> | + | <html> |
- | <td class="body" width="140">Banka//<font size="-2">Bank</font></td> | + | <head> |
- | <td class="body" width="140"><xsl:value-of select="/documents/kontakt/pangaandmed/nimi"/></td> | + | <title><xsl:value-of select="/documents/language/arve_nr" /><!--Rēķins Nr.-->. <xsl:value-of select="/documents/document/number" /></title> |
- | </tr> | + | |
- | <tr> | + | <style type="text/css"> |
- | <td class="body" >Juridiskā adrese/<font size="-2">Address</font></td> | + | body { |
- | <td class="body"><xsl:value-of select="/documents/kontakt/aadress1"/></td> | + | text-align:center; |
- | <td class="body">S.W.I.F.T</td> | + | font-family:Century Gothic; |
- | <td class="body"><xsl:value-of select="/documents/kontakt/pangaandmed/swift"/></td> | + | font-size:10px; |
- | </tr> | + | } |
- | <tr> | + | |
- | <td class="body"><b> </b></td> | + | .container { |
- | <td class="body"><xsl:value-of select="/documents/kontakt/aadress2"/></td> | + | display:table; |
- | <td class="body">Konts/<font size="-2">Account</font></td> | + | text-align:left; |
- | <td class="body"><xsl:value-of select="/documents/kontakt/arveldusarve"/></td> | + | width:660px; |
- | </tr> | + | margin:auto; |
- | <tr> | + | } |
- | <td class="body">Reģ. nr./<font size="-2">Reg.No.</font></td> | + | |
- | <td class="body"><xsl:value-of select="/documents/kontakt/regnr"/></td> | + | .main_table { |
- | <td class="body"><b> </b></td> | + | width:660px; |
- | <td class="body"> </td> | + | border-collapse:collapse; |
- | </tr> | + | } |
- | <tr> | + | |
- | <td class="body">PVN Reģ. nr./<font size="-2">VAT</font></td> | + | .main_table th { |
- | <td class="body"><xsl:value-of select="/documents/kontakt/kmregnr"/></td> | + | font-size:14px; |
- | <td class="body"><b> </b></td> | + | font-family:Century Gothic; |
- | <td class="body"> </td> | + | font-weight:normal; |
- | </tr> | + | text-align:right; |
- | <tr> | + | padding:1px; |
- | <td colspan="4" style="border-bottom:0px solid black; height:10px;"> </td> | + | border:1px solid #B4B4B4; |
- | </tr> | + | } |
- | </table> | + | |
- | </td> | + | .main_table td { |
- | </tr> | + | font-size:10px; |
- | <tr> | + | font-family:Century Gothic; |
- | <td colspan="2" style="border-bottom:1px solid black; height:20px;"> </td> | + | padding:1px; |
- | </tr> | + | border:1px solid #B4B4B4; |
- | <tr> | + | } |
- | <td colspan="2"> | + | |
- | <table width="660" cellpadding="0" cellspacing="0"> | + | .main_table td.nos, .main_table td.kods, .main_table th.nos, .main_table th.kods { |
- | <tr> | + | text-align:left; |
- | <td class="bodyboldt" height="20">Nosaukums<br /><font size="-2">Description</font></td> | + | } |
- | <td class="bodyboldt">Skaits<br /><font size="-2">Quantity</font></td> | + | |
- | <td class="bodyboldt">Mērv.<br /><font size="-2">Unit</font></td> | + | .main_table tr.cont { |
- | + | height:16px; | |
- | <td class="bodyboldt">Cena<br /><font size="-2">Price</font></td> | + | } |
- | <xsl:choose> | + | |
- | <xsl:when test="$disc!=''"> | + | .left { |
- | <td class="bodyboldt">%</td> | + | float:left; |
- | <td class="bodyboldt">Cena ar atl.<br /><font size="-2">Price with %</font></td> | + | padding:30px 0px 0px 30px; |
- | </xsl:when> | + | font-size:14px; |
- | </xsl:choose> | + | } |
- | <td class="bodyboldt" align="right">Summa<br /><font size="-2">Amount</font> </td> | + | |
- | <td class="bodyboldt" align="right">PVN<br /><font size="-2">VAT</font> </td> | + | .right { |
- | + | float:right; | |
- | </tr> | + | text-align:right; |
- | <xsl:for-each select="/documents/document/rows/row"> | + | font-size:14px; |
- | <tr> | + | } |
- | <xsl:variable name="sum_check"><xsl:value-of select="format-number(hind_ale div 100,'0.00')"/></xsl:variable> | + | .left2 { |
- | <xsl:choose> | + | float:left; |
- | <xsl:when test="$sum_check!='NaN'"> | + | text-align:left; |
- | <td class="body" height="20"><xsl:value-of select="keelne_seletus"/></td> | + | font-size:14px; |
- | <td width="60" class="body"><xsl:value-of select="kogus"/></td> | + | } |
- | <td width="40" class="body"><xsl:value-of select="yhik"/></td> | + | |
- | + | .right_small { | |
- | <td width="60" class="body"><xsl:value-of select="format-number(hind,'0.00')"/></td> | + | float:right; |
- | <xsl:choose> | + | text-align:right; |
- | <xsl:when test="$disc!=''"> | + | } |
- | <td width="40" class="body"><xsl:value-of select="pross"/></td> | + | |
- | <td width="60" class="body"><xsl:value-of select="format-number(hind_ale div 100,'0.00')"/></td> | + | .spacer { |
- | </xsl:when> | + | height:20px; |
- | </xsl:choose> | + | clear:both; |
- | <td width="80" class="body" align="right"><xsl:value-of select="format-number(converted_summa div 100,'0.00')"/></td> | + | } |
- | <td width="40" class="body" align="right"><xsl:value-of select="format-number(kmkokku div 100,'0.00')"/></td> | + | |
- | + | .divider { | |
- | </xsl:when> | + | clear:both; |
- | <xsl:when test="$sum_check='NaN'"> | + | } |
- | <td class="body" height="20"><xsl:value-of select="keelne_seletus"/></td> | + | |
- | <td width="40" class="body"> </td> | + | .pbreak { |
- | <td width="60" class="body"> </td> | + | page-break-after:always; |
- | <td width="60" class="body"> </td> | + | } |
- | <xsl:choose> | + | |
- | <xsl:when test="$disc!=''"> | + | h4.pb { |
- | <td width="40" class="body"> </td> | + | display:none; |
- | <td width="60" class="body"> </td> | + | } |
- | </xsl:when> | + | </style> |
- | </xsl:choose> | + | </head> |
- | <td width="80" class="body" align="right"> </td> | + | <body> |
- | <td width="40" class="body" align="right"> </td> | + | <div class="container"> |
- | + | <div class="spacer" style="height:0px;"></div> | |
- | </xsl:when> | + | <div style="float:left;" class="left2" valign="bottom"> |
- | </xsl:choose> | + | <IMG height="90" alt="Logo"><xsl:attribute name="SRC" ><xsl:value-of select="/documents/footer/firma_logo"/></xsl:attribute></IMG> |
- | </tr> | + | </div> |
- | </xsl:for-each> | + | <div class="right"> |
- | + | <br /> | |
- | <xsl:for-each select="/documents/kmkoodid/kmkood"> | + | <xsl:choose><!--Rēķins Nr.--> |
- | <tr> | + | <xsl:when test="/documents/document/tingimus='K' and /documents/document/keel=''"><xsl:value-of select="/documents/document/maksetingimus_nimi" /> Nr. </xsl:when> |
- | <xsl:choose> | + | <xsl:when test="/documents/document/tingimus='K' and /documents/document/keel!=''">Credit note no. </xsl:when> |
- | <xsl:when test="$disc!=''"> | + | <xsl:when test="/documents/document/keel=''">Rēķins Nr. </xsl:when> |
- | <td width="40" class="body" style="border-top:1px solid black;"> </td> | + | <xsl:otherwise><xsl:value-of select="/documents/language/arve_nr" />.</xsl:otherwise></xsl:choose><xsl:value-of select="/documents/document/number" /><br /> |
- | <td width="60" class="body" style="border-top:1px solid black;"> </td> | + | <xsl:choose><!--Kreditē rēķinu Nr.--> |
- | </xsl:when> | + | <xsl:when test="/documents/document/tingimus='K' and /documents/document/keel=''">Kreditē rēķinu Nr. <xsl:value-of select="/documents/document/kredarve" /><br /></xsl:when> |
- | </xsl:choose> | + | <xsl:when test="/documents/document/tingimus='K' and /documents/document/keel!=''">Credited invoice no. <xsl:value-of select="/documents/document/kredarve" /><br /></xsl:when> |
- | + | </xsl:choose> | |
- | <td colspan="4" class="body" align="right" style="border-top:1px solid black;"> | + | <xsl:choose><!--Datums--> |
- | <xsl:choose> | + | <xsl:when test="/documents/document/keel=''">Datums</xsl:when> |
- | <xsl:when test="km='8'">PVN aprēķināts pie līguma noslēgšanas/<font size="-2">VAT paid by closing contract</font></xsl:when> | + | <xsl:otherwise><xsl:value-of select="/documents/language/aeg" /></xsl:otherwise></xsl:choose>:  |
- | <xsl:when test="km='11'">Ar PVN neapliekamā summa/<font size="-2">VAT free allowance</font></xsl:when> | + | <xsl:variable name="day" select="substring(/documents/document/aeg_date,1,2)" /> |
- | <xsl:when test="km='1' or km='0'">Ar PVN (<xsl:value-of select="ilmakm"/>%) apliekamā summa/<font size="-2">VAT (<xsl:value-of select="ilmakm"/>%) sum</font></xsl:when> | + | <xsl:variable name="month" select="substring(/documents/document/aeg_date,4,2)" /> |
- | <xsl:when test="km='10' or km='9'">VAT reverse charge</xsl:when> | + | <xsl:variable name="year" select="substring(/documents/document/aeg_date,7,4)" /> |
- | <xsl:otherwise>Ar PVN (<xsl:value-of select="ilmakm"/>%) apliekamā summa/<font size="-2">VAT (<xsl:value-of select="ilmakm"/>%) sum</font></xsl:otherwise> | + | <xsl:variable name="menesis"> |
- | </xsl:choose> | + | <xsl:choose> |
- | (<xsl:value-of select="/documents/document/valuuta"/>)</td> | + | <xsl:when test="/documents/document/keel=''"> |
- | <td width="80" class="body" align="right" style="border-top:1px solid black;"><xsl:value-of select="format-number(summa div 100,'0.00')"/></td> | + | <xsl:if test="$month='01'">Janvāris</xsl:if> |
- | <td width="40" class="body" style="border-top:1px solid black;"> </td> | + | <xsl:if test="$month='02'">Februāris</xsl:if> |
- | </tr> | + | <xsl:if test="$month='03'">Marts</xsl:if> |
- | </xsl:for-each> | + | <xsl:if test="$month='04'">Aprīlis</xsl:if> |
- | <xsl:for-each select="/documents/kmkoodid/kmkood[summakm!='0']"> | + | <xsl:if test="$month='05'">Maijs</xsl:if> |
- | <tr> | + | <xsl:if test="$month='06'">Jūnijs</xsl:if> |
- | <xsl:choose> | + | <xsl:if test="$month='07'">Jūlijs</xsl:if> |
- | <xsl:when test="$disc!=''"> | + | <xsl:if test="$month='08'">Augusts</xsl:if> |
- | <td width="40" class="body"> </td> | + | <xsl:if test="$month='09'">Septembris</xsl:if> |
- | <td width="60" class="body"> </td> | + | <xsl:if test="$month='10'">Oktobris</xsl:if> |
- | </xsl:when> | + | <xsl:if test="$month='11'">Novembris</xsl:if> |
- | </xsl:choose> | + | <xsl:if test="$month='12'">Decembris</xsl:if> |
- | + | </xsl:when> | |
- | <td colspan="4" class="body" align="right"> | + | <xsl:otherwise> |
- | Pievienotās vērtības nodoklis (<xsl:value-of select="ilmakm"/>%)/<font size="-2">VAT</font> (<xsl:value-of select="ilmakm"/>%) | + | <xsl:if test="$month='01'">January</xsl:if> |
- | </td> | + | <xsl:if test="$month='02'">February</xsl:if> |
- | <td width="80" class="body" align="right"><xsl:value-of select="format-number(summakm div 100,'0.00')"/></td> | + | <xsl:if test="$month='03'">March</xsl:if> |
- | <td width="40" class="body"> </td> | + | <xsl:if test="$month='04'">April</xsl:if> |
- | </tr> | + | <xsl:if test="$month='05'">May</xsl:if> |
- | </xsl:for-each> | + | <xsl:if test="$month='06'">June</xsl:if> |
- | <tr> | + | <xsl:if test="$month='07'">July</xsl:if> |
- | <xsl:choose> | + | <xsl:if test="$month='08'">August</xsl:if> |
- | <xsl:when test="$disc!=''"> | + | <xsl:if test="$month='09'">September</xsl:if> |
- | <td width="40" class="body" style="border-bottom:1px solid black; height:20px;"> </td> | + | <xsl:if test="$month='10'">October</xsl:if> |
- | <td width="60" class="body" style="border-bottom:1px solid black; height:20px;"> </td> | + | <xsl:if test="$month='11'">November</xsl:if> |
- | </xsl:when> | + | <xsl:if test="$month='12'">December</xsl:if> |
- | </xsl:choose> | + | </xsl:otherwise> |
- | + | </xsl:choose> | |
- | <td colspan="4" class="body" align="right" style="border-bottom:1px solid black; height:20px;">Summa ar PVN/<font size="-2">Total with VAT</font> (<xsl:value-of select="/documents/document/valuuta"/>)</td> | + | </xsl:variable> |
- | <td width="80" class="body" align="right" style="border-bottom:1px solid black; height:20px;"><xsl:value-of select="format-number(/documents/document/converted_tasuda div 100,'0.00')"/></td> | + | <xsl:choose> |
- | <td width="40" class="body" style="border-bottom:1px solid black; height:20px;"> </td> | + | <xsl:when test="/documents/document/keel=''"><xsl:value-of select="concat($year,'. gada',' ',$day,'. ',$menesis)" /></xsl:when> |
- | </tr> | + | <xsl:otherwise><xsl:value-of select="concat($menesis,' ',$day,', ',$year)" /></xsl:otherwise> |
- | <tr> | + | </xsl:choose> |
- | <xsl:choose> | + | |
- | <xsl:when test="$disc!=''"> | + | <xsl:choose> |
- | <td width="40" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:when test="/documents/document/tellimusenr!=''"> |
- | <td width="60" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <br /> |
- | </xsl:when> | + | <xsl:choose> |
- | </xsl:choose> | + | <xsl:when test="/documents/document/keel=''">Saskaņā ar priekšapmaksas rēķinu </xsl:when> |
- | + | <xsl:otherwise>According to proforma invoice </xsl:otherwise> | |
- | <td colspan="4" class="body" align="right" style="border-bottom:0px solid black; height:20px;"><b>Summa apmaksai/<font size="-2">To Pay</font> (<xsl:value-of select="/documents/document/valuuta"/>)</b></td> | + | </xsl:choose> |
- | <td width="80" class="body" align="right" style="border-bottom:0px solid black; height:20px;"><b><xsl:value-of select="format-number(/documents/document/converted_tasuda div 100,'0.00')"/></b></td> | + | <xsl:value-of select="/documents/document/tellimusenr" /> |
- | <td width="40" class="body"> </td> | + | </xsl:when> |
- | </tr> | + | </xsl:choose> |
- | <!--<tr> | + | |
- | <td colspan="6" class="body" align="left" style="border-bottom:0px solid black; height:20px;">Apmaksas termiņš:   <xsl:value-of select="concat(substring(/documents/document/aeg2,1,2),'-',substring(/documents/document/aeg2,4,2),'-',substring(/documents/document/aeg2,7,4))"/></td> | + | </div> |
- | + | ||
- | <xsl:choose> | + | <div class="spacer"></div> |
- | <xsl:when test="$disc!=''"> | + | |
- | <td width="40" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <div class="left2" valign="top"> |
- | <td width="60" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:if test="/documents/kontakt/kontakt!=''"><xsl:value-of select="/documents/kontakt/kontakt" /><br /></xsl:if> |
- | </xsl:when> | + | <xsl:value-of select="/documents/document/klient_nimi" /><br /> |
- | </xsl:choose> | + | <xsl:if test="/documents/document/aadress1!=''"><xsl:value-of select="/documents/document/aadress1" /><br /></xsl:if> |
- | </tr> | + | <xsl:if test="/documents/document/aadress2!=''"><xsl:value-of select="/documents/document/aadress2" /></xsl:if> |
- | <tr> | + | <xsl:if test="/documents/document/aadress3!=''"> <xsl:value-of select="/documents/document/aadress3" /><br /></xsl:if> |
- | <td colspan="6" class="body" align="left" style="border-bottom:0px solid black; height:20px;">Summa vārdiem: <xsl:value-of select="js:numText(string(format-number(/documents/document/converted_tasuda div 100, '0.00')),string($nauda))" /></td> | + | <xsl:choose> |
- | + | <xsl:when test="/documents/document/keel=''">Reģ. Nr.: </xsl:when> | |
- | <xsl:choose> | + | <xsl:otherwise>Reg. No.: </xsl:otherwise> |
- | <xsl:when test="$disc!=''"> | + | </xsl:choose> |
- | <td width="40" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:value-of select="/documents/kontakt/regnr" /><br /> |
- | <td width="60" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:choose> |
- | </xsl:when> | + | <xsl:when test="/documents/document/keel=''">PVN Reģ. Nr.: </xsl:when> |
- | </xsl:choose> | + | <xsl:otherwise>VAT Reg. No.: </xsl:otherwise> |
- | </tr>--> | + | </xsl:choose> |
- | <tr> | + | <xsl:value-of select="/documents/kontakt/kmregnr" /><br /> |
- | <td colspan="6" class="body" align="left" style="border-bottom:0px solid black; height:20px;">Pusēm vienojoties, rēķins sagatavots elektroniski un derīgs bez paraksta</td> | + | <xsl:choose> |
- | + | <xsl:when test="/documents/document/keel=''">Banka: </xsl:when> | |
- | <xsl:choose> | + | <xsl:otherwise>Bank: </xsl:otherwise> |
- | <xsl:when test="$disc!=''"> | + | </xsl:choose> |
- | <td width="40" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:value-of select="/documents/kontakt/pank" /><br /> |
- | <td width="60" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:choose> |
- | </xsl:when> | + | <xsl:when test="/documents/document/keel=''">Konta Nr.: </xsl:when> |
- | </xsl:choose> | + | <xsl:otherwise>Account No.: </xsl:otherwise> |
- | </tr> | + | </xsl:choose> |
- | <tr> | + | <xsl:value-of select="/documents/kontakt/arveldusarve" /><br /> |
- | <td colspan="6" class="body" align="left" style="border-bottom:0px solid black; height:20px;">As agreed by parties, invoices ar issued electronically and valid without signature</td> | + | <xsl:choose> |
- | + | <xsl:when test="/documents/kontakt/lahaadress2!=''"> | |
- | <xsl:choose> | + | <xsl:choose> |
- | <xsl:when test="$disc!=''"> | + | <xsl:when test="/documents/document/keel=''">Piegādes adrese: </xsl:when> |
- | <td width="40" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | <xsl:otherwise>Delivery address: </xsl:otherwise> |
- | <td width="60" class="body" style="border-bottom:0px solid black; height:20px;"> </td> | + | </xsl:choose> |
- | </xsl:when> | + | <xsl:value-of select="/documents/kontakt/lahaadress2" /><br /> |
- | </xsl:choose> | + | </xsl:when> |
- | </tr> | + | </xsl:choose> |
- | </table> | + | </div> |
- | </td> | + | |
- | </tr> | + | <div class="right"> |
- | </table> | + | <xsl:value-of select="/documents/footer/firma_nimi" /><br /> |
- | </td> | + | <xsl:if test="/documents/footer/firma_aadress!=''"><xsl:value-of select="/documents/footer/firma_aadress" /><br /></xsl:if> |
- | </tr> | + | <xsl:if test="/documents/footer/firma_aadress2!=''"><xsl:value-of select="/documents/footer/firma_aadress2" /></xsl:if> |
- | </table> | + | <xsl:if test="/documents/footer/firma_aadress3!=''"> <xsl:value-of select="/documents/footer/firma_aadress3" /><br /></xsl:if> |
- | </body> | + | <xsl:choose> |
+ | <xsl:when test="/documents/document/keel=''">Reģ. #: </xsl:when> | ||
+ | <xsl:otherwise>Reg. #: </xsl:otherwise> | ||
+ | </xsl:choose><!--Reģ. Nr--><xsl:value-of select="/documents/footer/firma_regnr" /><br /> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">PVN Reģ. #: </xsl:when> | ||
+ | <xsl:otherwise>VAT Reg. #: </xsl:otherwise> | ||
+ | </xsl:choose><!--PVN Reģ. Nr--><xsl:value-of select="/documents/footer/firma_kmnr" /><br /> | ||
+ | </div> | ||
+ | |||
+ | <div class="spacer" style="height:60px;"></div> | ||
+ | |||
+ | <table class="main_table" height="380" cellspacing="0" cellpadding="0"> | ||
+ | <tr class="cont"> | ||
+ | <th class="kods" width="100"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Kods</xsl:when> | ||
+ | <xsl:otherwise>Item</xsl:otherwise> | ||
+ | </xsl:choose><!--Kods--></th> | ||
+ | <th class="nos" width="300"><!--Nosaukums--> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Nosaukums</xsl:when> | ||
+ | <xsl:otherwise>Description</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </th> | ||
+ | <th> <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Mērv.</xsl:when> | ||
+ | <xsl:otherwise>Unit</xsl:otherwise> | ||
+ | </xsl:choose><!--Mērvienība--></th> | ||
+ | <th> <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Daudz.</xsl:when> | ||
+ | <xsl:otherwise>Qty total</xsl:otherwise> | ||
+ | </xsl:choose><!--Daudz.--></th> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Atlaide</xsl:when> | ||
+ | <xsl:otherwise>Discount</xsl:otherwise> | ||
+ | </xsl:choose><!--Atlaide--></th> | ||
+ | </xsl:if> | ||
+ | |||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Cena <xsl:value-of select="$nauda"/></xsl:when> | ||
+ | <xsl:otherwise>Price <xsl:value-of select="$nauda"/></xsl:otherwise> | ||
+ | </xsl:choose></th> | ||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Summa <xsl:value-of select="$nauda"/></xsl:when> | ||
+ | <xsl:otherwise>Total <xsl:value-of select="$nauda"/></xsl:otherwise> | ||
+ | </xsl:choose></th> | ||
+ | </tr> | ||
+ | | ||
+ | <xsl:for-each select="/documents/document/rows/row"> | ||
+ | |||
+ | <tr class="cont"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="artikkel!=''"> | ||
+ | <td class="kods" width="100"><xsl:value-of select="artikkel" /></td> | ||
+ | <td class="nos" width="250"><xsl:value-of disable-output-escaping="yes" select="keelne_seletus" /></td> | ||
+ | <td align="center"><xsl:value-of select="yhik" /></td> | ||
+ | <td align="center"><xsl:value-of select="kogus" /></td> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <td class="atl"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="pross!=''"><xsl:value-of select="pross" /> %</xsl:when> | ||
+ | <xsl:otherwise> </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </xsl:if> | ||
+ | <td align="right"><xsl:value-of select="format-number((converted_hind) div 100,'0.00')"/></td> | ||
+ | <td align="right"><xsl:value-of select="format-number((converted_summa) div 100,'0.00')" /></td> | ||
+ | </xsl:when> | ||
+ | <xsl:otherwise> | ||
+ | <td> </td> | ||
+ | <td class="nos" width="250"><xsl:value-of disable-output-escaping="yes" select="keelne_seletus" /></td> | ||
+ | <td> </td> | ||
+ | <td> </td> | ||
+ | <td> </td> | ||
+ | <td> </td> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <td> </td> | ||
+ | </xsl:if> | ||
+ | </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </tr> | ||
+ | |||
+ | <xsl:if test="((position() mod $item_per_page)=0) and (position()!=last())"> | ||
+ | <tr><td colspan="6" style="border-width:0px;"> </td></tr> | ||
+ | <xsl:text disable-output-escaping="yes"></table></xsl:text> | ||
+ | <div style="text-align:right;"><!--Turpinājums-->...</div> | ||
+ | <div style="text-align:center; margin-left:10px; margin-top:215px; width:35px; height:29px; #height:37px; border:1px solid #000000; padding:8px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="floor((position()+1) div $item_per_page)" />  | ||
+ | </div> | ||
+ | <xsl:text disable-output-escaping="yes"></div></xsl:text> | ||
+ | |||
+ | <div class="pbreak"></div> | ||
+ | |||
+ | <xsl:text disable-output-escaping="yes"><div class="container"></xsl:text> | ||
+ | <div style="text-align:right; padding-bottom:5px;"> | ||
+ | <xsl:value-of select="floor((position()+1) div $item_per_page)+1" /> | ||
+ | <xsl:text>/</xsl:text> | ||
+ | <xsl:value-of select="ceiling(/documents/document/ridu div $item_per_page)" /> | ||
+ | </div> | ||
+ | <xsl:text disable-output-escaping="yes"><table class="main_table" height="740" cellspacing="0" cellpadding="0"></xsl:text> | ||
+ | <tr class="cont"> | ||
+ | <th class="kods" width="100"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Kods</xsl:when> | ||
+ | <xsl:otherwise>Item</xsl:otherwise> | ||
+ | </xsl:choose><!--Kods--></th> | ||
+ | <th class="nos" width="300"><!--Nosaukums--> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Nosaukums</xsl:when> | ||
+ | <xsl:otherwise>Description</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </th> | ||
+ | <th> <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Mērv.</xsl:when> | ||
+ | <xsl:otherwise>Unit</xsl:otherwise> | ||
+ | </xsl:choose><!--Mērvienība--></th> | ||
+ | <th> <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Daudz.</xsl:when> | ||
+ | <xsl:otherwise>Qty total</xsl:otherwise> | ||
+ | </xsl:choose><!--Daudz.--></th> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Atlaide</xsl:when> | ||
+ | <xsl:otherwise>Discount</xsl:otherwise> | ||
+ | </xsl:choose><!--Atlaide--></th> | ||
+ | </xsl:if> | ||
+ | |||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Cena <xsl:value-of select="$nauda"/></xsl:when> | ||
+ | <xsl:otherwise>Price <xsl:value-of select="$nauda"/></xsl:otherwise> | ||
+ | </xsl:choose></th> | ||
+ | <th><xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Summa <xsl:value-of select="$nauda"/></xsl:when> | ||
+ | <xsl:otherwise>Total <xsl:value-of select="$nauda"/></xsl:otherwise> | ||
+ | </xsl:choose></th> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | |||
+ | <xsl:if test="position()=last()"> | ||
+ | <tr><td colspan="6" style="border-width:0px;"> </td></tr> | ||
+ | </xsl:if> | ||
+ | |||
+ | </xsl:for-each> | ||
+ | |||
+ | </table> | ||
- | </html> | + | <table class="main_table" cellspacing="0" cellpadding="0"> |
- | </xsl:template> | + | <tr><td style="text-align:left; border-width:0px;"><xsl:value-of select="documents/document/kommentaar"/></td></tr> |
+ | </table> | ||
- | <msxsl:script language="JScript" implements-prefix="js"><![CDATA[ | + | <table class="main_table" height="260" cellspacing="0" cellpadding="0"> |
- | var cipari=['','viens ','divi ','trīs ','četri ','pieci ','seši ','septiņi ','astoņi ','deviņi ']; | + | <tr style="height:220px;"> |
+ | <td style="text-align:left; border-width:0px;"> | ||
+ | |||
+ | <div style="border:solid #B4B4B4; border-width:2px 0px 2px 0px; display:table; width:660px;"> | ||
+ | |||
+ | <div style="float:left; width:350px;" valign="top" align="left"> | ||
+ | <table width="100%" border="0" cellapdding="0" cellspacing="0" align="left"> | ||
+ | <tr> | ||
+ | <td align="left" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="$nauda='LVL' or $nauda='EUR'"> | ||
+ | <xsl:value-of select="js:numText(string(format-number((/documents/document/converted_tasuda div 100)-(/documents/document/ettemaks), '0.00', 'N')),string($nauda))" /></xsl:when> | ||
+ | </xsl:choose> | ||
+ | </xsl:when> | ||
+ | <xsl:otherwise> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="$nauda='LVL' or $nauda='EUR'"> | ||
+ | <xsl:value-of select="js:numText(string(format-number(/documents/document/converted_tasuda div 100, '0.00', 'N')),string($nauda))" /></xsl:when> | ||
+ | </xsl:choose> | ||
+ | </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </xsl:when> | ||
+ | <xsl:when test="/documents/document/keel!=''"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="$nauda='LVL' or $nauda='EUR'"> | ||
+ | <xsl:value-of select="js:numTextEng(string(format-number((/documents/document/converted_tasuda div 100)-(/documents/document/ettemaks), '0.00')),string($nauda))" /> | ||
+ | </xsl:when> | ||
+ | </xsl:choose> | ||
+ | </xsl:when> | ||
+ | <xsl:otherwise> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="$nauda='LVL' or $nauda='EUR'"> | ||
+ | <xsl:value-of select="js:numTextEng(string(format-number((/documents/document/converted_tasuda div 100), '0.00')),string($nauda))" /></xsl:when> | ||
+ | </xsl:choose> | ||
+ | </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </xsl:when> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <xsl:for-each select="/documents/kmkoodid/kmkood"> | ||
+ | <tr> | ||
+ | <td align="left" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="km='9'"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel!=''">Article 138 (1) of the EU VAT Directive (2006/112/EC)</xsl:when> | ||
+ | <xsl:otherwise>Direktīvas 2006/112/EK 138. panta 1. punkts</xsl:otherwise> | ||
+ | </xsl:choose><!--Summa--><br /> | ||
+ | </xsl:when> | ||
+ | <xsl:when test="km!='9'"> | ||
+ |   | ||
+ | </xsl:when> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:for-each> | ||
+ | <tr> | ||
+ | <td align="left" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Izrakstīja:</xsl:when> | ||
+ | <xsl:otherwise>Salesman:</xsl:otherwise> | ||
+ | </xsl:choose><!--Izrakstīja--> <xsl:value-of select="/documents/document/myyja_nimi" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </div> | ||
+ | |||
+ | <div style="float:left; width:150px; text-align:right;"> | ||
+ | <table width="100%" border="0" cellapdding="0" cellspacing="0"> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Atlaides summa:</xsl:when> | ||
+ | <xsl:otherwise>Discount total:</xsl:otherwise> | ||
+ | </xsl:choose><!--Kopējā summa--> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Summa bez PVN:</xsl:when> | ||
+ | <xsl:otherwise>Total:</xsl:otherwise> | ||
+ | </xsl:choose><!--Summa--> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <xsl:for-each select="/documents/kmkoodid/kmkood"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">PVN: <xsl:value-of select="ilmakm" />%:</xsl:when> | ||
+ | <xsl:otherwise>VAT <xsl:value-of select="ilmakm" />%:</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:for-each> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Kopā ar PVN:</xsl:when> | ||
+ | <xsl:otherwise>Total with VAT:</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <xsl:if test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Priekšapmaksa:<xsl:value-of select="format-number(/documents/document/ettemaks div (/documents/document/converted_tasuda div 10000), '0.00')" /> %:</xsl:when> | ||
+ | <xsl:otherwise>Prepayment:<xsl:value-of select="format-number(/documents/document/ettemaks div (/documents/document/converted_tasuda div 10000), '0.00')" /> %:</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | <xsl:if test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Summa apmaksai:</xsl:when> | ||
+ | <xsl:otherwise>Sum To pay:</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | </table> | ||
+ | </div> | ||
+ | |||
+ | <div class="right_small"> | ||
+ | <table width="100%" border="0" cellapdding="0" cellspacing="0"> | ||
+ | <xsl:if test="$atlaide!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number(sum(msxsl:node-set($atlaides_summa)/a_summa),'0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number(/documents/document/kokku,'0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <xsl:for-each select="/documents/kmkoodid/kmkood"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number(summakm div 100,'0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:for-each> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number(/documents/document/converted_tasuda div 100,'0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <xsl:if test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number(/documents/document/ettemaks, '0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | <xsl:if test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <tr> | ||
+ | <td width="50%" align="right" style="border-width: 0px 0px 0px 0px;"> | ||
+ | <xsl:value-of select="format-number((/documents/document/converted_tasuda div 100) - /documents/document/ettemaks, '0.00')" /> <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | </table> | ||
+ | </div> | ||
+ | |||
+ | <div class="spacer"></div> | ||
+ | |||
+ | <div style="float:left; width:350px;" > | ||
+ | <xsl:choose><xsl:when test="/documents/document/keel=''">Banka: </xsl:when><xsl:otherwise>Bank: </xsl:otherwise></xsl:choose><xsl:value-of select="/documents/footer/firma_pank" /><br /> | ||
+ | <xsl:choose><xsl:when test="/documents/document/keel=''">Bankas kods: </xsl:when><xsl:otherwise>Bank SWIFT: </xsl:otherwise></xsl:choose><xsl:value-of select="/documents/footer/firma_swift" /><br /> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Bankas konts:</xsl:when> | ||
+ | <xsl:otherwise>Bank account:</xsl:otherwise> | ||
+ | </xsl:choose><!--Konts--> <xsl:value-of select="/documents/footer/firma_aa" /> | ||
+ | </div> | ||
+ | |||
+ | <div style="float:left; width:150px; text-align:right;"> | ||
+ | <!--<div style="padding-top:3px;"> | ||
+ | <div style="padding-top:3px;"></div> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Kopā apmaksai:</xsl:when> | ||
+ | <xsl:otherwise>Total:</xsl:otherwise> | ||
+ | </xsl:choose></div>--> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Apmaksas termiņš:</xsl:when> | ||
+ | <xsl:otherwise>Due date:</xsl:otherwise> | ||
+ | </xsl:choose><!--Apmaksas termiņš--> | ||
+ | </div> | ||
+ | |||
+ | <div class="right_small" width="130px"> | ||
+ | <table width="100%" cellpadding="1" cellspacing="1"> | ||
+ | <!-- <xsl:if test="$saldo > $rekina_summa"> | ||
+ | <tr> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:0px solid #000000;" width="50%"> | ||
+ |   | ||
+ | </td> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:2px solid #000000;"> | ||
+ | <xsl:value-of select="$neapm_summa" />  | ||
+ | <xsl:value-of select="$nauda" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </xsl:if> | ||
+ | <tr> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:0px solid #000000;" width="50%"> | ||
+ |   | ||
+ | </td> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:2px solid #000000;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/ettemaks!='' and /documents/document/ettemaks!=0"> | ||
+ | <xsl:value-of select="format-number((/documents/document/converted_tasuda div 100)-(/documents/document/ettemaks), '0.00')" /> | ||
+ |   | ||
+ | <xsl:value-of select="$nauda" /> | ||
+ | </xsl:when> | ||
+ | <xsl:otherwise> | ||
+ | <xsl:value-of select="format-number((/documents/document/converted_tasuda div 100) + $parads, '0.00')" />  | ||
+ | <xsl:value-of select="$nauda" /> | ||
+ | </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </td> | ||
+ | </tr>--> | ||
+ | <tr> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:0px solid #000000;" width="50%"> | ||
+ |   | ||
+ | </td> | ||
+ | <td style="padding:2px; margin-bottom:5px; border:2px solid #000000;" align="right"> | ||
+ | <xsl:value-of select="/documents/document/aeg2_date" /> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | </div> | ||
+ | |||
+ | </div> | ||
+ | <!--<xsl:if test="$neapm_summa>$rekina_summa"> | ||
+ | <div style="clear:both; padding:5px 0px 0px 0px; font-size:12px; font-weight:bold;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/valuuta=''"> | ||
+ | Neapmaksāto rēķinu kopsumma: <xsl:value-of select="format-number(/documents/kontakt/saldo, '0.00')"/> <xsl:value-of select="$nauda"/><br /> | ||
+ | Neapmaksāto rēķinu kopsumma: <xsl:value-of select="format-number(/documents/kontakt/saldo div $eiro, '0.00')"/> <xsl:value-of select="$nauda2"/><br /> | ||
+ | </xsl:when> | ||
+ | <xsl:when test="/documents/document/valuuta!=''"> | ||
+ | Neapmaksāto rēķinu kopsumma: <xsl:value-of select="format-number(/documents/kontakt/saldo, '0.00')"/> <xsl:value-of select="$nauda2"/><br /> | ||
+ | Neapmaksāto rēķinu kopsumma: <xsl:value-of select="format-number(/documents/kontakt/saldo div $eiro, '0.00')"/> <xsl:value-of select="$nauda"/><br /> | ||
+ | </xsl:when> | ||
+ | </xsl:choose> | ||
+ | Neapmaksāto rēķinu kopsumma: <xsl:value-of select="format-number(/documents/kontakt/saldo, '0.00')"/> | ||
+ | </xsl:when> | ||
+ | <xsl:otherwise> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/valuuta=''"> | ||
+ | Unpaid invoices total:<xsl:value-of select="format-number(/documents/kontakt/saldo, '0.00')"/> <xsl:value-of select="$nauda"/><br /> | ||
+ | Unpaid invoices total:<xsl:value-of select="format-number(/documents/kontakt/saldo div $eiro, '0.00')"/> <xsl:value-of select="$nauda2"/><br /> | ||
+ | </xsl:when> | ||
+ | <xsl:when test="/documents/document/valuuta!=''"> | ||
+ | Unpaid invoices total:<xsl:value-of select="format-number(/documents/kontakt/saldo , '0.00')"/> <xsl:value-of select="$nauda2"/><br /> | ||
+ | Unpaid invoices total:<xsl:value-of select="format-number(/documents/kontakt/saldo div $eiro, '0.00')"/> <xsl:value-of select="$nauda"/><br /> | ||
+ | </xsl:when> | ||
+ | </xsl:choose> | ||
+ | </xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | <br /> | ||
+ | |||
+ | </div> | ||
+ | </xsl:if>--> | ||
+ | <div style="clear:both; padding:5px 0px 0px 0px; font-size:14px;"> | ||
+ | <xsl:choose> | ||
+ | <xsl:when test="/documents/document/keel=''">Dokuments ir sagatavots elektroniski un derīgs bez paraksta.</xsl:when> | ||
+ | <xsl:otherwise>The invoice is produced electronically and valid without signature.</xsl:otherwise> | ||
+ | </xsl:choose> | ||
+ | </div> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <!--<tr> | ||
+ | <td style="height:0px; line-height:0px; border-width:0px; font-size:0px;"> | ||
+ | <img SRC="http://login.directo.ee/logos/files/nordcity_lv_3.png" width="660"/> | ||
+ | </td> | ||
+ | </tr>--> | ||
+ | <tr> | ||
+ | <td style="text-align:left; border-width:0px;"> | ||
+ | |||
+ | |||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | </div> <!-- Konteinera beigas --> | ||
+ | </body> | ||
+ | |||
+ | </html> | ||
+ | </xsl:template> | ||
+ | <msxsl:script language="JScript" implements-prefix="js"><![CDATA[ | ||
+ | var cipariEng=['','one ','two ','three ','four ','five ','six ','seven ','eight ','nine ']; | ||
+ | var padsmitiEng=['ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen ']; | ||
+ | var desmitiEng=['','','twenty ','thirty ','fourty ','fifty ','sixty ','seventy ','eighty ','ninety ']; | ||
+ | |||
+ | function simtiEng(str) { | ||
+ | res=''; | ||
+ | |||
+ | // pirmais cipars no labaas | ||
+ | if (str.charAt(1)=='1') // chekojam pirmspeedeejo ciparu - ja viens tad vai nu desmit vai padsmit | ||
+ | res=padsmitiEng[parseInt(str.charAt(2))]; | ||
+ | else res=cipariEng[parseInt(str.charAt(2))]; | ||
+ | |||
+ | // otrais cipars no labaas | ||
+ | if (str.charAt(0)=='1') // ja treshais cipars no labaas ir 1 tad jaaraksta simts | ||
+ | res='hundred '+desmitiEng[parseInt(str.charAt(1))]+res; | ||
+ | else if (str.charAt(0)!='0') // ja treshais cipars no labaas nav 1 vai 0 tad jaaraksta simti | ||
+ | res='hundred '+desmitiEng[parseInt(str.charAt(1))]+res; | ||
+ | else // ja nav simtu | ||
+ | res=desmitiEng[parseInt(str.charAt(1))]+res; | ||
+ | |||
+ | // treshais cipars no labaas | ||
+ | res=cipariEng[parseInt(str.charAt(0))]+res; | ||
+ | return res; | ||
+ | } | ||
+ | |||
+ | function numTextEng(skaitlis,nauda) { | ||
+ | fullStr='0000000000'; | ||
+ | tempStr=''; | ||
+ | tempRes=''; | ||
+ | resStr=''; | ||
+ | minus=''; | ||
+ | |||
+ | punkts=skaitlis.indexOf('.'); | ||
+ | if (punkts==-1) { | ||
+ | pirmspStr=skaitlis; | ||
+ | aizpStr='0'; | ||
+ | } else { | ||
+ | pirmspStr=skaitlis.substring(0,punkts); | ||
+ | aizpStr=skaitlis.substring(punkts+1); | ||
+ | } | ||
+ | |||
+ | if (pirmspStr.charAt(0)=='-') { // ja ar miinus ziimi | ||
+ | pirmspStr=pirmspStr.substring(1); | ||
+ | minus='minus '; | ||
+ | } | ||
+ | |||
+ | for (i=pirmspStr.length-1, j=9; i>=0; i--, j--) { // paarliekam uz fullstr, kas sastaav no desmit cipariem | ||
+ | fullStr=fullStr.substring(0,j) + pirmspStr.charAt(i) + fullStr.substring(j+1); | ||
+ | } | ||
+ | |||
+ | if (fullStr.length>10) fullStr=fullStr.substring(fullStr.length-10); // ja vairaak par 10 cipariem, tad trim | ||
+ | |||
+ | if (nauda=='EUR') { | ||
+ | if (parseInt(fullStr,10)==1) resStr+='euro'; // lats vai lati | ||
+ | else if (parseInt(fullStr,10)!=0) resStr+='euros'; | ||
+ | else resStr+='Null euros'; | ||
+ | } else if (parseInt(fullStr,10)!=0) { | ||
+ | resStr+=nauda; | ||
+ | } else resStr+='Null '+nauda; | ||
+ | |||
+ | if (parseInt(fullStr.substring(7),10)>0) { | ||
+ | tempStr=fullStr.substring(7); // simti | ||
+ | tempRes=simtiEng(tempStr); | ||
+ | resStr=tempRes+resStr; | ||
+ | } | ||
+ | |||
+ | if (parseInt(fullStr.substring(4,7),10)>0) { | ||
+ | tempStr=fullStr.substring(4,7); // tūkstoši | ||
+ | tempRes=simtiEng(tempStr); | ||
+ | if ((tempStr.charAt(2)=='1') && (tempStr.charAt(1)!='1')) tempRes+='thousand '; | ||
+ | else if (parseInt(tempStr,10)!=0) tempRes+='thousand '; | ||
+ | resStr=tempRes+resStr; | ||
+ | } | ||
+ | |||
+ | if (parseInt(fullStr.substring(1,4),10)>0) { | ||
+ | tempStr=fullStr.substring(1,4); // miljoni | ||
+ | tempRes=simtiEng(tempStr); | ||
+ | if ((tempStr.charAt(2)=='1') && (tempStr.charAt(1)!='1')) tempRes+='million '; | ||
+ | else if (parseInt(tempStr,10)!=0) tempRes+='million '; | ||
+ | resStr=tempRes+resStr; | ||
+ | } | ||
+ | |||
+ | if (fullStr.charAt(0)!='0') { // miljardi | ||
+ | if (fullStr.charAt(0)=='1') resStr='one billion '+resStr; | ||
+ | else resStr=cipariEng[parseInt(fullStr.charAt(0),10)]+'billion '+resStr; | ||
+ | } | ||
+ | |||
+ | if (resStr!='') { // pirmais burts lielais | ||
+ | resStr=resStr.charAt(0).toUpperCase()+resStr.substring(1); | ||
+ | } | ||
+ | |||
+ | santimi=parseInt(aizpStr,10); //santimi | ||
+ | if (santimi>0) { | ||
+ | resStr+=' '+santimi; | ||
+ | if (santimi==1) { | ||
+ | resStr+=' cent'; | ||
+ | } else { | ||
+ | resStr+=' cents'; | ||
+ | } | ||
+ | } else { | ||
+ | resStr+=' 00 cents'; | ||
+ | } | ||
+ | |||
+ | return (minus+resStr); | ||
+ | |||
+ | } | ||
+ | var cipari=['','viens ','divi ','trīs ','četri ','pieci ','seši ','septiņi ','astoņi ','deviņi ']; | ||
var padsmiti=['desmit ','vienpadsmit ','divpadsmit ','trīspadsmit ','četrpadsmit ','piecpadsmit ','sešpadsmit ','septiņpadsmit ','astoņpadsmit ','deviņpadsmit ']; | var padsmiti=['desmit ','vienpadsmit ','divpadsmit ','trīspadsmit ','četrpadsmit ','piecpadsmit ','sešpadsmit ','septiņpadsmit ','astoņpadsmit ','deviņpadsmit ']; | ||
var desmiti=['','','divdesmit ','trīsdesmit ','četrdesmit ','piecdesmit ','sešdesmit ','septiņdesmit ','astoņdesmit ','deviņdesmit ']; | var desmiti=['','','divdesmit ','trīsdesmit ','četrdesmit ','piecdesmit ','sešdesmit ','septiņdesmit ','astoņdesmit ','deviņdesmit ']; | ||
Rinda 382: | Rinda 933: | ||
| | ||
if (parseInt(fullStr.substring(4,7),10)>0) { | if (parseInt(fullStr.substring(4,7),10)>0) { | ||
- | tempStr=fullStr.substring(4,7); // tūkstoši | + | tempStr=fullStr.substring(4,7); // t�ksto�i |
tempRes=simti(tempStr); | tempRes=simti(tempStr); | ||
if ((tempStr.charAt(2)=='1') && (tempStr.charAt(1)!='1')) tempRes+='tūkstotis '; | if ((tempStr.charAt(2)=='1') && (tempStr.charAt(1)!='1')) tempRes+='tūkstotis '; | ||
Rinda 420: | Rinda 971: | ||
| | ||
return (minus+resStr); | return (minus+resStr); | ||
- | document.getElementById('teksts').innerHTML=minus+resStr; | + | } |
- | }]]> | + | |
- | </msxsl:script> | + | ]]></msxsl:script> |
- | </xsl:stylesheet> | + | |
+ | </xsl:stylesheet> | ||
</code> | </code> |