Lietotāja rīki

Vietnes rīki



lv:procedures

Atšķirības

Norādītais vecais variants no patreizējās lapas atšķiras ar:

Saite uz salīdzināšanas skatu.

Abās pusēs iepriekšējo versiju Iepriekšējā versija
Nākamā versija
Iepriekšējā versija
lv:procedures [2020/07/23 17:31]
marija rekins kā pz
lv:procedures [2020/10/27 19:06] (patlaban)
marija ALG_rek_0610
Rinda 1: Rinda 1:
-procedures and printouts versions check 
- 
 <​code>​ <​code>​
 <?xml version="​1.0"​ encoding="​utf-8"?>​ <?xml version="​1.0"​ encoding="​utf-8"?>​
Rinda 9: Rinda 7:
 xmlns:​js="​urn:​formulas"​ xmlns:​js="​urn:​formulas"​
 exclude-result-prefixes="​msxsl js fo">​ exclude-result-prefixes="​msxsl js fo">​
-   <​xsl:​output method="​html"/>​ +<​xsl:​output method="​html"/>​ 
-   ​<xsl:template match="/"+<xsl:decimal-format name="N" ​NaN="0" ​decimal-separator='​.' ​grouping-separator=' ' ​/> 
-       <​xsl:​variable name="discount"+  <xsl:template match="​/"
-    ​ <​xsl:​for-each select="/​documents/​document/​rows/​row[pross&​gt;​'0.00000001']">​ +   <​xsl:​variable name="item_per_page">25</​xsl:​variable>​ 
-    <​xsl:​value-of select="​pross"​/>  + <​xsl:​variable name="​eiro">​
- </xsl:for-each>​ +
- </xsl:​variable+
-   <​xsl:​variable name="atlaides_summa"> +
-    <​xsl:​for-each select="/​documents/​document/​rows/​row[pross &gt; 0]">​ +
- <​a_summa>​ +
- <​xsl:​value-of select="​format-number(hind*kogus*pross div 100, '​0.0000'​)"/>​ +
- </​a_summa>​ +
-    </​xsl:​for-each>​ +
-   </​xsl:​variable>​ +
-        <​xsl:​variable name="​eiro">​+
  <​xsl:​choose>​  <​xsl:​choose>​
  <​xsl:​when test="/​documents/​document/​valuuta='​LVL'">​  <​xsl:​when test="/​documents/​document/​valuuta='​LVL'">​
Rinda 33: Rinda 21:
  <​xsl:​when test="/​documents/​document/​valuuta='​EUR'">​  <​xsl:​when test="/​documents/​document/​valuuta='​EUR'">​
  0.702804  0.702804
 + </​xsl:​when>​
 + <​xsl:​when test="/​documents/​document/​valuuta!='​EUR'​ and  /​documents/​document/​valuuta!='​LVL'">​
 + <​xsl:​value-of select="/​documents/​document/​kurssbv1"/>​
  </​xsl:​when>​  </​xsl:​when>​
  </​xsl:​choose>​  </​xsl:​choose>​
Rinda 52: Rinda 43:
  </​xsl:​choose>​  </​xsl:​choose>​
  </​xsl:​variable>​  </​xsl:​variable>​
-  +   <​xsl:​variable name="​rekina_summa">​ 
- <​xsl:​variable name="ridu_laius">+     <​xsl:​choose>​ 
 +   <​xsl:​when test="​$nauda='​LVL'">​ 
 +  <​xsl:​value-of select="​format-number((/​documents/​document/​converted_tasuda div 100) * $eiro, '​0.00'​)"​ /> 
 +   </​xsl:​when>​ 
 +     <​xsl:​when test="​$nauda='​EUR'">​ 
 +  <​xsl:​value-of select="​format-number(/​documents/​document/​converted_tasuda div 100, '​0.00'​)"​ /> 
 +   </​xsl:​when>​ 
 +   <​xsl:​when test="​$nauda!='​LVL'​ or $nauda!='​EUR'">​ 
 +   <​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo div /​documents/​document/​kurssbv1,​ '​0.00'​)"/>​ 
 +   </​xsl:​when>​ 
 +   </​xsl:​choose>​ 
 +   </​xsl:​variable>​ 
 +   <​xsl:​variable name="​saldo">​ 
 +   <​xsl:​choose>​ 
 +   <​xsl:​when test="​$nauda='​LVL'​ or $nauda='​EUR'">​ 
 +   <​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo,​ '​0.00'​)"/>​ 
 +   </​xsl:​when>​ 
 +   <​xsl:​when test="​$nauda!='​LVL'​ or $nauda!='​EUR'">​ 
 +   <​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo div /​documents/​document/​kurssbv1,​ '​0.00'​)"/>​ 
 +   </​xsl:​when>​ 
 +   </​xsl:​choose>​ 
 +   
 +   </​xsl:​variable>​ 
 +    <​xsl:​variable name="​parads">​ 
 +   <​xsl:​value-of select="​format-number($saldo - $rekina_summa ,'​0.00'​)"/>​ 
 +   </​xsl:​variable>​ 
 +   <​xsl:​variable name="​neapm_summa">​ 
 +   <​xsl:​choose>​ 
 +   <​xsl:​when test="/​documents/​document/​valuuta!=''">​ 
 +   <​xsl:​value-of select="​format-number($parads,​ '​0.00'​)"/>​ 
 +   </​xsl:​when>​ 
 +   <​xsl:​when test="/​documents/​document/​valuuta=''">​ 
 +   <​xsl:​value-of select="​$parads"/>​ 
 +   </​xsl:​when>​ 
 +   </​xsl:​choose>​ 
 +   </​xsl:​variable>​ 
 +   <​xsl:​variable name="​atlaide">​ 
 +    <​xsl:​choose><​xsl:​when test="​sum(documents/​document/​rows/​row[pross &gt; 0]/pross) &gt; 0">​1</​xsl:​when>​ 
 +    <​xsl:​otherwise>​0</​xsl:​otherwise>​ 
 +    </​xsl:​choose>​ 
 +   </​xsl:​variable>​ 
 +   <​xsl:​variable name="​atlaides_summa">​ 
 +    <​xsl:​for-each select="/​documents/​document/​rows/​row[pross &gt; 0]">​ 
 + <​a_summa>​ 
 + <​xsl:​value-of select="​format-number(hind*kogus*pross div 100, '​0.0000'​)"/>​ 
 + </​a_summa>​ 
 +    </​xsl:​for-each>​ 
 +   </​xsl:​variable>​ 
 +    
 +   <​script language="​JavaScript"​ type="​text/​javascript"><​![CDATA[ 
 +    if (document.getElementById('​first'​)) { 
 +     ​document.write('<​div class="​pbreak"></​div>'​);​ 
 +    } else { 
 +     ​document.write('<​div id="​first"></​div>'​);​ 
 +    } 
 +   ​]]></​script>​ 
 +    
 +   <​html>​ 
 +   <​head>​ 
 +   <​title><​xsl:​value-of select="/​documents/​language/​arve_nr"​ /><​!--Rēķins Nr.-->​. ​ <​xsl:​value-of select="/​documents/​document/​number"​ /></​title>​ 
 +    
 +   <​style type="​text/​css">​ 
 +    body { 
 +    text-align:​center;​ 
 +    font-family:​Century Gothic; 
 +    font-size:​10px;​ 
 +    } 
 +     
 +    .container { 
 +    display:​table;​ 
 +    text-align:​left;​ 
 +    width:​660px;​ 
 +    margin:​auto;​ 
 +    } 
 +     
 +    .main_table { 
 +    width:​660px;​ 
 +    border-collapse:​collapse;​ 
 +    } 
 +     
 +    .main_table th { 
 +    font-size:​14px;​ 
 +    font-family:​Century Gothic; 
 +    font-weight:​normal;​ 
 +    text-align:​right;​ 
 +    padding:​1px;​ 
 +    border:1px solid #B4B4B4; 
 +    } 
 +     
 +    .main_table td { 
 +    font-size:​10px;​ 
 +    font-family:​Century Gothic; 
 +    padding:​1px;​ 
 +    border:1px solid #B4B4B4; 
 +    } 
 +     
 +    .main_table td.nos, .main_table td.kods, .main_table th.nos, .main_table th.kods { 
 +    text-align:​left;​ 
 +    } 
 +     
 +    .main_table tr.cont { 
 +    height:​16px;​ 
 +    } 
 +     
 +    .left { 
 +    float:​left;​ 
 +    padding:​30px 0px 0px 30px; 
 +    font-size:​14px;​ 
 +    } 
 +     
 +    .right { 
 +    float:​right;​ 
 +    text-align:​right;​ 
 +    font-size:​14px;​ 
 +    } 
 + .left2 { 
 +    float:​left;​ 
 +    text-align:​left;​ 
 +    font-size:​14px;​ 
 +    } 
 +     
 +    .right_small { 
 +    float:​right;​ 
 +    text-align:​right;​ 
 +    } 
 +     
 +    .spacer { 
 +    height:​20px;​ 
 +    clear:​both;​ 
 +    } 
 +     
 +    .divider { 
 +    clear:​both;​ 
 +    } 
 +     
 +    .pbreak { 
 +    page-break-after:​always;​ 
 +    } 
 +     
 +    h4.pb { 
 +    display:​none;​ 
 +    } 
 +   </​style> ​  
 +   </​head>​ 
 +   <​body>​ 
 +   <​div class="​container">​ 
 +    <div class="​spacer"​ style="​height:​0px;"></​div>​ 
 +    <div style="​float:​left;"​ class="​left2"​ valign="​bottom">​ 
 + <IMG height="​90"​ alt="​Logo"><​xsl:​attribute name="​SRC"​ ><​xsl:​value-of select="/​documents/​footer/​firma_logo"/></​xsl:​attribute></​IMG>​ 
 +    </​div>​ 
 +    <div class="​right">​ 
 + <br /> 
 +    <​xsl:​choose><​!--Rēķins Nr.--> 
 +     <​xsl:​when test="/​documents/​document/​tingimus='​K'​ and /​documents/​document/​keel=''"><​xsl:​value-of select="/​documents/​document/​maksetingimus_nimi"​ /> Nr.&#​160;</​xsl:​when>​ 
 +     <​xsl:​when test="/​documents/​document/​tingimus='​K'​ and /​documents/​document/​keel!=''">​Credit note no.&#​160;</​xsl:​when>​ 
 +     <​xsl:​when test="/​documents/​document/​keel=''">​Rēķins Nr.&#​160;</​xsl:​when>​ 
 +     <​xsl:​otherwise><​xsl:​value-of select="/​documents/​language/​arve_nr"​ />​.</​xsl:​otherwise></​xsl:​choose><​xsl:​value-of select="/​documents/​document/​number"​ /><br /> 
 +     <​xsl:​choose><​!--Kreditē rēķinu Nr.--> 
 +     <​xsl:​when test="/​documents/​document/​tingimus='​K'​ and /​documents/​document/​keel=''">​Kreditē rēķinu Nr.&#​160;<​xsl:​value-of select="/​documents/​document/​kredarve"​ /><br /></​xsl:​when>​ 
 +     <​xsl:​when test="/​documents/​document/​tingimus='​K'​ and /​documents/​document/​keel!=''">​Credited invoice no.&#​160;<​xsl:​value-of select="/​documents/​document/​kredarve"​ /><br /></​xsl:​when>​ 
 +     </​xsl:​choose>​ 
 +     <​xsl:​choose><​!--Datums-->​ 
 +     <​xsl:​when test="/​documents/​document/​keel=''">​Datums</​xsl:​when>​ 
 +     <​xsl:​otherwise><​xsl:​value-of select="/​documents/​language/​aeg"​ /></​xsl:​otherwise></​xsl:​choose>:&#​160;​ 
 +     <​xsl:​variable name="day" select="​substring(/​documents/​document/​aeg_date,​1,​2)"​ /> 
 +     <​xsl:​variable name="​month"​ select="​substring(/​documents/​document/​aeg_date,​4,​2)"​ /> 
 +     <​xsl:​variable name="​year"​ select="​substring(/​documents/​document/​aeg_date,​7,​4)"​ /> 
 +     <​xsl:​variable name="​menesis">​ 
 +      <​xsl:​choose>​ 
 +       <​xsl:​when test="/​documents/​document/​keel=''">​ 
 +        <xsl:if test="​$month='​01'">​Janvāris</​xsl:​if>​ 
 +        <xsl:if test="​$month='​02'">​Februāris</​xsl:​if>​ 
 +        <xsl:if test="​$month='​03'">​Marts</​xsl:​if>​ 
 +        <xsl:if test="​$month='​04'">​Aprīlis</​xsl:​if>​ 
 +        <xsl:if test="​$month='​05'">​Maijs</​xsl:​if>​ 
 +        <xsl:if test="​$month='​06'">​Jūnijs</​xsl:​if>​ 
 +        <xsl:if test="​$month='​07'">​Jūlijs</​xsl:​if>​ 
 +        <xsl:if test="​$month='​08'">​Augusts</​xsl:​if>​ 
 +        <xsl:if test="​$month='​09'">​Septembris</​xsl:​if>​ 
 +        <xsl:if test="​$month='​10'">​Oktobris</​xsl:​if>​ 
 +        <xsl:if test="​$month='​11'">​Novembris</​xsl:​if>​ 
 +        <xsl:if test="​$month='​12'">​Decembris</​xsl:​if>​ 
 +       </​xsl:​when>​ 
 +       <​xsl:​otherwise>​ 
 +        <xsl:if test="​$month='​01'">​January</​xsl:​if>​ 
 +        <xsl:if test="​$month='​02'">​February</​xsl:​if>​ 
 +        <xsl:if test="​$month='​03'">​March</​xsl:​if>​ 
 +        <xsl:if test="​$month='​04'">​April</​xsl:​if>​ 
 +        <xsl:if test="​$month='​05'">​May</​xsl:​if>​ 
 +        <xsl:if test="​$month='​06'">​June</​xsl:​if>​ 
 +        <xsl:if test="​$month='​07'">​July</​xsl:​if>​ 
 +        <xsl:if test="​$month='​08'">​August</​xsl:​if>​ 
 +        <xsl:if test="​$month='​09'">​September</​xsl:​if>​ 
 +        <xsl:if test="​$month='​10'">​October</​xsl:​if>​ 
 +        <xsl:if test="​$month='​11'">​November</​xsl:​if>​ 
 +        <xsl:if test="​$month='​12'">​December</​xsl:​if>​ 
 +       </​xsl:​otherwise>​ 
 +      </​xsl:​choose>​ 
 +     </​xsl:​variable>​ 
 +     <​xsl:​choose>​ 
 +      <​xsl:​when test="/​documents/​document/​keel=''"><​xsl:​value-of select="​concat($year,'​. gada','​ ',​$day,'​. ',​$menesis)"​ /></​xsl:​when>​ 
 +      <​xsl:​otherwise><​xsl:​value-of select="​concat($menesis,'​ ',​$day,',​ ',​$year)"​ /></​xsl:​otherwise>​ 
 +     </​xsl:​choose>​ 
 +  
 + <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​tellimusenr!=''">​ 
 + <br /> 
 + <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​keel=''">​Saskaņā ar priekšapmaksas rēķinu </​xsl:​when>​ 
 + <​xsl:​otherwise>​According to proforma invoice </​xsl:​otherwise>​  
 + </​xsl:​choose>​ 
 + <​xsl:​value-of select="/​documents/​document/​tellimusenr"​ /> 
 + </​xsl:​when>​  
 + </​xsl:​choose>​ 
 +  
 +    </​div>​ 
 +     
 +    <div class="​spacer"></​div>​ 
 +     
 +    <div class="​left2"​ valign="​top">​ 
 +     <​xsl:​if test="/​documents/​kontakt/​kontakt!=''"><​xsl:​value-of select="/​documents/​kontakt/​kontakt"​ /><br /></​xsl:​if>​ 
 +     <​xsl:​value-of select="/​documents/​document/​klient_nimi"​ /><br /> 
 +     <​xsl:​if test="/​documents/​document/​aadress1!=''"><​xsl:​value-of select="/​documents/​document/​aadress1"​ /><br /></​xsl:​if>​ 
 +     <​xsl:​if test="/​documents/​document/​aadress2!=''"><​xsl:​value-of select="/​documents/​document/​aadress2"​ /></​xsl:​if>​ 
 +     <​xsl:​if test="/​documents/​document/​aadress3!=''">&#​160;<​xsl:​value-of select="/​documents/​document/​aadress3"​ /><br /></​xsl:​if>​ 
 +     <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​keel=''">​Reģ. Nr.: </​xsl:​when>​ 
 + <​xsl:​otherwise>​Reg. No.: </​xsl:​otherwise>​ 
 + </​xsl:​choose>​ 
 + <​xsl:​value-of select="/​documents/​kontakt/​regnr"​ /><br />  
 +     <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​keel=''">​PVN Reģ. Nr.: </​xsl:​when>​ 
 + <​xsl:​otherwise>​VAT Reg. No.: </​xsl:​otherwise>​ 
 + </​xsl:​choose>​ 
 + <​xsl:​value-of select="/​documents/​kontakt/​kmregnr"​ /><br />  
 +     <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​keel=''">​Banka:​ </​xsl:​when>​ 
 + <​xsl:​otherwise>​Bank:​ </​xsl:​otherwise>​ 
 + </​xsl:​choose>​ 
 + <​xsl:​value-of select="/​documents/​kontakt/​pank"​ /><br /> 
 +     <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​document/​keel=''">​Konta Nr.: </​xsl:​when>​ 
 + <​xsl:​otherwise>​Account No.: </​xsl:​otherwise>​ 
 + </​xsl:​choose>​ 
 + <​xsl:​value-of select="/​documents/​kontakt/​arveldusarve"​ /><br /> 
 + <​xsl:​choose>​ 
 + <​xsl:​when test="/​documents/​kontakt/​lahaadress2!=''​">
  <​xsl:​choose>​  <​xsl:​choose>​
- <​xsl:​when test="$discount!=''">​50</​xsl:​when>​ + <​xsl:​when test="/​documents/​document/​keel=''">​Piegādes adrese: ​</​xsl:​when>​ 
- <​xsl:​otherwise>​70</​xsl:​otherwise>​+ <​xsl:​otherwise>​Delivery address: ​</​xsl:​otherwise>​
  </​xsl:​choose>​  </​xsl:​choose>​
- </xsl:variable>​ + <xsl:value-of select="/​documents/​kontakt/lahaadress2" ​/><br />   
- <​xsl:​variable name="​ridu_lk">​ + </xsl:when>  
- <​xsl:​for-each select="/​documents/​document/rows/row"> + </xsl:choose>  
- <xaccum>​ +    ​</div
- <​accum>​ +  
- <​xsl:​value-of select="​floor(number(string-length(keelne_seletus) div $ridu_laius))+1"​/> +    ​<div class="right">​ 
- </accum> +     ​<​xsl:​value-of select="/​documents/footer/​firma_nimi" /><br /> 
- <​pos><​xsl:value-of select="​position()"/></​pos+     ​<xsl:if test="/​documents/footer/firma_aadress!=''​"><​xsl:​value-of select="/​documents/​footer/​firma_aadress" /><br /></​xsl:​if
- </​xaccum>​ +     ​<xsl:if test="/​documents/​footer/​firma_aadress2!=''​"><​xsl:​value-of select="​/​documents/​footer/​firma_aadress2" /></​xsl:​if>​ 
- </xsl:for-each> +     ​<xsl:if test="/​documents/​footer/​firma_aadress3!=''​">&#160;<​xsl:​value-of select="​/​documents/​footer/​firma_aadress3" /><br /></​xsl:​if>   
- </xsl:​variable+     ​<​xsl:​choose>​ 
- <xsl:​variable name="rsk">​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Reģ. #: </​xsl:​when>​ 
- <​xsl:​value-of select="​sum(msxsl:​node-set($ridu_lk)/xaccum/accum)"/> +  <​xsl:​otherwise>​Reg. #: </​xsl:​otherwise>​ 
- </xsl:​variable+  </​xsl:​choose><​!--Reģ. Nr--><​xsl:​value-of select="/​documents/​footer/​firma_regnr" ​/><br /
- <xsl:variable name="​ridu_lk1">​ +    <​xsl:​choose>​ 
- <​xsl:​choose>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​PVN Reģ. #: </​xsl:​when>​ 
- <​xsl:​when ​test="$rsk > 35">​35<​/xsl:​when>​ +  <​xsl:​otherwise>​VAT Reg. #: </​xsl:​otherwise>​ 
- <​xsl:​otherwise>​20<​/xsl:​otherwise>​ +  </​xsl:​choose><​!--PVN Reģ. Nr--><​xsl:​value-of ​select="/​documents/​footer/firma_kmnr" /><br /> 
- </xsl:​choose>​ +    </div
- </​xsl:​variable>​ +     
- <​xsl:​variable name="​ridu_lk2"> +    <div class="spacer" ​style="height:60px;"></​div
- <xsl:choose>​ +     
- <​xsl:​when test="$rsk > 90">55</xsl:when> +    <table class="main_table" ​height="380" ​cellspacing="0" ​cellpadding="0">​ 
- <​xsl:​otherwise>​40</xsl:​otherwise> +     ​<tr class="cont">​ 
- </xsl:choose+      <th class="kods" ​width="100">​ 
- </​xsl:​variable>​ +   ​<​xsl:​choose>​ 
- <​xsl:​variable name="​lppsk">​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Kods</​xsl:​when>​ 
- <xsl:if test="$rsk > $ridu_lk1"><​xsl:​value-of select="​ceiling(($rsk - $ridu_lk1) div $ridu_lk2)+1"/></​xsl:​if>​ +  <​xsl:​otherwise>​Item</​xsl:​otherwise>​ 
- <xsl:if test="$rsk &lt;$ridu_lk1"><​xsl:​value-of select="​1"/></​xsl:if> +  </​xsl:​choose>​<​!--Kods-->​</th
- </xsl:variable+      <th class="nos" ​width="​300"><​!--Nosaukums--
- <​xsl:​variable name="​dveids">​ +   ​<​xsl:​choose>​ 
- <​xsl:​choose>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Nosaukums</​xsl:​when>​ 
- <​xsl:​when test="sum(documents/document/​rows/​row[artikkel_klass='​SERVICE'​]/​kogus)>​0 and sum(documents/​document/​rows/​row[artikkel_klass!='SERVICE']/kogus)=0">2</xsl:when> +  <​xsl:​otherwise>​Description</​xsl:​otherwise>​ 
- <​xsl:​when test="​sum(documents/​document/​rows/​row[artikkel_klass='​SERVICE'​]/​kogus)=0 and sum(documents/​document/​rows/​row[artikkel_klass!='​SERVICE'​]/​kogus)>​0">​1</​xsl:​when>​ +  </​xsl:​choose>​ 
- <​xsl:​otherwise>​0</​xsl:​otherwise>​ +   ​</th
- </​xsl:​choose>​ +      <th> <​xsl:​choose>​ 
- </​xsl:​variable> +  <​xsl:​when test="/​documents/​document/​keel=''">​Mērv.</​xsl:​when>​ 
-<xsl:variable name="lang">​ +  <​xsl:​otherwise>​Unit</​xsl:​otherwise>​ 
- <​xsl:​choose>​ +  </​xsl:​choose>​<​!--Mērvienība-->​</th
- <​xsl:​when test="/​documents/​kontakt/​keel='​LV'​ or /​documents/​kontakt/​keel='​LAT'​ or /​documents/​kontakt/​keel=''">​LV</​xsl:​when>​ +      <th> <​xsl:​choose>​ 
- <​xsl:​otherwise>​ENG</​xsl:​otherwise>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Daudz.</​xsl:​when>​ 
- </​xsl:​choose>​ +  <​xsl:​otherwise>​Qty total</​xsl:​otherwise>​ 
- </​xsl:​variable> +  </​xsl:​choose>​<​!--Daudz.-->​</th
-<xsl:variable name="​day" ​select="​substring(/documents/document/aeg_date,​1,​2)" /> +      <xsl:if test="$atlaide!=0">​ 
-<xsl:​variable name="​month"​ select="​substring(/​documents/​document/​aeg_date,​4,​2)" ​/> +       <th><​xsl:​choose>​ 
-<xsl:​variable name="​year"​ select="​substring(/​documents/​document/​aeg_date,​7,​4)" ​/> +  <​xsl:​when test="/​documents/​document/​keel=''">​Atlaide</​xsl:​when>​ 
-<​xsl:​variable name="​menesis">​ +  <​xsl:​otherwise>​Discount</​xsl:​otherwise>​ 
-         ​<xsl:if test="$month='​01'​">​janvārī</​xsl:​if>​ +  </​xsl:​choose>​<​!--Atlaide-->​</th
-         <​xsl:​if test="$month='​02'">​februārī</​xsl:if> +      </xsl:if
-         <​xsl:​if test="​$month='​03'​">martā</xsl:if+    
-         <xsl:if test="​$month='​04'">​aprīlī</​xsl:​if>​ +      <th><​xsl:​choose>​ 
-         ​<xsl:if test="$month='​05'​">​maijā</​xsl:​if>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Cena <xsl:value-of select="​$nauda"​/></​xsl:​when
-         <​xsl:​if test="$month='​06'​">​jūnijā</​xsl:​if>​ +  <xsl:otherwise>Price <xsl:value-of select="$nauda"/></​xsl:​otherwise>​ 
-         <​xsl:​if test="$month='​07'​">​jūlijā</​xsl:​if>​ +  </​xsl:​choose></​th
-         <​xsl:​if test="$month='​08'​">​augustā</​xsl:​if+      <th><​xsl:​choose>​ 
-         ​<xsl:if test="$month='​09'​">​septembrī</​xsl:​if+  <​xsl:​when test="/​documents/document/keel=''​">Summa <xsl:value-of select="$nauda"/></​xsl:​when>​ 
-         ​<xsl:if test="$month='​10'​">​oktobrī</​xsl:​if>​ +  <​xsl:​otherwise>​Total <xsl:value-of select="$nauda"/></​xsl:​otherwise>​ 
-         <​xsl:​if test="$month='​11'">​novembrī</​xsl:​if>​ +  </​xsl:​choose></​th
-         <​xsl:​if test="​$month='​12'">​decembrī</​xsl:​if>​ +     ​</tr
-        </​xsl:​variable>​ +     ​ 
-<​xsl:​variable name="​datums">​ +     ​<xsl:for-each select="/documents/document/rows/row"
- <​xsl:​choose>​ +      
- <​xsl:​when test="$lang='LV'">​<​xsl:​value-of select="​concat($year,'​. gada','​ ',​$day,'​. ',​$menesis)"​ /></​xsl:​when>​ +     <tr class="cont">​ 
- <​xsl:​otherwise>​<​xsl:​value-of select="/​documents/​document/​aeg_date"​ /></​xsl:​otherwise>​ +     ​<​xsl:​choose>​ 
- </​xsl:​choose>​ +      <​xsl:​when test="artikkel!=''">​ 
- </xsl:​variable+      <td class="kods" width="​100"><​xsl:​value-of select="artikkel" /></td
-<xsl:​variable name="lapa">​ +      <td class="nos" width="​250"><​xsl:​value-of disable-output-escaping="yes" select="keelne_seletus" ​/></td
- <​xsl:​choose>​ +      <td align="center"><​xsl:​value-of select="yhik" /></td
- <​xsl:​when test="$lang='LV'">​Lapa</​xsl:​when>​ +      <td align="​center"​><​xsl:​value-of select="kogus" ​/></td
- <​xsl:​otherwise>​Page</​xsl:​otherwise>​ +      <xsl:if test="​$atlaide!=0">​ 
- </​xsl:​choose>​ +       ​<td class="atl">​ 
- </xsl:​variable+        <​xsl:​choose>​ 
-<xsl:​variable name="​field1"​> +         ​<​xsl:​when test="pross!=''"><​xsl:​value-of select="pross" ​/%</​xsl:​when>​ 
- <​xsl:​choose>​ +         ​<​xsl:​otherwise>​&#160;</​xsl:​otherwise>​ 
- <​xsl:​when test="$lang='LV'">​Datums</​xsl:​when>​ +        </​xsl:​choose>​ 
- <​xsl:​otherwise>​Date</​xsl:​otherwise>​ +       ​</td
- </​xsl:​choose>​ +      </xsl:if> 
- </xsl:​variable+      <td align="right"><​xsl:​value-of select="format-number((converted_hind) div 100,'0.00')"/></​td
-<xsl:​variable name="​field2"​> +      <td align="right"><​xsl:​value-of select="format-number((converted_summa) div 100,'0.00')" ​/></td
- <​xsl:​choose>​ +      </xsl:when> 
- <​xsl:​when test="$lang='LV'">​Rēķins Nr.</​xsl:​when>​ +     <​xsl:​otherwise>​ 
- <​xsl:​otherwise>​Invoice No</​xsl:​otherwise>​ + <td>&#160;</td
- </​xsl:​choose>​ + <td class="nos" width="​250"><​xsl:​value-of disable-output-escaping="yes" select="keelne_seletus" ​/></td
- </xsl:​variable+ <td>&#160;</td
-<xsl:variable name="field3">​ +         ​<td>&#160;</td
- <​xsl:​choose>​ + <td>&#160;</td
- <​xsl:​when test="$lang='LV'">​Piegādātājs</​xsl:​when>​ + <td>&#160;</td
- <​xsl:​otherwise>​Seller</​xsl:​otherwise>​ +         ​<xsl:if test="$atlaide!=0">​ 
- </​xsl:​choose>​ + <td>&#160;</td> 
- </xsl:​variable+ </xsl:if
-<xsl:variable name="​field4"​+     ​</​xsl:​otherwise>​ 
- <​xsl:​choose>​ +     ​</​xsl:​choose>​ 
- <​xsl:​when test="$lang='LV'">​Klients</xsl:when> +     ​</tr
- <​xsl:​otherwise>​Customer<​/xsl:​otherwise> +      
- </xsl:choose+     <xsl:if test="((position() mod $item_per_page)=0) and (position()!=last())">​ 
- </xsl:variable> +      <tr><td colspan="6" style="border-width:0px;">&#160;</td></tr
-<xsl:variable name="​field5">​ +      <xsl:text disable-output-escaping="yes">&​lt;/​table&​gt;​</xsl:text
- <​xsl:​choose>​ +      <div style="text-align:​right;​"><​!--Turpinājums-->​...</div
- <​xsl:​when test="$lang='​LV'​">PVN reģ. Nr.</xsl:when> +      <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:​otherwise>​VAT reg. No</​xsl:​otherwise>​ +       ​<xsl:value-of select="floor((position()+1) div $item_per_page)" />&#160; 
- </​xsl:​choose>​ +      </div
- </xsl:​variable+      <xsl:text disable-output-escaping="yes">&​lt;/​div&​gt;​</xsl:text
-<xsl:​variable name="​field6"​> +       
- <​xsl:​choose>​ +      ​<div class="pbreak"></​div
- <​xsl:​when test="$lang='​LV'">​Reģ. Nr.</xsl:​when>​ +       
- <​xsl:​otherwise>​Reg. No</xsl:​otherwise>​ +      <xsl:text disable-output-escaping="yes">&lt;div class="container"&gt;</xsl:text
- </xsl:​choose>​ +      <div style="​text-align:right; padding-bottom:5px;">​ 
- </​xsl:​variable>​ +       ​<xsl:value-of select="floor((position()+1) div $item_per_page)+1" /> 
-<​xsl:​variable name="​field7"> +       ​<xsl:text>/</​xsl:​text
- <xsl:choose>​ +       ​<xsl:value-of select="ceiling(/​documents/​document/​ridu div $item_per_page)" /> 
- <​xsl:​when test="$lang='​LV'​">Preču izsniegšana</​xsl:​when>​ +      </div
- <​xsl:​otherwise>​Stock address</xsl:otherwise>​ +      <xsl:text disable-output-escaping="yes">&​lt;​table class="main_table"​ height="​740"​ cellspacing="0" cellpadding="​0"&​gt;​</xsl:text
- </​xsl:​choose>​ +     ​<tr class="​cont"​
- </​xsl:​variable>​ +      <th class="kods" width="​100">​ 
-<​xsl:​variable name="​field8">​ +   ​<​xsl:​choose>​ 
- <​xsl:​choose>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Kods</​xsl:​when>​ 
- <​xsl:​when test="$lang='​LV'​">Preču saņemšana<​/xsl:​when>​ +  <​xsl:​otherwise>​Item</​xsl:​otherwise>​ 
- <​xsl:​otherwise>Delivery address</​xsl:​otherwise>​ +  </​xsl:​choose>​<​!--Kods-->​</th
- </​xsl:​choose>​ +      <th class="nos" ​width="​300"><​!--Nosaukums--
- </xsl:​variable+   ​<​xsl:​choose>​ 
-<xsl:​variable name="​field9"​+  <​xsl:​when test="/​documents/​document/​keel=''">​Nosaukums</​xsl:​when>​ 
- <​xsl:​choose>​ +  <​xsl:​otherwise>​Description</​xsl:​otherwise>​ 
- <xsl:when test="$lang='​LV'">​Pārvadātājs<​/xsl:​when>​ +  </​xsl:​choose>​ 
- <​xsl:​otherwise>​Forwarder<​/xsl:​otherwise>​ +   ​</th
- </xsl:​choose>​ +      <th> <​xsl:​choose>​ 
- </xsl:​variable+  <​xsl:​when test="/​documents/​document/​keel=''">​Mērv.</​xsl:​when>​ 
-<xsl:​variable name="field10">​ +  <​xsl:​otherwise>​Unit</​xsl:​otherwise>​ 
- <​xsl:​choose>​ +  </​xsl:​choose>​<​!--Mērvienība-->​</th
- <​xsl:​when test="$lang='LV'"​>​Apmaksas veids</​xsl:​when+      <th> <​xsl:​choose>​ 
- <xsl:​otherwise>​Payment</​xsl:​otherwise>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Daudz.</​xsl:​when>​ 
- </​xsl:​choose>​ +  <​xsl:​otherwise>​Qty total</​xsl:​otherwise>​ 
- </​xsl:​variable>​ +  </​xsl:​choose><​!--Daudz.--></th
-<​xsl:​variable name="field11"> +      <xsl:if test="​$atlaide!=0"> 
- <xsl:choose>​ +       <th><​xsl:​choose
- <​xsl:​when test="$lang='​LV'​">​Apmaksas termiņš<​/xsl:when> +  <xsl:when test="/​documents/​document/​keel=''">​Atlaide</xsl:when
- <​xsl:​otherwise>​Due date</xsl:​otherwise+  <xsl:otherwise>Discount</xsl:otherwise
- </​xsl:​choose>​ +  </xsl:choose><!--Atlaide--></th
- </​xsl:​variable>​ +      </xsl:if
-<​xsl:​variable name="field12"> +    
- <xsl:choose>​ +      ​<th><​xsl:​choose>​ 
- <​xsl:​when test="$lang='​LV'​">​Speciālas atzīmes<​/xsl:​when>​ +  <​xsl:​when test="/​documents/​document/​keel=''">​Cena <​xsl:​value-of select="​$nauda"/></​xsl:​when>​ 
- <​xsl:​otherwise>Notes</xsl:​otherwise+  <​xsl:​otherwise>​Price <​xsl:​value-of select="​$nauda"/></​xsl:​otherwise>​ 
- </​xsl:​choose>​ +  </​xsl:​choose></​th
- </​xsl:​variable>​ +      <th><​xsl:​choose>​ 
-<​xsl:​variable name="field13"> +  <​xsl:​when test="/​documents/document/keel=''​">Summa <xsl:value-of select="$nauda"/></​xsl:​when>​ 
- <xsl:choose>​ +  <​xsl:​otherwise>​Total <xsl:value-of select="$nauda"/></​xsl:​otherwise>​ 
- <​xsl:​when test="$lang='​LV'​">Summa bez PVN</xsl:when> +  </​xsl:​choose></​th
- <xsl:​otherwise>​Sum w/o VAT</​xsl:​otherwise+     ​</tr
- </xsl:choose> +     ​</xsl:if
- </xsl:variable>​ +      
-<​xsl:​variable name="field14"> +     <xsl:if test="position()=last()">​ 
- <xsl:choose+      <tr><td colspan="6" ​style="border-width:0px;">&#160;</td></tr
- <xsl:when test="​$lang='​LV'​">​Nr.</​xsl:​when+     ​</xsl:if
- <xsl:​otherwise>​No</​xsl:​otherwise>​ +      
- </​xsl:​choose>​ +     </xsl:for-each
- </​xsl:​variable>​ +      
-<​xsl:​variable name="field15">​ +    ​</table>
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'">​Kods</xsl:when> +
- <​xsl:​otherwise>​Item</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field16"> +
- <​xsl:​choose>​ +
- <​xsl:​when test="​$lang='​LV'">​Nosaukums</​xsl:​when>​ +
- <​xsl:​otherwise>​Description</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:variable name="field17"> +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='LV'"​>​Mērv.<​/xsl:when> +
- <​xsl:​otherwise>​Unit</xsl:​otherwise+
- </​xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field18"> +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='LV'">​Daudz.</xsl:when+
- <xsl:otherwise>Qty</xsl:​otherwise>​ +
- </xsl:choose> +
- </xsl:​variable+
-<xsl:​variable name="field19"> +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='​LV'​">​Cena<​/xsl:when> +
- <​xsl:​otherwise>​Price</xsl:​otherwise+
- </xsl:choose> +
- </xsl:​variable+
-<xsl:​variable name="​field20"​> +
- <​xsl:​choose>​ +
- <​xsl:​when test="​$lang='​LV'">​Cena ar %</xsl:when+
- <xsl:​otherwise>Price w/ %</xsl:​otherwise+
- </xsl:choose> +
- </xsl:​variable+
-<xsl:variable name="field21">​ +
- <xsl:choose> +
- <xsl:when test="​$lang='​LV'"​>PVN</xsl:when+
- <​xsl:​otherwise>​VAT</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:variable name="field22">​ +
- <xsl:choose> +
- <xsl:when test="$lang='​LV'​">​Summa</​xsl:when> +
- <​xsl:​otherwise>​Sum</xsl:​otherwise> +
- </xsl:choose+
- </xsl:variable>​ +
-<​xsl:​variable name="field23"> +
- <xsl:choose+
- <xsl:when test="$lang='​LV'​">Kopā bez PVN</xsl:when+
- <xsl:otherwise>​Subtotal w/o VAT</xsl:otherwise>​ +
- </xsl:choose>​ +
- </xsl:variable>​ +
-<xsl:variable name="​field24">​ +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='​LV'​">Kopā ar PVN</xsl:when+
- <​xsl:​otherwise>​Total</xsl:​otherwise+
- </xsl:choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field25"> +
- <xsl:choose+
- <xsl:when test="$lang='​LV'​">Summa apmaksai</xsl:when+
- <​xsl:​otherwise>​Amount Due</​xsl:​otherwise>​ +
- </xsl:choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field26"> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='​LV'​">​Priekšapmaksa</xsl:when+
- <xsl:otherwise>​Amount Paid</​xsl:otherwise>​ +
- </​xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="​field27">​ +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='​LV'​">Summa vārdiem<​/xsl:when+
- <xsl:otherwise>Amount to be paid in words</xsl:​otherwise>​ +
- </xsl:choose+
- </xsl:variable>​ +
-<​xsl:​variable name="​field28">​ +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='​LV'​">Kavēto maksājumu uzraudzība tiek veikta sadarbībā ar SIA CreditReform Latvija.<​/xsl:when+
- <​xsl:​otherwise>​Late payments are monitored in cooperation with CreditReform Latvija SIA.</xsl:​otherwise+
- </xsl:choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field29"> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='​LV'​">​Paraksts</xsl:when+
- <xsl:​otherwise>​Signature</​xsl:​otherwise+
- </​xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="field30">​ +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'">​Jur. adrese</​xsl:​when>​ +
- <​xsl:​otherwise>​Address</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:​variable name="field31">​ +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'">​Izsniedza</​xsl:​when>​ +
- <​xsl:​otherwise>​Issued by</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:​variable name="​field32"​> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'">​Pieņēma</​xsl:​when>​ +
- <​xsl:​otherwise>​Customer</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:​variable name="​field33"​> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'">​ar pārskaitījumu</​xsl:​when>​ +
- <​xsl:​otherwise>​by bank transfer</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </​xsl:​variable> +
-<xsl:​variable name="​field34"​+
- <xsl:choose>​ +
- <​xsl:​when ​test="​$lang='​LV'​"><​xsl:​value-of select="/​documents/​document/​lisa_field1"/​></xsl:when+
- <xsl:otherwise>​ +
- <​xsl:​if ​test="/​documents/​document/​lisa_field1='Kurjers'">​Courier</xsl:if+
- <xsl:if test="/​documents/​document/​lisa_field1='​Pašizvešana'"​>Self-pickup</xsl:if+
- <​xsl:​if test="/​documents/​document/​lisa_field1='​Omniva SIA'">​Omniva SIA</xsl:if> +
- </​xsl:​otherwise> +
- </xsl:choose+
- </xsl:variable+
-<xsl:​variable name="​field35"​> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='LV'"><​xsl:​value-of select="​js:​numText(string(format-number(/​documents/​document/​converted_tasuda div 100 - /​documents/​document/​ettemaks,​ '​0.00'​)),​string($nauda))" /></​xsl:​when>​ +
- <​xsl:​otherwise><​xsl:​value-of select="​js:​numTextEng(string(format-number(/​documents/​document/​converted_tasuda div 100 - /​documents/​document/​ettemaks,​ '​0.00'​)),​string($nauda))" /></​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:​variable name="​field36"​> +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='​LV'">​gada&#​160;<​/xsl:​when>​ +
- <​xsl:​otherwise><​/xsl:​otherwise>​ +
- </xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="​field40"> +
- <xsl:choose>​ +
- <​xsl:​when test="$lang='​LV'​">Atlaides summa:</​xsl:​when>​ +
- <​xsl:​otherwise>​Total ​discount:</xsl:otherwise>​ +
- </​xsl:​choose>​ +
- </​xsl:​variable>​ +
-<​xsl:​variable name="​field38">​ +
- <​xsl:​choose>​ +
- <​xsl:​when test="$lang='​LV'​">​Darījuma apraksts<​/xsl:when> +
- <​xsl:​otherwise>​Nature of transaction</​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </xsl:​variable+
-<xsl:​variable name="​field39"​+
- <xsl:choose+
- <xsl:when test="$lang='​LV'​ and $dveids=1">preču realizācija</​xsl:​when+
- <xsl:when test="​$lang='​ENG'​ and $dveids=1"​>sale of goods</​xsl:​when>​ +
- <​xsl:​when test="$lang='​LV'​ and $dveids=2">​pakalpojumu realizācija</​xsl:​when>​ +
- <​xsl:​when test="$lang='​ENG'​ and $dveids=2">​service</​xsl:when> +
- <​xsl:​when test="​$lang='​LV'​ and $dveids=0">preču un pakalpojumu realizācija</xsl:when> +
- <​xsl:​when test="​$lang='​ENG'​ and $dveids=0">​sale of goods and service</xsl:when+
- <​xsl:​otherwise>&#​160;​</xsl:otherwise+
- </xsl:choose+
- </xsl:​variable>+
  
-      ​<meta http-equiv="Content-Type" ​content="text/html; charset=utf-8"></​meta+    ​<table class="main_table" ​cellspacing="0" cellpadding="0"
-      <html><head> +    <tr><td style="​text-align:​left;​ border-width:​0px;"​><​xsl:​value-of select="​documents/​document/​kommentaar"/></​td></tr
- <​title>​ +    </table>
- Invoice no&#​160;​<​xsl:​value-of select="​/documents/​document/​number"/> +
- </title> +
- <link href="​https://​fonts.googleapis.com/​css?​family=Roboto|Roboto+Condensed:​300,​400&​amp;​display=swap&​amp;​subset=latin-ext"​ rel="​stylesheet" ​/> +
- </head>+
  
-<style+    ​<table class="​main_table"​ height="​260"​ cellspacing="​0"​ cellpadding="​0"​
-.table2 ​ { +    <​tr style="​height:​220px;">​ 
-   border-collapsecollapse+    <​td style="​text-align:​left; ​border-width:0px;"> 
- border: ​inset; +     
- border-width: ​2px 2px 0px 2px; +    <div style="​border:solid #B4B4B4; border-width:​2px 0px 2px 0pxdisplay:​table;​ width:​660px;">​ 
- } +     ​ 
-th { +     <div style="​float:​left;​ width:​350px;"​ valign="​top"​ align="​left">​ 
- border-right1px solid lightgray+  <​table width="​100%"​ border="​0"​ cellapdding="​0"​ cellspacing="​0"​ align="​left">​ 
- } +   <​tr>​ 
-.table3 ​ { +   <td align="​left"​ style="​border-width0px 0px 0px 0px;"> 
- border2px inset; +   <​xsl:​choose>​ 
- border-collapsecollapse; +      <​xsl:​when test="/​documents/​document/​keel=''">​ 
- } +      <​xsl:​choose>​ 
-.td3 { +       <​xsl:​when test="/​documents/​document/​ettemaks!=''​ and /​documents/​document/​ettemaks!=0">​ 
-   border-right1px solid white+    <​xsl:​choose>​ 
- } +   <​xsl:​when test="​$nauda='​LVL'​ or $nauda='​EUR'">​ 
-.divider { +        <​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>​ 
- clear:both; +     </xsl:choose> 
- height30px+    </​xsl:​when>​ 
- } +       <​xsl:​otherwise>​ 
-.divsmall { +    <​xsl:​choose>​ 
- clear:both; +   <​xsl:​when test="​$nauda='​LVL'​ or $nauda='​EUR'">​ 
- height5px+        <​xsl:​value-of select="​js:numText(string(format-number(/​documents/​document/​converted_tasuda div 100, '​0.00',​ '​N'​)),​string($nauda))"​ /></​xsl:​when>​ 
- } +     </​xsl:​choose>​ 
-.bottom { +       </​xsl:​otherwise>​ 
- height240px+      </​xsl:​choose>​ 
- } +      </​xsl:​when>​ 
-.top { +         <​xsl:​when test="/​documents/​document/​keel!=''">​ 
- height350px+      <​xsl:​choose>​ 
- } +       <​xsl:​when test="/​documents/​document/​ettemaks!=''​ and /​documents/​document/​ettemaks!=0">​ 
-.RobotoNimi { +    <​xsl:​choose>​ 
- font-size10.0pt+   <​xsl:​when test="​$nauda='​LVL'​ or $nauda='​EUR'">​ 
- font-family: 'Roboto Condensed', sans-serif; +        <​xsl:​value-of select="​js:​numTextEng(string(format-number((/​documents/​document/​converted_tasuda div 100)-(/​documents/​document/​ettemaks),​ '0.00'​)),​string($nauda))"​ /> 
- } + </​xsl:​when>​ 
-.Roboto10 { +     </​xsl:​choose>​ 
- font-size10.0pt+    </​xsl:​when>​ 
- font-family: 'Roboto Condensed', sans-serif+       <​xsl:​otherwise>​ 
- } +    <​xsl:​choose>​ 
-.Roboto8 { +   <​xsl:​when test="​$nauda='​LVL'​ or $nauda='​EUR'">​ 
- font-size9.0pt+        <​xsl:​value-of select="​js:​numTextEng(string(format-number((/​documents/​document/​converted_tasuda div 100), '​0.00'​)),​string($nauda))"​ /></​xsl:​when>​ 
- font-family: 'Roboto Condensed', ​sans-serif+     </​xsl:​choose>​ 
- } +       </​xsl:​otherwise>​ 
-.PageNumbers { +      </​xsl:​choose>​ 
- font-size9.0pt+      </​xsl:​when>​ 
- font-family: 'Roboto Condensed', sans-serif+      </​xsl:​choose>​ 
- padding1px+   </​td>​ 
- text-alignright; +   </​tr>​ 
- width660px+   <​xsl:​for-each select="/​documents/​kmkoodid/​kmkood">​ 
- } +   <​tr>​ 
-.FooterText { +   <td align="​left"​ style="​border-width0px 0px 0px 0px;"> 
- font-size8.0pt+       <​xsl:​choose>​ 
- font-weightbold+   <​xsl:​when test="​km='​9'">​ 
- font-family: 'Roboto', sans-serif+         <​xsl:​choose>​ 
- colordimgray; + <​xsl:​when test="/​documents/​document/​keel!=''">​Article 138 (1) of the EU VAT Directive (2006/​112/​EC)</​xsl:​when>​ 
- padding-left: ​2px+ <​xsl:​otherwise>​Direktīvas 2006/112/EK 138panta 1. punkts</​xsl:​otherwise>​ 
- } +  </​xsl:choose><​!--Summa--><​br /> 
-.HeaderText { +   </xsl:when> 
- font-size12.0pt+    <​xsl:​when test="​km!='​9'">​ 
- font-weightbold+   &#160
- font-family: 'Roboto Condensed', sans-serif+   </​xsl:​when>​ 
- colordimgray+   </​xsl:​choose>​ 
- } +   </​td>​ 
-.bottomtext { +   </​tr>​ 
- font-size9.0pt+      </xsl:for-each>​ 
- font-family: 'Roboto Condensed', ​sans-serif+   <​tr>​ 
- vertical-align: bottom; +   <​td ​ align="​left"​ style="​border-width0px 0px 0px 0px;"> 
- font-weight:​ bold; + <​xsl:​choose>​ 
- } +  <​xsl:​when test="/​documents/​document/​keel=''">​Izrakstīja:</​xsl:​when>​ 
-</style+  <​xsl:otherwise>​Salesman:</​xsl:​otherwise>​ 
- + </​xsl:​choose><​!--Izrakstīja-->&#​160;<​xsl:​value-of select="/​documents/​document/​myyja_nimi"​ /> 
-         ​<body+   </td> 
-     ​<center+   </tr> 
-<​div ​class="top">​ +   </​table>​ 
-<div class="divsmall"></​div>​ +     </​div>​ 
-<table border="​0" ​width="660" ​cellpadding="​0" ​cellspacing="​0">​ +      
- <tr+     <​div style="​float:leftwidth:​150px;​ text-align:​right;">​ 
- <td width="100%" ​valign="bottom" ​align="left">​ +   <table width="​100%"​ border="​0"​ cellapdding="​0"​ cellspacing="​0">​ 
- <IMG SRC="​http://​directo.gate.ee/​logos/​files/​dentoflex_lv_den1.jpg" ​BORDER="0" height="​100px"​ align="​left"/>+   <xsl:if test="​$atlaide!=0">​ 
 +   <​tr>​ 
 +   <td width="​50%"​ align="​right"​ style="​border-width0px 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-width0px 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:&#​160;<​xsl:​value-of select="​ilmakm"​ />​%:</​xsl:​when>​ 
 + <​xsl:​otherwise>​VAT&#​160;<​xsl:​value-of select="​ilmakm"​ />​%:</​xsl:​otherwise>​ 
 +  </​xsl:​choose>​ 
 +   </td> 
 +   </​tr>​ 
 +      </​xsl:​for-each> 
 +   <​tr>​ 
 +   <td width="​50%"​ align="​right"​ style="​border-width0px 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-width0px 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-width0px 0px 0px 0px;"> 
 +   <​xsl:​value-of select="​format-number(sum(msxsl:node-set($atlaides_summa)/​a_summa),​'0.00')" />&#​160;<​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'​)"​ />&#​160;<​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'​)"​ />&#​160;<​xsl:​value-of select="​$nauda"​ /> 
 +   </td> 
 +   </tr> 
 +      </​xsl:​for-each> 
 +   <​tr>​ 
 +   <td width="​50%"​ align="​right"​ style="​border-width0px 0px 0px 0px;">​ 
 +<​xsl:​value-of select="​format-number(/​documents/​document/​converted_tasuda div 100,'0.00'​)"​ />&#​160;<​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-width0px 0px 0px 0px;"> 
 +<​xsl:​value-of select="​format-number(/​documents/​document/​ettemaks,​ '​0.00'​)"​ />&#​160;<​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'​)"​ />&#​160;<​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-->&#​160;<​xsl:value-of select="/​documents/​footer/​firma_aa"​ /> 
 +     </​div>​ 
 +      
 +     <​div style="​float:​leftwidth:​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 &gt$rekina_summa">​ 
 +  <​tr>​ 
 +   <td style="​padding:2pxmargin-bottom:​5px;​ border:0px solid #​000000;"​ width="​50%">​ 
 +   &#160; 
 +   </td> 
 +    <​td style="​padding:​2px;​ margin-bottom:5pxborder:2px solid #​000000;">​ 
 +<​xsl:​value-of select="​$neapm_summa"​ />&#​160;​ 
 +<xsl:value-of select="​$nauda"​ /> 
 +   </​td>​ 
 +   </​tr>​ 
 +   </​xsl:​if>​ 
 +   <​tr>​ 
 +   <td style="​padding:​2px;​ margin-bottom:​5px;​ border:0px solid #​000000;"​ width="​50%">​ 
 +   &#​160;​ 
 +   </​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'​)"​ /> 
 +   &#​160;​ 
 +<​xsl:​value-of select="​$nauda"​ /> 
 +        </​xsl:​when>​ 
 +        <​xsl:​otherwise>​ 
 + <​xsl:​value-of select="​format-number((/​documents/​document/​converted_tasuda div 100) + $parads, '​0.00'​)"​ />&#​160
 +<​xsl:​value-of select="​$nauda"​ /> 
 +        </xsl:otherwise>​ 
 +       </​xsl:​choose>​ 
 +   </​td>​ 
 +   </​tr>​-->​ 
 +   <​tr>​ 
 +   <td style="​padding:​2px;​ margin-bottom:5pxborder:0px solid #​000000;"​ width="​50%">​ 
 +   &#​160;​ 
 +   </​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&​gt;​$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'​)"/>&#​160;<​xsl:​value-of select="​$nauda"/><​br /
 +   Neapmaksāto rēķinu kopsumma: ​<xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo ​div $eiro, '​0.00'​)"/>&#​160;<​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'​)"/>&#​160;<​xsl:​value-of select="​$nauda2"/><​br /> 
 +   Neapmaksāto rēķinu kopsumma: <​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo ​div $eiro, '​0.00'​)"/>&#​160;<​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')"/>&#​160;<​xsl:​value-of select="$nauda"/><​br /> 
 +   Unpaid invoices total:<​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo div $eiro, '0.00')"/>&#​160;<​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'​)"/>&#​160;<​xsl:​value-of select="$nauda2"/><br /> 
 +   Unpaid invoices total:<​xsl:​value-of select="​format-number(/​documents/​kontakt/​saldo div $eiro, '​0.00'​)"/>&#​160;<​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>​  </​td>​
- <​td>​ 
- <IMG SRC="​http://​directo.gate.ee/​logos/​files/​dentoflex_lv_sch.jpg"​ BORDER="​0"​ height="​100px"​ align="​right"/>​ 
- </​td>​ 
- </​tr>​ 
-<tr> 
- <td width="​330"​ class="​HeaderText">​ 
- <br /> 
- <b> 
- <​xsl:​value-of select="​$field1"/>:​ <​xsl:​value-of select="​$datums"​ /> 
- </​b>​ 
- </​td>​ 
- <td width="​330"​ class="​HeaderText"​ align="​right">​ 
- <br /> 
- <​b><​xsl:​value-of select="​$field2"/>&#​160;<​xsl:​value-of select="/​documents/​document/​prefix"/><​xsl:​value-of select="/​documents/​document/​number"/></​b>​ 
- </​td>​  
- </​tr>​ 
-</​table>​ 
-<hr width="​660"></​hr>​ 
-<table border="​0"​ width="​660"​ cellpadding="​0"​ cellspacing="​0">​ 
- <tr> 
- <td width="​330"​ valign="​top"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field3"/>:​ <​b><​xsl:​value-of select="/​documents/​footer/​firma_nimi"/></​b>​ 
- </​td>​ 
- <td width="​330"​ valign="​top"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field4"/>:​ <​b><​xsl:​value-of select="/​documents/​document/​klient_nimi"/></​b>​ 
- </​td>​  
- </​tr>​ 
- <tr> 
- <td width="​330"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field5"/>:​ <​xsl:​value-of select="/​documents/​footer/​firma_kmnr"/>​ 
- </​td>​ 
- <td width="​330"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field5"/>:​ <​xsl:​value-of select="/​documents/​document/​kmregnumber"/>​ 
- </​td>​  
- </​tr>​ 
- <tr> 
- <td width="​330"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field6"/>:​ <​xsl:​value-of select="/​documents/​footer/​firma_regnr"/>​ 
- </​td>​ 
- <td width="​330"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field6"/>:​ <​xsl:​value-of select="/​documents/​kontakt/​regnr"/>​ 
- </​td>​  
- </​tr>​ 
- <tr> 
- <td width="​330"​ valign="​top"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field30"/>:​ <​xsl:​value-of select="​normalize-space(concat(/​documents/​footer/​firma_aadress,'​ ',/​documents/​footer/​firma_aadress2))"/>​ 
- 
- </​td>​ 
- <td width="​330"​ valign="​top"​ class="​Roboto10">​ 
- <​xsl:​value-of select="​$field30"/>:​ <​xsl:​value-of select="​normalize-space(concat(/​documents/​document/​aadress1,'​ ',/​documents/​document/​aadress2))"/>​ 
- </​td>​  
- </​tr>​ 
- <​!--<​tr>​ 
- <td width="​330"​ class="​Roboto10">​ 
- Kredītiestādes nosaukums: <​xsl:​value-of select="/​documents/​footer/​firma_pank"/>​ 
- </​td>​ 
- <td width="​330"​ class="​Roboto10">​ 
- Kredītiestādes nosaukums: <​xsl:​value-of select="/​documents/​kontakt/​klient_pank_nimi"/> ​ 
- </​td>​  
- </​tr>​ 
- <tr> 
- <td width="​330"​ class="​Roboto10">​ 
- N/Konts: <​xsl:​value-of select="/​documents/​footer/​firma_aa"/>​ 
- </​td>​ 
- <td width="​330"​ class="​Roboto10">​ 
- N/Konts: <​xsl:​value-of select="/​documents/​kontakt/​arveldusarve"/>​ 
- </​td>​  
  </​tr>​-->​  </​tr>​-->​
- <​tr>​ +    ​<​tr>​ 
- <​td ​width="​330"​ valign="​top"​ class="​Roboto10">​ +    <td style="​text-align:​left; ​border-width:0px;">​ 
- <​xsl:​value-of select="​$field7"/>:​ <​xsl:​value-of select="/​documents/​document/​ladu_aadress"/>​ +     
- </​td>​ +     
- <td width="​330"​ valign="​top"​ class="​Roboto10">​ +    </​td>​ 
- <​xsl:​value-of select="​$field8"/>:​ <​xsl:​value-of select="​normalize-space(concat(/​documents/​document/​klientnimi_lahetusel,'​ ',/​documents/​document/​lahetusaadress1,'​ ',​documents/​document/​lahetusaadress2,'​ ',/​documents/​document/​lahetusaadress3))"/>​ +    </​tr>​ 
- </​td>​  +    </​table>​ 
- </​tr>​ +     
- +   ​</​div>​ <​!-- ​Konteinera beigas ​--> 
- </​table>​ +   ​</body
-<hr width="​660"></​hr>​ +   ​ 
-<​!--<​table border="​0"​ width="​660"​ cellpadding="​0"​ cellspacing="​0">​ +   ​</​html>​ 
- <​tr>​ +  </​xsl:​template>​
-  +
- </​tr>​  +
- <​tr>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​value-of select="​$field9"/>:​ <​b><​xsl:​value-of select="​$field34"/></​b>​ +
- </​td>​ +
- <td width="​330"​ class="​Roboto10">​ +
- TL vadītāja vārds, uzvārds: +
- </​td>​  +
- </​tr>​ +
- <​tr>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​if test="/​documents/​document/​lisa_field1='​Omniva SIA'"><​xsl:​value-of select="​$field6"/>:​ <​b>​40103527192</​b></​xsl:​if>&#​160;​ +
- </​td>​ +
- <td width="​330"​ class="​Roboto10">​ +
- Transportlīdzekļa reģ. Nr.: +
- </​td>​  +
- </​tr>​ +
-</​table>​ +
-<hr width="​660"></​hr>​-->​ +
-<table border="​0"​ width="​660"​ cellpadding="​0"​ cellspacing="​0">​ +
- <​tr>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​value-of select="​$field10"/>:&#​160;​ +
- <​xsl:​choose>​ +
- <​xsl:​when test="/​documents/​document/​tingimus_lisavaljad/​lisa[@kood='​LANG'​]=''">​ +
- <​xsl:​value-of select="​$field33"/>​ +
- </​xsl:​when>​ +
- <​xsl:​otherwise><​xsl:​value-of select="/​documents/​document/​tingimus_lisavaljad/​lisa[@kood='​LANG'​ and @param=$lang]"/></​xsl:​otherwise>​ +
- </​xsl:​choose>​ +
- </​td>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​value-of select="​$field38"/>:&#​160;<​xsl:​value-of select="​$field39"/>​ +
- </​td>​  +
- </​tr>​ +
- <​tr>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​value-of select="​$field11"/>:​ <​xsl:​value-of select="/​documents/​document/​aeg2"/>​ +
- </​td>​ +
- <td width="​330"​ class="​Roboto10">​ +
- <​xsl:​value-of select="​$field12"/>:​ <​xsl:​value-of select="/​documents/​document/​kommentaar"/>​ +
- </​td>​  +
- </​tr>​ +
-</​table></​div>​ +
-<xsl:if test="​$lppsk > 1"><​div class="​PageNumbers"><​xsl:​value-of select="​$lapa"/>&#​160;<​xsl:​value-of select="​1"/>/<​xsl:​value-of select="​$lppsk"/></​div></​xsl:​if>​ +
- <table class="​table2"​ width="​660"​ cellpadding="​0"​ cellspacing="​1">​ +
- <tr height="​12">​ +
-    <​th height="​10"​ width="​20"​ class="​Roboto8">​ +
-    ​ <​xsl:​value-of select="​$field14"/>​ +
-    </​th>​ +
-    <​!--th height="​10"​ width="​100"​ class="​Roboto8">​ +
-    ​ <​xsl:​value-of select="​$field15"/>​ +
-    </​th-->​ +
-    <​th height="​10"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field16"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​45"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field18"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​35"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field17"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​55"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field19"/>​ +
-    </​th>​ +
- <​xsl:​if test="​$discount!=''">​ +
- <th height="​10"​ width="​20"​ class="​Roboto8">​ +
-+
-    </​th>​ +
- <th height="​10"​ width="​60"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field20"/>​ +
-    </​th>​ +
- </​xsl:​if>​ +
-    <​th height="​10"​ width="​30"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field21"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​60"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field22"/>​ +
-    </​th>​ +
-    +
- </​tr>​ +
- </​table>​ +
- <table class="​table3"​ width="​660"​ height="​330"​ cellpadding="​0"​ cellspacing="​1" ​style="​max-height: 550px">​ +
- <​xsl:​for-each select="/​documents/​document/​rows/​row[rv=rn]">​ +
- <tr height="​12">​ +
-    <​td height="​10"​ width="​20" ​align="​left"​ valign="​top"​ class="​Roboto10 td3">​ +
-    <​xsl:value-of select="​position()"/>​. +
-    </​td>​ +
-    <​!--td height="​10"​ width="​100"​ align="​left" valign="​top"​ class="​Roboto10 td3">​ +
-    <​xsl:​value-of select="​artikkel"/>​ +
-    </​td-->​ +
-    <​td height="​10"​ align="​left"​ valign="​top"​ class="​RobotoNimi td3">​ +
- <​xsl:​value-of select="​keelne_seletus"/>​ +
-    </​td>​ +
-    <​td height="​10"​ width="​45"​ align="​center"​ valign="​top"​ class="​Roboto10 td3">​ +
- <​xsl:​if test="​kogus!=0">​  +
- <​xsl:​value-of select="​kogus"/>​ +
- </​xsl:​if>​ +
-    </​td>​ +
-    <​td height="​10"​ width="​35"​ align="​center"​ valign="​top"​ class="​Roboto10 td3">​ +
- <​xsl:​if test="​kogus!=0">​  +
- <​xsl:​value-of select="​arve_yhik"/>​ +
- </​xsl:​if>​ +
-    </​td>​ +
-    <​td height="​10"​ width="​55"​ align="​right"​ valign="​top"​ class="​Roboto10 td3">​ +
- <​xsl:​value-of select="​format-number((converted_hind) div 100,'​0.00'​)"/>​ +
-    </​td>​ +
- <​xsl:​if test="​$discount!=''">​ +
- <td height="​10"​ width="​20"​ align="​right"​ valign="​top"​ class="​Roboto10 td3">​ +
- <​xsl:​value-of select="​pross"/>​ +
-    </​td>​ +
- <td height="​10"​ width="​60"​ align="​right"​ valign="​top"​ class="​Roboto10 td3">​ +
- <​xsl:​value-of select="​format-number(rv_hind_ale div 100, '​0.00'​)"/>​ +
-    </​td>​ +
- </​xsl:​if>​ +
-    <​td height="​10"​ width="​30"​ align="​center"​ valign="​top"​ class="​Roboto10 td3">​ +
-    <​xsl:​variable name="​kmk"><​xsl:​value-of select="​kmk"/></​xsl:​variable>​ +
-    &#​160;<xsl:if test="/​documents/​kmkoodid/​kmkood[km=$kmk]/​ilmakm &gt;= 0"><​xsl:​value-of select="/​documents/​kmkoodid/​kmkood[km=$kmk]/​ilmakm"/>​%</​xsl:​if>​ +
-    </​td>​ +
-    <​td height="​10" ​width="​60"​ align="​right"​ valign="​top"​ class="​Roboto10 td3">​ +
- <xsl:if test="​converted_summa!=0">​  +
- <​xsl:​value-of select="​format-number((converted_summa) div 100,'​0.00'​)"/>​ +
- </​xsl:​if>​ +
-    </​td>​ +
- </​tr>​ +
- +
- <​xsl:​variable name="​pos"​ select="​position()"/>​ +
- <​xsl:​variable name="​rsk1"​ select="​sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt$pos])" ​/+
- <​xsl:​variable name="​rsk2"​ select="​sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt;= ($pos+1)])"​ /> +
-                   <xsl:if test="​(((sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos]) &lt; $ridu_lk1 and (sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; ($pos+1)]) > $ridu_lk1))) or ((((((sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos]))-$ridu_lk1) mod $ridu_lk2)>​(sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos+1]))-$ridu_lk1) mod $ridu_lk2) or (((sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos+1]))-$ridu_lk1) mod $ridu_lk2)=0)) and sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos+2])>​sum(msxsl:​node-set($ridu_lk)/​xaccum/​accum[../​pos &lt; $pos+1])">​ +
-                   <​tr><​td colspan="​7">​</td><​xsl:​if test="​$discount!=''"><​td></​td><​td></​td></​xsl:​if></​tr+
-                   ​<xsl:text disable-output-escaping="​yes">&​lt;​/table&​gt;</​xsl:​text><​h4 class="​pb">&#​160;</​h4>​ +
-                  <div class="​divider"></​div>​ +
- <div class="​PageNumbers"><​xsl:​value-of select="​$lapa"/>&#​160;<​xsl:​value-of select="​ceiling(($rsk2 - $ridu_lk1) div $ridu_lk2)+1"/>/<​xsl:​value-of select="​$lppsk"/></​div>​ +
- +
- <table class="​table2"​ width="​660"​ cellpadding="​0"​ cellspacing="​1">​ +
- <tr height="​12"​+
-    <​th height="​10"​ width="​20"​ class="​Roboto8">​ +
-    ​ <​xsl:​value-of select="​$field14"/>​ +
-    </​th>​ +
-    <​!--th height="​10"​ width="​100"​ class="​Roboto8">​ +
-    ​ <​xsl:​value-of select="​$field15"/>​ +
-    </​th-->​ +
-    <​th height="​10"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field16"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​45"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field18"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​35"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field17"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​55"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field19"/>​ +
-    </​th>​ +
- <​xsl:​if test="​$discount!=''">​ +
- <th height="​10"​ width="​20"​ class="​Roboto8">​ +
-+
-    </​th>​ +
- <th height="​10"​ width="​60"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field20"/>​ +
-    </​th>​ +
- </​xsl:​if>​ +
-    <​th height="​10"​ width="​30"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field21"/>​ +
-    </​th>​ +
-    <​th height="​10"​ width="​60"​ class="​Roboto8">​ +
- <​xsl:​value-of select="​$field22"/>​ +
-    </​th>​ +
-    +
- </​tr>​ +
-  +
-</​table>​<​xsl:​text disable-output-escaping="​yes">&​lt;​table class="​table3"​ width="​660"​ height="​650"​ cellpadding="​0"​ cellspacing="​1"​ style="​max-height:​ 850px"&​gt;</​xsl:​text></​xsl:​if>  ​ +
- </​xsl:​for-each>​ +
- <​tr><​td colspan="​6">​</td> +
- <xsl:if test="​$discount!=''"><​td class="​bottomtext"​ align="​right"​ colspan="​2"><​xsl:​value-of select="​$field40"/></​td></​xsl:​if>​ +
- <td class="​bottomtext"><​xsl:​if test="​$discount!=''">&#​160;<​xsl:​value-of select="​format-number(sum(msxsl:​node-set($atlaides_summa)/​a_summa),'​0.00'​)"​ />&#​160;<​xsl:​value-of select="​$nauda"​ /></​xsl:​if></​td>​ +
- </​tr>​ +
- </​table>​ +
-<div class="​bottom"​> +
- <table border="​0"​ width="​660">​ +
- <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"></​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"></​td>​ +
- </​tr>​ +
- <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​xsl:​value-of select="​$field23"/>:</​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​xsl:​value-of select="​format-number(/​documents/​document/​kokku,'​0.00'​)"/>&#​160;<​xsl:​value-of select="​$nauda"/></​td>​ +
- </​tr>​ +
-        <​xsl:​for-each select="/​documents/​kmkoodid/​kmkood">​ +
-         <​xsl:​if test="​summa!=0 and count(/​documents/​kmkoodid/​kmkood) &gt; 1">​ +
-   <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​xsl:​value-of select="​$field13"/>​ <​xsl:​value-of select="​ilmakm"​ />​%:</​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​xsl:​value-of select="​format-number(summa div 100,'​0.00'​)"​ />&#​160;<​xsl:​value-of select="​$nauda"/></​td+
-   ​</tr></​xsl:​if+
- <xsl:if test="​summa!=0">​ +
-   <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"><​xsl:​value-of select="​./​kmkoodi_lisavaljad/​lisa[@kood='​ATSAUCE'​]"​ /></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​xsl:​value-of select="​$field21"/>&#​160;<​xsl:​value-of select="​ilmakm"​ />​%:</​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​xsl:​value-of select="​format-number(summakm div 100,'​0.00'​)"​ />&#​160;<​xsl:​value-of select="​$nauda"/></​td>​ +
-   </​tr>​ +
-         </​xsl:​if>​ +
-        </​xsl:​for-each>​ +
- <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​xsl:​value-of select="​$field24"/>:</​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​xsl:​value-of select="​format-number(/​documents/​document/​converted_tasuda div 100,'​0.00'​)"/>&#​160;<​xsl:​value-of select="​$nauda"/></​td>​ +
- </​tr>​  +
- <​xsl:​if test="/​documents/​document/​ettemaks &gt; '​0.00000001'">​ +
- <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​b><​xsl:​value-of select="​$field26"/>​ (<​xsl:​value-of select="​format-number((/​documents/​document/​ettemaks div (/​documents/​document/​converted_tasuda div 100) * 100), '​00'​)"/>​%):</​b></​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​b><​xsl:​value-of select="​format-number(/​documents/​document/​ettemaks,'​0.00'​)"/>&#​160;<​xsl:​value-of select="​$nauda"/></​b></​td>​ +
- </​tr>​ +
- </​xsl:​if>​ +
- <tr height="​12">​ +
-    <​td width="​360"​ class="​Roboto10"​ height="​10"></​td>​ +
-    <​td width="​220"​ class="​Roboto10"​ height="​10"​ align="​right"><​b><​xsl:​value-of select="​$field25"/>:</​b></​td>​ +
-    <​td width="​100"​ align="​right"​ class="​Roboto10"​ height="​10"><​b><​xsl:​value-of select="​format-number(/​documents/​document/​converted_tasuda div 100 - /​documents/​document/​ettemaks,'​0.00'​)"/>&#​160;<​xsl:​value-of select="​$nauda"/></​b></​td>​ +
- </​tr>​ +
- <tr height="​22">​ +
- <td width="​660"​ colspan="​4"​ valign="​bottom"​ class="​Roboto10"​ height="​20">​ +
-        <​xsl:​value-of select="​$field27"/>:&#​160;<​span style="​font-style:​ italic;"><​xsl:​value-of select="​$field35"​ /></​span>​ +
- </​td>​ +
-      </​tr>​ +
-      +
-      <​!--<​xsl:​if test="​(/​documents/​kmkoodid/​kmkood[km=0]/​summa>​0) or (/​documents/​kmkoodid/​kmkood[km=4]/​summa>​0)">​ +
- <​tr>​ +
- <td width="​660"​ colspan="​3"​ class="​Roboto10"​ height="​10">​ +
-   PVN tiek aprēķināts saskaņā ar likuma par PVN 7. panta 7. punktu +
- </​td>​ +
- </​tr>​ +
-      </​xsl:​if>​-->​ +
-       +
- <tr height="​12">​ +
- <td width="​660"​ colspan="​3"​ class="​Roboto10"​ height="​10">​ +
-   <​xsl:​value-of select="​$field28"/>​ +
- </​td>​ +
- </​tr>​ +
- </​table>​ +
-</​div>​ +
- <table border="​0"​ width="​660">​ +
- <tr height="​12">​ +
-    <​td width="​50"​ class="​Roboto10">&#​160;</​td>​ +
-    <​td width="​340"​ class="​Roboto10"><​xsl:​value-of select="​$field31"/>:​ <​xsl:​value-of select="/​documents/​document/​myyja_andmed/​nimi"/></​td>​ +
-    <​td width="​270"​ class="​Roboto10"><​xsl:​value-of select="​$field32"/>:&#​160;​_________________________</​td>​ +
- </​tr>​ +
- <​tr>​ +
-    <​td width="​50">&#​160;</​td>​ +
-    <​td width="​340">&#​160;</​td>​ +
-    <​td width="​270">&#​160;</​td>​ +
- </​tr>​ +
- <tr height="​12">​ +
-    <​td width="​50"​ class="​Roboto10">&#​160;</​td>​ +
-    <​td width="​340"​ class="​Roboto10"><​xsl:​value-of select="​$field29"/>&#​160;​_________________</​td>​ +
-    <​td width="​270"​ class="​Roboto10"><​xsl:​value-of select="​$field29"/>&#​160;​_________________</​td>​ +
- </​tr>​ +
- <tr height="​12">​ +
- <​xsl:​variable name="​year1"​ select="​substring(/​documents/​document/​aeg_date,​7,​4)"​ /> +
-    <​td width="​50"​ class="​Roboto10">&#​160;</​td>​ +
-    <​td width="​340"​ class="​Roboto10"><​xsl:​value-of select="​$field1"/>:​ <​xsl:​value-of select="​documents/​document/​aeg_date"/></​td>​ +
- <td width="​270"​ class="​Roboto10"><​xsl:​value-of select="​$field1"/>:​ <​xsl:​value-of select="​$year1"/>​.&#​160;<​xsl:​value-of select="​$field36"/>​___ .&#​160;​__________</​td>​ +
- </​tr>​ +
- </​table>​ +
-<div class="​divsmall"></​div>​ +
-<hr width="​660"></​hr>​ +
-<table width="​660">​ +
-<​tr>​ +
-<td class="​FooterText"​ width="​190"><​xsl:​value-of select="/​documents/​footer/​firma_nimi"/></​td>​ +
-<td class="​FooterText"​ width="​320"><​xsl:​value-of select="/​documents/​footer/​firma_aadress"/>&#​160;<​xsl:​value-of select="/​documents/​footer/​firma_aadress2"/></​td>​ +
-<td class="​FooterText"​ width="​150"><​xsl:​value-of select="/​documents/​footer/​firma_iban"/></​td>​ +
-</​tr>​ +
-<​tr>​ +
-<td class="​FooterText"​ width="​190"><​xsl:​value-of select="/​documents/​footer/​firma_regnr"/></​td>​ +
-<td class="​FooterText"​ width="​320"><​xsl:​value-of select="/​documents/​footer/​firma_telefon"/></​td>​ +
-<td class="​FooterText"​ width="​150"><​xsl:​value-of select="/​documents/​footer/​firma_pank"/></​td>​ +
-</​tr>​ +
-<​tr>​ +
-<td class="​FooterText"​ width="​190"><​xsl:​value-of select="/​documents/​footer/​firma_kmnr"/></​td>​ +
-<td class="​FooterText"​ width="​320"><​xsl:​value-of select="/​documents/​footer/​firma_email"/></​td>​ +
-<td class="​FooterText"​ width="​150"><​xsl:​value-of select="/​documents/​footer/​firma_swift"/></​td>​ +
-</​tr>​ +
-</​table>​ +
- </​center>​ +
- </​body>​ +
-      ​</​html>​ +
-   ​</​xsl:​template>​+
 <​msxsl:​script language="​JScript"​ implements-prefix="​js"><​![CDATA[ <​msxsl:​script language="​JScript"​ implements-prefix="​js"><​![CDATA[
-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 desmiti=['','','​divdesmit ','​trīsdesmit ','​četrdesmit ','​piecdesmit ','​sešdesmit ','​septiņdesmit ','​astoņdesmit ','​deviņdesmit ']; 
-function simti(str) { 
-res='';​ 
- 
-// pirmais cipars no labaas 
-if (str.charAt(1)=='​1'​) // chekojam pirmspeedeejo ciparu - ja viens tad vai nu desmit vai padsmit 
-res=padsmiti[parseInt(str.charAt(2))];​ 
-else res=cipari[parseInt(str.charAt(2))];​ 
- 
-// otrais cipars no labaas 
-if (str.charAt(0)=='​1'​) // ja treshais cipars no labaas ir 1 tad jaaraksta simts 
-res='​simts '​+desmiti[parseInt(str.charAt(1))]+res;​ 
-else if (str.charAt(0)!='​0'​) // ja treshais cipars no labaas nav 1 vai 0 tad jaaraksta simti 
-res='​simti '​+desmiti[parseInt(str.charAt(1))]+res;​ 
-else // ja nav simtu 
-res=desmiti[parseInt(str.charAt(1))]+res;​ 
- 
-// treshais cipars no labaas 
-res=cipari[parseInt(str.charAt(0))]+res;​ 
-return res; 
-} 
- 
-function numText(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='​mīnus '; 
-} 
- 
-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=='​LVL'​) { 
-if ((fullStr.charAt(9)=='​1'​) && (fullStr.charAt(8)!='​1'​)) resStr+='​lats';​ // lats vai lati 
-else if (parseInt(fullStr,​10)!=0) resStr+='​lati';​ 
-} else { 
-resStr+=nauda;​ 
-} 
-if (parseInt(fullStr.substring(7),​10)>​0) { 
-tempStr=fullStr.substring(7);​ // simti 
-tempRes=simti(tempStr);​ 
-resStr=tempRes+resStr;​ 
-} 
- 
-if (parseInt(fullStr.substring(4,​7),​10)>​0) { 
-tempStr=fullStr.substring(4,​7);​ // tūkstoši 
-tempRes=simti(tempStr);​ 
-if ((tempStr.charAt(2)=='​1'​) && (tempStr.charAt(1)!='​1'​)) tempRes+='​tūkstotis '; 
-else if (parseInt(tempStr,​10)!=0) tempRes+='​tūkstoši '; 
-resStr=tempRes+resStr;​ 
-} 
- 
-if (parseInt(fullStr.substring(1,​4),​10)>​0) { 
-tempStr=fullStr.substring(1,​4);​ // miljoni 
-tempRes=simti(tempStr);​ 
-if ((tempStr.charAt(2)=='​1'​) && (tempStr.charAt(1)!='​1'​)) tempRes+='​miljons '; 
-else if (parseInt(tempStr,​10)!=0) tempRes+='​miljoni '; 
-resStr=tempRes+resStr;​ 
-} 
- 
-if (fullStr.charAt(0)!='​0'​) { // miljardi 
-if (fullStr.charAt(0)=='​1'​) resStr='​viens miljards '​+resStr;​ 
-else resStr=cipari[parseInt(fullStr.charAt(0),​10)]+'​miljardi '​+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 ((aizpStr.charAt(aizpStr.length-1)=='​1'​) && (aizpStr.charAt(aizpStr.length-2)!='​1'​)) { 
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ cents';​ } else {resStr+='​ santīms';​ } 
-} else { 
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ centi';​ } else {resStr+='​ santīmi';​ } 
-} 
-} else { 
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ 00 centi';​ } else {resStr+='​ 00 santīmi';​ } 
-} 
- 
-return (minus+resStr);​ 
-} 
 var cipariEng=['','​one ','​two ','​three ','​four ','​five ','​six ','​seven ','​eight ','​nine ']; var cipariEng=['','​one ','​two ','​three ','​four ','​five ','​six ','​seven ','​eight ','​nine '];
-var padsmitiEng=['​ten ','​eleven ','​twelve ','​thirteen ','​fourteen ','​fifteen ','​sixteen ','​seventeen ','​eighteen ','​nineteen ']; + var padsmitiEng=['​ten ','​eleven ','​twelve ','​thirteen ','​fourteen ','​fifteen ','​sixteen ','​seventeen ','​eighteen ','​nineteen ']; 
-var desmitiEng=['','','​twenty ','​thirty ','​fourty ','​fifty ','​sixty ','​seventy ','​eighty ','​ninety '];+ var desmitiEng=['','','​twenty ','​thirty ','​fourty ','​fifty ','​sixty ','​seventy ','​eighty ','​ninety '];
  
-function simtiEng(str) { + function simtiEng(str) { 
-res='';​+  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; 
 + }
  
-// pirmais cipars no labaas + ​function numTextEng(skaitlis,​nauda) { 
-if (str.charAt(1)=='​1'​) // chekojam pirmspeedeejo ciparu ​- ja viens tad vai nu desmit vai padsmit +  fullStr='​0000000000';​ 
-res=padsmitiEng[parseInt(str.charAt(2))]+  tempStr='';​ 
-else res=cipariEng[parseInt(str.charAt(2))]+  tempRes='';​ 
- +  resStr='';​ 
-// otrais cipars no labaas +  minus='';​ 
-if (str.charAt(0)=='​1'​) ​// ja treshais cipars no labaas ir tad jaaraksta simts +   
-res='hundred ​'+desmitiEng[parseInt(str.charAt(1))]+res+  punkts=skaitlis.indexOf('​.'​);​ 
-else if (str.charAt(0)!='​0'​) // ja treshais cipars no labaas nav 1 vai 0 tad jaaraksta simti +  if (punkts==-1) { 
-res='hundred ​'+desmitiEng[parseInt(str.charAt(1))]+res+   ​pirmspStr=skaitlis;​ 
-else // ja nav simtu +   ​aizpStr='​0';​ 
-res=desmitiEng[parseInt(str.charAt(1))]+res+  } else { 
- +   ​pirmspStr=skaitlis.substring(0,​punkts);​ 
-// treshais cipars no labaas +   ​aizpStr=skaitlis.substring(punkts+1); 
-res=cipariEng[parseInt(str.charAt(0))]+res+  } 
-return ​res;+   
 +  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)!=0resStr+='​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 desmiti=['','','​divdesmit ','​trīsdesmit ','​četrdesmit ','​piecdesmit ','​sešdesmit ','​septiņdesmit ','​astoņdesmit ','​deviņdesmit '];
  
-function ​numTextEng(skaitlis,​nauda) { + function ​simti(str) { 
-fullStr='0000000000'; +  res='';​ 
-tempStr='';​ +   
-tempRes=''​; +  // pirmais cipars no labaas 
-resStr='';​ +  if (str.charAt(1)=='1') // chekojam pirmspeedeejo ciparu - ja viens tad vai nu desmit vai padsmit 
-minus='';​+   ​res=padsmiti[parseInt(str.charAt(2))]
 +  else res=cipari[parseInt(str.charAt(2))];​ 
 +   
 +  // otrais cipars no labaas 
 +  if (str.charAt(0)=='1') // ja treshais cipars no labaas ir 1 tad jaaraksta simts 
 +   res='simts '+desmiti[parseInt(str.charAt(1))]+res
 +  else if (str.charAt(0)!='0') // ja treshais cipars no labaas nav 1 vai 0 tad jaaraksta simti 
 +   ​res='​simti '​+desmiti[parseInt(str.charAt(1))]+res; 
 +  else // ja nav simtu 
 +   ​res=desmiti[parseInt(str.charAt(1))]+res;​ 
 +   
 +  // treshais cipars no labaas 
 +  res=cipari[parseInt(str.charAt(0))]+res;​ 
 +  return res; 
 + }
  
-punkts=skaitlis.indexOf('​.'​);​ + ​function numText(skaitlis,​nauda) { 
-if (punkts==-1) { +  fullStr='​0000000000';​ 
-pirmspStr=skaitlis;​ +  tempStr='';​ 
-aizpStr='​0';​ +  tempRes='';​ 
-} else { +  resStr='';​ 
-pirmspStr=skaitlis.substring(0,​punkts);​ +  minus='';​ 
-aizpStr=skaitlis.substring(punkts+1);​+   
 +  ​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='​mīnus '; 
 +  } 
 +   
 +  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 (parseInt(fullStr,​10)!=0) { 
 +    resStr+=nauda;​ 
 +  } else resStr+='​Nulle '​+nauda;​ 
 +   
 +  if (parseInt(fullStr.substring(7),​10)>​0) { 
 +   ​tempStr=fullStr.substring(7);​ // simti 
 +   ​tempRes=simti(tempStr);​ 
 +   ​resStr=tempRes+resStr;​ 
 +  } 
 +   
 +  if (parseInt(fullStr.substring(4,​7),​10)>​0) { 
 +   ​tempStr=fullStr.substring(4,​7);​ // t�ksto�i 
 +   ​tempRes=simti(tempStr);​ 
 +   if ((tempStr.charAt(2)=='​1'​) && (tempStr.charAt(1)!='​1'​)) tempRes+='​tūkstotis '; 
 +    else if (parseInt(tempStr,​10)!=0) tempRes+='​tūkstoši '; 
 +   ​resStr=tempRes+resStr;​ 
 +  } 
 +   
 +  if (parseInt(fullStr.substring(1,​4),​10)>​0) { 
 +   ​tempStr=fullStr.substring(1,​4);​ // miljoni 
 +   ​tempRes=simti(tempStr);​ 
 +   if ((tempStr.charAt(2)=='​1'​) && (tempStr.charAt(1)!='​1'​)) tempRes+='​miljons '; 
 +    else if (parseInt(tempStr,​10)!=0) tempRes+='​miljoni '; 
 +   ​resStr=tempRes+resStr;​ 
 +  } 
 +   
 +  if (fullStr.charAt(0)!='​0'​) { // miljardi 
 +   if (fullStr.charAt(0)=='​1'​) resStr='​viens miljards '​+resStr;​ 
 +    else resStr=cipari[parseInt(fullStr.charAt(0),​10)]+'​miljardi '​+resStr;​ 
 +  } 
 +   
 +  if (resStr!=''​) { // pirmais burts lielais 
 +   ​resStr=resStr.charAt(0).toUpperCase()+resStr.substring(1);​ 
 +  } 
 +   
 +  santimi=parseInt(aizpStr,​10);​ //santimi 
 +  if (santimi>​0) { 
 +   ​resStr+='​ '​+santimi;​ 
 +   ​tmpSant=santimi.toString();​ 
 +   if ((tmpSant.charAt(tmpSant.length-1)=='​1'​) && (tmpSant.charAt(tmpSant.length-2)!='​1'​)) { 
 +    resStr+='​ cents';​ 
 +   } else { 
 +    resStr+='​ centi';​ 
 +   } 
 +  } else { 
 +    resStr+='​ 00 centi';​ 
 +  } 
 +   
 +  return (minus+resStr);
 } }
  
-if (pirmspStr.charAt(0)=='​-'​) { // ja ar miinus ziimi + ]]></​msxsl:​script>​
-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 (nauda=='​LVL'​) { +
-if (parseInt(fullStr,​10)==1) resStr+='​lat';​ // lats vai lati +
-else if (parseInt(fullStr,​10)!=0) resStr+='​lats';​ +
-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) { +
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ cent'; } else {resStr+='​ santim';​ } +
-} else { +
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ cents';​ } else {resStr+='​ santims';​ } +
-+
-} else { +
-if (nauda=='​EUR'​ || nauda=='​USD'​) { resStr+='​ 00 cents';​ } else {resStr+='​ 00 santims';​ } +
-+
- +
-return (minus+resStr);​ +
-+
-]]></​msxsl:​script>​+
  
-</​xsl:​stylesheet>​+ </​xsl:​stylesheet>​
 </​code>​ </​code>​
lv/procedures.1595514713.txt.gz · Labota: 2020/07/23 17:31 , labojis marija