<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" version="1.0">
	<xsl:import href="../../../appl/shared/default.xsl"/>

	<xsl:variable name="Rev">
		<!-- Revision van deze cust.xsl -->
		<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
	</xsl:variable>

	<xsl:template name="stylesheet">
		<style>body {
       font-family: Verdana;
       background-color: rgb(255, 255, 255);
       margin-left:0px;
       margin-top:8px;
       cursor: auto;
    }

    table {
      border: 0;
    }

    table.details {
      background-color: #005566;
    }

    th {
      font-family: Verdana;
      font-size: 9pt;
      font-weight: normal;
      color: #ffffff;
      text-decoration: none;
      padding-left:  2px;
      padding-right: 2px;
      padding-top: 2px;
      padding-bottom: 2px;
      background-color: #005566;
    }

    td {
      font-family: Verdana;
      font-style: normal;
      font-size: 9pt;
      font-weight: normal;
      color:  #000000;
      text-align: left;
      vertical-align: top;
    }

    td.result {
      font-size: 9pt;
      text-decoration: none;
      padding-bottom: 2px;
      padding-top: 2px;
      padding-left: 2px;
      padding-right: 2px;
    }

    td.sec_heading {
      font-size: 9pt;
      text-decoration: none;
      padding-bottom: 2px;
      padding-top: 2px;
      padding-left: 2px;
      padding-right: 2px;
      text-align: left;
    }

    td.caption {
      font-size:   18pt;
      padding-bottom: 30px;
      padding-top: 40px;
    }

    td.subcaption {
      font-size: 10pt;
      font-weight: bold;
      text-decoration: underline;
    }

    td.label {
      font-size: 9pt;
    }

    td.value {
      font-style: italic;
      font-size: 9pt;
    }

    td.tekst {
      font-size: 9pt;
    }

    td.adres {
      font-size: 9pt;
      text-align: right;
    }

    td.tekstkop {
      font-weight: bold;
      font-size: 10pt;
    }

    td.tiny {
      font-size: 8pt;
      text-align: right;
    }

    .fatal {
       background-color: red;
       color: white;
       font-weight: bold;
       padding-left: 2px;
       padding-right: 2px;
    }</style>
	</xsl:template>

	<xsl:template name="pageheader">
		<table border="0" style="width:100%;border-collapse:collapse;">
			<tr>
				<td>
					<xsl:choose>
						<xsl:when test="$mode='email'">
							<img src="cid:tmpl_logo.gif" height="80px"/>
						</xsl:when>
						<xsl:otherwise>
							<!--img src="../../cust/wibc/tmpl_logo.jpg" height="60px"/-->
							<xsl:element name="img">
								<xsl:attribute name="src">../../cust/wibc/tmpl_logo.jpg</xsl:attribute>
								<xsl:attribute name="height">80px</xsl:attribute>
							</xsl:element>
						</xsl:otherwise>
					</xsl:choose>
				</td>
				<td class="tiny">
					Prinses Margrietplantsoen 33<br/>
					2595 AM The Hague<br/>
					The Netherlands<br/><br/>
					+31 (0)70 3043665<br/>
					businesscenter@wtcthehague.com<br/>
					www.businesscenterthehague.com
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="pagefooter">
		<table border="0" style="width:100%;border-collapse:collapse;">
			<tr><td height="10px"/></tr>
		</table>
	</xsl:template>

	<xsl:template match="reservering" mode="include">
		<style>.pagebreak {page-break-after:always;}</style>

    <table width="100%" border="0">
    <!--TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
      <TR>
        <TD WIDTH="40" ROWSPAN="30" ID="LINKERMARGE"/>
        <TD-->
      <xsl:choose>
        <xsl:when test="//header/language = 'NL'">
          <!-- De algemene gegevens van de deelreservering met het laagste volgnummer worden gebruikt als referentie gegevens! -->
          <xsl:variable name="min_volgnr">
            <xsl:value-of select="//facilitor/reservering/rsv_ruimte/volgnr[not(. &gt; //facilitor/reservering/rsv_ruimte/volgnr)]"/>
          </xsl:variable>
          <tr><td colspan="2"><xsl:call-template name="pageheader"/></td></tr>
          <!--tr><td colspan="2" height="40px"/></tr-->
          <tr><td colspan="2" class="tekst"><br/><br/>Den Haag, <xsl:value-of select="substring-before(//facilitor/header/dateTime,' ')"/></td></tr>
          <!--tr><td colspan="2" height="20px"/></tr-->
          <xsl:choose>
            <xsl:when test="$srtnotificatiecode='RESDEL' and verwijder">
              <tr>
              	<td colspan="2" class="tekst"><br/><br/><b>Betreft: Annulering reservering<xsl:text> </xsl:text>
                  <xsl:choose>
                    <xsl:when test="@content='complete'"><xsl:value-of select="key"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="key"/>/<xsl:value-of select="$min_volgnr"/></xsl:otherwise>
                  </xsl:choose>
              	</b></td>
              </tr>
              <!--tr><td colspan="2" height="20px"/></tr-->
              <tr>
              	<td colspan="2" class="tekst">
<br/><br/>Geachte heer / mevrouw,<br/>
<br/>
Hierbij bevestigen wij de <b>annulering</b> van uw reservering bij WTC The Hague Business Center.
              	</td>
              </tr>
              <tr>
                <td colspan="2">
                  <!--table cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" frame="box"-->
                  <table width="100%" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
                    <!-- rsv_ruimte -->
                    <xsl:for-each select="rsv_ruimte">
                      <xsl:sort select="van/timestamp"/>
                      <tr>
                        <td colspan="7" class="tekst">
<br/>
De annulering heeft betrekking op de volgende reservering:
                        </td>
                      </tr>
                      <!--tr><td colspan="7" height="10px"/></tr-->
                      <xsl:call-template name="rsv_ruimte"><xsl:with-param name="min_volgnr" select="$min_volgnr"/><xsl:with-param name="language" select="//header/language"/></xsl:call-template>
                      <!--tr><td colspan="7" height="20px"/></tr-->
                      <tr><td colspan="7" height="10px"/></tr>
                      <tr>
                        <td colspan="7" class="label">Alle genoemde prijzen zijn excl. BTW.</td>
                      </tr>
                      <tr>
                        <td class="label"><br/><b>Uw gegevens</b></td>
                        <td colspan="6" class="value"></td>
                      </tr>
                      <tr>
                        <td class="label">Aanvrager:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/naam_full"/></td>
                      </tr>
                      <tr>
                        <td class="label">E-mail:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/email"/></td>
                      </tr>
                      <tr>
                        <td class="label">Gastheer/-vrouw:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="kenmerk[@volgnummer='20']!=''"><xsl:value-of select="kenmerk[@volgnummer='20']"/></xsl:when>
                            <xsl:otherwise><xsl:value-of select="host_user/naam_full"/></xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <tr>
                        <td class="label">Omschrijving:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="omschrijving!=''"><xsl:value-of select="omschrijving"/></xsl:when>
                            <xsl:otherwise>-</xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <xsl:if test="opmerking!=''">
                        <tr>
                          <td class="label">Opmerkingen:</td>
                          <td colspan="6" class="value"><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="opmerking"/></xsl:call-template></td>
                        </tr>
                      </xsl:if>
                    </xsl:for-each>
                  </table>
                </td>
              </tr>
              <tr>
              	<td colspan="2" class="tekst">
<br/>
Wanneer uw reservering definitief geboekt stond in ons reserveringssysteem ging u akkoord met onze algemene voorwaarden.
De algemene voorwaarden heeft u reeds ontvangen en vindt u terug via de link onderaan deze bevestiging.<br/>
<br/>
Mochten er nog vragen zijn, dan helpen wij u graag.<br/>
<br/>
Wij vertrouwen erop u hiermee voldoende te hebben geïnformeerd.<br/>
<br/>
<br/>
Met vriendelijke groet,<br/>
<br/>
Team WTC The Hague Business Center<br/>
<br/>
<br/>
<b>Downloads:</b><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Algemene voorwaarden WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/_Algemene voorwaarden.pdf">klik hier</a>.<br/>
              	</td>
              </tr>
            </xsl:when>
            <!-- Bevestiging reservering (naar aanvrager en - igv. CUST02 - naar receptie)! -->
            <xsl:otherwise>
              <tr>
              	<td colspan="2" class="tekst"><br/><br/><b>Betreft: Bevestiging reservering<xsl:text> </xsl:text>
                  <xsl:choose>
                    <xsl:when test="@content='complete'"><xsl:value-of select="key"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="key"/>/<xsl:value-of select="$min_volgnr"/></xsl:otherwise>
                  </xsl:choose>
                  <!--xsl:if test="string(rsv_ruimte[volgnr=$min_volgnr]/omschrijving)!=''">(<xsl:value-of select="rsv_ruimte[volgnr=$min_volgnr]/omschrijving"/>)</xsl:if-->
              	</b></td>
              </tr>
              <!--tr><td colspan="2" height="20px"/></tr-->
              <tr>
              	<td colspan="2" class="tekst">
<br/><br/>Geachte heer / mevrouw,<br/>
<br/>
Hierbij bevestigen wij uw reservering bij WTC The Hague Business Center.
              	</td>
              </tr>
              <tr>
                <td colspan="2">
                  <!--table cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" frame="box"-->
                  <table width="100%" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
                    <!-- rsv_ruimte -->
                    <xsl:for-each select="rsv_ruimte">
                      <xsl:sort select="van/timestamp"/>
                      <tr>
                        <td colspan="7" class="tekst">
<br/>
Uw reservering staat als volgt genoteerd:
                        </td>
                      </tr>
                      <!--tr><td colspan="7" height="10px"/></tr-->
                      <xsl:call-template name="rsv_ruimte"><xsl:with-param name="min_volgnr" select="$min_volgnr"/><xsl:with-param name="language" select="//header/language"/></xsl:call-template>
                      <!--tr><td colspan="7" height="20px"/></tr-->
                      <tr><td colspan="7" height="10px"/></tr>
                      <tr>
                        <td colspan="7" class="label">Alle genoemde prijzen zijn excl. BTW.</td>
                      </tr>                      
                      <tr>
                        <td class="label"><br/><b>Uw gegevens</b></td>
                        <td colspan="6" class="value"></td>
                      </tr>
                      <tr>
                        <td class="label">Aanvrager:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/naam_full"/></td>
                      </tr>
                      <tr>
                        <td class="label">E-mail:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/email"/></td>
                      </tr>
                      <tr>
                        <td class="label">Gastheer/-vrouw:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="kenmerk[@volgnummer='20']!=''"><xsl:value-of select="kenmerk[@volgnummer='20']"/></xsl:when>
                            <xsl:otherwise><xsl:value-of select="host_user/naam_full"/></xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <tr>
                        <td class="label">Omschrijving:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="omschrijving!=''"><xsl:value-of select="omschrijving"/></xsl:when>
                            <xsl:otherwise>-</xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <xsl:if test="opmerking!=''">
                        <tr>
                          <td class="label">Opmerkingen:</td>
                          <td colspan="6" class="value"><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="opmerking"/></xsl:call-template></td>
                        </tr>
                      </xsl:if>
                    </xsl:for-each>
                  </table>
                </td>
              </tr>
              <tr>
              	<td colspan="2" class="tekst">
<br/>
Wanneer uw reservering definitief geboekt staat in ons reserveringssysteem gaat u akkoord met onze algemene voorwaarden.
De algemene voorwaarden heeft u reeds ontvangen en vindt u terug via de link onderaan deze bevestiging.<br/>
<br/>
Mochten er nog vragen zijn, dan helpen wij u graag.<br/>
<br/>
Wij vertrouwen erop u hiermee voldoende te hebben geïnformeerd.<br/>
<br/>
<br/>
Met vriendelijke groet,<br/>
<br/>
Team WTC The Hague Business Center<br/>
<br/>
<br/>
<b>Downloads:</b><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Routebeschrijving WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/Routebeschrijving WTC The Hague Business Center.pdf">klik hier</a>.<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Algemene voorwaarden WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/_Algemene voorwaarden.pdf">klik hier</a>.<br/>
              	</td>
              </tr>
            <!-- Bevestiging reservering/NL -->
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <!-- De algemene gegevens van de deelreservering met het laagste volgnummer worden gebruikt als referentie gegevens! -->
          <xsl:variable name="min_volgnr">
            <xsl:value-of select="//facilitor/reservering/rsv_ruimte/volgnr[not(. &gt; //facilitor/reservering/rsv_ruimte/volgnr)]"/>
          </xsl:variable>
          <tr><td colspan="2"><xsl:call-template name="pageheader"/></td></tr>
          <!--tr><td colspan="2" height="20px"/></tr-->
          <tr><td colspan="2" class="tekst"><br/><br/>The Hague, <xsl:value-of select="substring-before(//facilitor/header/dateTime,' ')"/></td></tr>
          <!--tr><td colspan="2" height="20px"/></tr-->
          <xsl:choose>
            <xsl:when test="$srtnotificatiecode='RESDEL' and verwijder">
              <tr>
              	<td colspan="2" class="tekst"><br/><br/><b>Subject: Cancellation reservation<xsl:text> </xsl:text>
                  <xsl:choose>
                    <xsl:when test="@content='complete'"><xsl:value-of select="key"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="key"/>/<xsl:value-of select="$min_volgnr"/></xsl:otherwise>
                  </xsl:choose>
              	</b></td>
              </tr>
              <!--tr><td colspan="2" height="20px"/></tr-->
              <tr>
              	<td colspan="2" class="tekst">
<br/><br/>Dear Sir / Madam,<br/>
<br/>
Hereby we confirm the <b>cancellation</b> of your reservation at WTC The Hague Business Center.
              	</td>
              </tr>
              <tr>
                <td colspan="2">
                  <!--table cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" frame="box"-->
                  <table width="100%" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
                    <!-- rsv_ruimte -->
                    <xsl:for-each select="rsv_ruimte">
                      <xsl:sort select="van/timestamp"/>
                      <tr>
                        <td colspan="7" class="tekst">
<br/>
We cancelled the following reservation:
                        </td>
                      </tr>
                      <!--tr><td colspan="7" height="10px"/></tr-->
                      <xsl:call-template name="rsv_ruimte"><xsl:with-param name="min_volgnr" select="$min_volgnr"/><xsl:with-param name="language" select="//header/language"/></xsl:call-template>
                      <!--tr><td colspan="7" height="20px"/></tr-->
                      <tr><td colspan="7" height="10px"/></tr>
                      <tr>
                        <td colspan="7" class="label">All prices mentioned are excl. VAT.</td>
                      </tr>
                      <tr>
                        <td class="label"><br/><b>Your details</b></td>
                        <td colspan="6" class="value"></td>
                      </tr>
                      <tr>
                        <td class="label">Applicant:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/naam_full"/></td>
                      </tr>
                      <tr>
                        <td class="label">E-mail:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/email"/></td>
                      </tr>
                      <tr>
                        <td class="label">Host:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="kenmerk[@volgnummer='20']!=''"><xsl:value-of select="kenmerk[@volgnummer='20']"/></xsl:when>
                            <xsl:otherwise><xsl:value-of select="host_user/naam_full"/></xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <tr>
                        <td class="label">Description:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="omschrijving!=''"><xsl:value-of select="omschrijving"/></xsl:when>
                            <xsl:otherwise>-</xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <xsl:if test="opmerking!=''">
                        <tr>
                          <td class="label">Comments:</td>
                          <td colspan="6" class="value"><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="opmerking"/></xsl:call-template></td>
                        </tr>
                      </xsl:if>
                    </xsl:for-each>
                  </table>
                </td>
              </tr>
              <tr>
              	<td colspan="2" class="tekst">
<br/>
If your booking was confirmed in our reservation system you agreed to our terms &amp; conditions.
You have received our terms &amp; conditions along with our offer.
If you would like to download the terms &amp; conditions, please use the link provided below.<br/>
<br/>
If you have any questions, please do not hesitate to contact us.<br/>
<br/>
We trust to have informed you sufficiently.<br/>
<br/>
<br/>
Kind regards,<br/>
<br/>
Team WTC The Hague Business Center<br/>
<br/>
<br/>
<b>Downloads:</b><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Terms &amp; Conditions WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/_Algemene voorwaarden.pdf">click here</a>.<br/>
              	</td>
              </tr>
            </xsl:when>
            <!-- Bevestiging reservering (naar aanvrager en - igv. CUST02 - naar receptie)! -->
            <xsl:otherwise>
              <tr>
              	<td colspan="2" class="tekst"><br/><br/><b>Subject: Confirmation reservation<xsl:text> </xsl:text>
                  <xsl:choose>
                    <xsl:when test="@content='complete'"><xsl:value-of select="key"/></xsl:when>
                    <xsl:otherwise><xsl:value-of select="key"/>/<xsl:value-of select="$min_volgnr"/></xsl:otherwise>
                  </xsl:choose>
                  <!--xsl:if test="string(rsv_ruimte[volgnr=$min_volgnr]/omschrijving)!=''">(<xsl:value-of select="rsv_ruimte[volgnr=$min_volgnr]/omschrijving"/>)</xsl:if-->
              	</b></td>
              </tr>
              <!--tr><td colspan="2" height="20px"/></tr-->
              <tr>
              	<td colspan="2" class="tekst">
<br/><br/>Dear Sir / Madam,<br/>
<br/>
Hereby we confirm your reservation at WTC The Hague Business Center.
              	</td>
              </tr>
              <tr>
                <td colspan="2">
                  <!--table cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" frame="box"-->
                  <table width="100%" border="0" style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
                    <!-- rsv_ruimte -->
                    <xsl:for-each select="rsv_ruimte">
                      <xsl:sort select="van/timestamp"/>
                      <tr>
                        <td colspan="7" class="tekst">
<br/>
The details of your reservation are as stated below:
                        </td>
                      </tr>
                      <!--tr><td colspan="7" height="10px"/></tr-->
                      <xsl:call-template name="rsv_ruimte"><xsl:with-param name="min_volgnr" select="$min_volgnr"/><xsl:with-param name="language" select="//header/language"/></xsl:call-template>
                      <!--tr><td colspan="7" height="20px"/></tr-->
                      <tr><td colspan="7" height="10px"/></tr>
                      <tr>
                        <td colspan="7" class="label">All prices mentioned are excl. VAT.</td>
                      </tr>                      
                      <tr>
                        <td class="label"><br/><b>Your details</b></td>
                        <td colspan="6" class="value"></td>
                      </tr>
                      <tr>
                        <td class="label">Applicant:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/naam_full"/></td>
                      </tr>
                      <tr>
                        <td class="label">E-mail:</td>
                        <td colspan="6" class="value"><xsl:value-of select="contact_user/email"/></td>
                      </tr>
                      <tr>
                        <td class="label">Host:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="kenmerk[@volgnummer='20']!=''"><xsl:value-of select="kenmerk[@volgnummer='20']"/></xsl:when>
                            <xsl:otherwise><xsl:value-of select="host_user/naam_full"/></xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <tr>
                        <td class="label">Description:</td>
                        <td colspan="6" class="value">
                          <xsl:choose>
                            <xsl:when test="omschrijving!=''"><xsl:value-of select="omschrijving"/></xsl:when>
                            <xsl:otherwise>-</xsl:otherwise>
                          </xsl:choose>
                        </td>
                      </tr>
                      <xsl:if test="opmerking!=''">
                        <tr>
                          <td class="label">Comments:</td>
                          <td colspan="6" class="value"><xsl:call-template name="linebreaks"><xsl:with-param name="string" select="opmerking"/></xsl:call-template></td>
                        </tr>
                      </xsl:if>
                    </xsl:for-each>
                  </table>
                </td>
              </tr>
              <tr>
              	<td colspan="2" class="tekst">
<br/>
If you have agreed to confirm the booking of your reservation in our reservation system you have agreed to our terms &amp; conditions.
You have received our terms &amp; conditions along with our offer.
If you would like to download the terms &amp; conditions, please use the link provided below.<br/>
<br/>
If you have any questions, please do not hesitate to contact us.<br/>
<br/>
We trust to have informed you sufficiently.<br/>
<br/>
<br/>
Kind regards,<br/>
<br/>
Team WTC The Hague Business Center<br/>
<br/>
<br/>
<b>Downloads:</b><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Route description WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/Directions WTC The Hague Business Center.pdf">click here</a>.<br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;o&#xA0;&#xA0;Terms &amp; Conditions WTC The Hague Business Center, <a href="http://www.wtcthehague.com/sites/default/files/_Algemene voorwaarden.pdf">click here</a>.<br/>
              	</td>
              </tr>
            <!-- Bevestiging reservering/EN -->
            </xsl:otherwise>
          </xsl:choose>
        </xsl:otherwise>
      </xsl:choose>
        <!--/TD>
        <TD WIDTH="30" ROWSPAN="30" ID="RECHTERMARGE"/>
      </TR>
    </TABLE-->
    </table>
	</xsl:template>

  <xsl:template name="rsv_ruimte">
    <xsl:param name="min_volgnr"/>
    <xsl:param name="language"/>

    <!-- bepaal reserveringsduur in uren -->
    <xsl:variable name="aantal_uren">
      <xsl:value-of select="(tot/timestamp - van/timestamp) div 3600"/>
    </xsl:variable>
    <!-- bepaal ruimteprijs afhankelijk van de reserveringsduur -->
    <xsl:variable name="ruimteprijs">
      <xsl:choose>
        <xsl:when test="($aantal_uren - 8) &lt; 0">
          <xsl:choose>
            <xsl:when test="($aantal_uren - 4) &lt; 0">
              <xsl:value-of select="$aantal_uren * res_ruimte/prijs"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:value-of select="res_ruimte/prijs_ochtend + (($aantal_uren - 4) * res_ruimte/prijs)"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="res_ruimte/prijs_middag"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
<xsl:choose>
  <xsl:when test="$language = 'NL'">
    <tr>
      <th style="width:24%;border:1px solid black;background-color:#9d0064;"><b><xsl:value-of select="//lcl/FAC/omschrijving"/></b></th>
      <th style="width:12%;border:1px solid black;background-color:#9d0064;text-align:center;"><b>Aantal/<br/>personen</b></th>
      <th style="width:10%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Eenheids<br/>prijs</b></th>
      <th style="width:14%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Totaal<br/>prijs</b></th>
      <th style="width:14%;border:1px solid black;background-color:#9d0064;text-align:center;"><b>Datum</b></th>
      <th style="width:8%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Begin<br/>tijd</b></th>
      <th style="width:8%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Eind<br/>tijd</b></th>
      <!--th style="width:x%;border:1px solid black;background-color:#9d0064;"><b><xsl:value-of select="//lcl/RES/status"/></th-->
      <th style="width:10%;border:1px solid black;background-color:#9d0064;text-align:center;"><b><xsl:value-of select="//lcl/RES/opstelling"/></b></th>
    </tr>
    <xsl:if test="res_ruimte!=''">
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
          <xsl:value-of select="res_ruimte/nr"/><br/>(max.&#xA0;<xsl:value-of select="res_ruimte/bezoekers"/>&#xA0;<xsl:value-of select="//lcl/FAC/personen"/>)
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="bezoekers"/></td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_ruimte/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <!--xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="$ruimteprijs"/></xsl:call-template-->
          <xsl:choose>
						<xsl:when test="contact_user/afdeling/key='21' or kenmerk[@key='1023']='1'"><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="0.8 * $ruimteprijs"/></xsl:call-template></xsl:when>
						<xsl:when test="contact_user/afdeling/key='22'"><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="$ruimteprijs"/></xsl:call-template></xsl:when>
						<xsl:otherwise><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="0"/></xsl:call-template></xsl:otherwise>
          </xsl:choose>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="van/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="van/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="tot/tijd"/>
        </td>
        <!--td class="result" style="border:1px solid black;">
          <xsl:value-of select="status_fo"/>
        </td-->
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="res_ruimte/opstelling"/>
        </td>
      </tr>
    </xsl:if>
    <!-- rsv_deel-lijst gesorteerd op van-tijd -->
    <xsl:for-each select="rsv_deel">
      <xsl:sort select="van/tijd"/>
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
          <xsl:value-of select="res_deel/deel/omschrijving"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="aantal"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_deel/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="van/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="van/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="tot/tijd"/>
        </td>
        <!--td class="result" style="border:1px solid black;"/-->
        <td class="result" style="border:1px solid black;text-align:center;"/>
      </tr>
    </xsl:for-each>
    <!-- rsv_artikel-lijst gesorteerd op van-tijd/volgnummer -->
    <xsl:for-each select="rsv_artikel">
      <xsl:sort select="levering/tijd"/>
      <xsl:sort select="res_artikel/volgnummer" data-type="number"/>
      <xsl:sort select="res_artikel/omschrijving"/>
      <tr>
        <td class="result" style="border:1px solid black;">
          <xsl:value-of select="res_artikel/omschrijving"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="aantal"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_artikel/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="levering/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="levering/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;"/>
        <!--td class="result" style="border:1px solid black;"/-->
        <td class="result" style="border:1px solid black;text-align:center;"/>
      </tr>
    </xsl:for-each>
    <!-- totaal per deelreservering -->
    <tr>
      <td class="result" style="border:1px solid black;"><b>Totaal</b></td>
      <td class="result" style="border:1px solid black;text-align:center;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/>
      <td class="result" style="border:1px solid black;text-align:right;"><b>
        <!--xsl:call-template name="europrijs">
          <xsl:with-param name="prijs" select="$ruimteprijs+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
        </xsl:call-template-->
        <xsl:choose>
          <xsl:when test="contact_user/afdeling/key='21' or kenmerk[@key='1023']='1'">
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="(0.8 * $ruimteprijs)+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
						</xsl:call-template>
          </xsl:when>
          <xsl:when test="contact_user/afdeling/key='22'">
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="$ruimteprijs+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
						</xsl:call-template>
          </xsl:when>
          <xsl:otherwise>
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="0"/>
						</xsl:call-template>
          </xsl:otherwise>
        </xsl:choose>
      </b></td>
      <!--td class="result" style="border:1px solid black;text-align:center;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/-->
      <!--td class="result" style="border:1px solid black;"/-->
      <!--td class="result" style="border:1px solid black;text-align:center;"/-->
    </tr>
    <!-- afspraak-lijst gesorteerd op naam -->
    <!--xsl:for-each select="afspraak/bezoeker">
      <xsl:sort select="naam"/>
      <xsl:if test="position()=1">
        <tr><td height="10px;"/></tr>
        <tr>
          <td class="tekst"><xsl:value-of select="//lcl/BEZ/bezoekers"/></td>
        </tr>
        <tr>
          <th style="border:1px solid black;"><xsl:value-of select="//lcl/FAC/naam"/></th>
          <th colspan="2" style="border:1px solid black;"><xsl:value-of select="//lcl/FAC/bedrijf"/></th>
          <th colspan="4" style="border:1px solid black;"><xsl:value-of select="//lcl/BEZ/parkeerplaats"/></th>
        </tr>
      </xsl:if>
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:value-of select="naam"/></td>
        <td colspan="2" class="result" style="border:1px solid black;"><xsl:value-of select="bedrijf"/></td>
        <td colspan="4" class="result" style="border:1px solid black;"><xsl:value-of select="deel/omschrijving"/></td>
      </tr>
    </xsl:for-each-->
    <!-- kenmerk -->
    <!--xsl:for-each select="kenmerk[@type!='L' and @type!='l' and @type!='Q' and count(@xmlnode)=0]">
      <xsl:sort select="@volgnummer" data-type="number"/>
      <xsl:if test="position()=1"><tr><td height="10px;"/></tr></xsl:if>
      <xsl:if test=".!=''">
        <tr>
          <td class="label"><xsl:value-of select="@naam"/></td>
          <td colspan="6" class="value">: <xsl:value-of select="."/></td>
        </tr>
      </xsl:if>
    </xsl:for-each-->
  </xsl:when>
  <xsl:otherwise>
    <tr>
      <th style="width:24%;border:1px solid black;background-color:#9d0064;"><b><xsl:value-of select="//lcl/FAC/omschrijving"/></b></th>
      <th style="width:12%;border:1px solid black;background-color:#9d0064;text-align:center;"><b>Amount/<br/>persons</b></th>
      <th style="width:10%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Unit<br/>price</b></th>
      <th style="width:14%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Total<br/>price</b></th>
      <th style="width:14%;border:1px solid black;background-color:#9d0064;text-align:center;"><b>Date</b></th>
      <th style="width:8%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>Start</b></th>
      <th style="width:8%;border:1px solid black;background-color:#9d0064;text-align:right;"><b>End</b></th>
      <!--th style="width:x%;border:1px solid black;background-color:#9d0064;"><b><xsl:value-of select="//lcl/RES/status"/></th-->
      <th style="width:10%;border:1px solid black;background-color:#9d0064;text-align:center;"><b><xsl:value-of select="//lcl/RES/opstelling"/></b></th>
    </tr>
    <xsl:if test="res_ruimte!=''">
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
          <xsl:value-of select="res_ruimte/nr"/><br/>(max.&#xA0;<xsl:value-of select="res_ruimte/bezoekers"/>&#xA0;<xsl:value-of select="//lcl/FAC/personen"/>)
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="bezoekers"/></td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_ruimte/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <!--xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="$ruimteprijs"/></xsl:call-template-->
          <xsl:choose>
						<xsl:when test="contact_user/afdeling/key='21' or kenmerk[@key='1023']='1'"><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="0.8 * $ruimteprijs"/></xsl:call-template></xsl:when>
						<xsl:when test="contact_user/afdeling/key='22'"><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="$ruimteprijs"/></xsl:call-template></xsl:when>
						<xsl:otherwise><xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="0"/></xsl:call-template></xsl:otherwise>
          </xsl:choose>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="van/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="van/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="tot/tijd"/>
        </td>
        <!--td class="result" style="border:1px solid black;">
          <xsl:value-of select="status_fo"/>
        </td-->
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="res_ruimte/opstelling"/>
        </td>
      </tr>
    </xsl:if>
    <!-- rsv_deel-lijst gesorteerd op van-tijd -->
    <xsl:for-each select="rsv_deel">
      <xsl:sort select="van/tijd"/>
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
          <xsl:value-of select="res_deel/deel/omschrijving"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="aantal"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_deel/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="van/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="van/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="tot/tijd"/>
        </td>
        <!--td class="result" style="border:1px solid black;"/-->
        <td class="result" style="border:1px solid black;text-align:center;"/>
      </tr>
    </xsl:for-each>
    <!-- rsv_artikel-lijst gesorteerd op van-tijd/volgnummer -->
    <xsl:for-each select="rsv_artikel">
      <xsl:sort select="levering/tijd"/>
      <xsl:sort select="res_artikel/volgnummer" data-type="number"/>
      <xsl:sort select="res_artikel/omschrijving"/>
      <tr>
        <td class="result" style="border:1px solid black;">
          <xsl:value-of select="res_artikel/omschrijving"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="aantal"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="res_artikel/prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:call-template name="europrijs"><xsl:with-param name="prijs" select="prijs"/></xsl:call-template>
        </td>
        <td class="result" style="border:1px solid black;text-align:center;">
          <xsl:value-of select="levering/datum"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;">
          <xsl:value-of select="levering/tijd"/>
        </td>
        <td class="result" style="border:1px solid black;text-align:right;"/>
        <!--td class="result" style="border:1px solid black;"/-->
        <td class="result" style="border:1px solid black;text-align:center;"/>
      </tr>
    </xsl:for-each>
    <!-- totaal per deelreservering -->
    <tr>
      <td class="result" style="border:1px solid black;"><b>Total</b></td>
      <td class="result" style="border:1px solid black;text-align:center;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/>
      <td class="result" style="border:1px solid black;text-align:right;"><b>
        <!--xsl:call-template name="europrijs">
          <xsl:with-param name="prijs" select="$ruimteprijs+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
        </xsl:call-template-->
        <xsl:choose>
          <xsl:when test="contact_user/afdeling/key='21' or kenmerk[@key='1023']='1'">
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="(0.8 * $ruimteprijs)+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
						</xsl:call-template>
          </xsl:when>
          <xsl:when test="contact_user/afdeling/key='22'">
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="$ruimteprijs+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
						</xsl:call-template>
          </xsl:when>
          <xsl:otherwise>
						<xsl:call-template name="europrijs">
							<xsl:with-param name="prijs" select="0"/>
						</xsl:call-template>
          </xsl:otherwise>
        </xsl:choose>
      </b></td>
      <!--td class="result" style="border:1px solid black;text-align:center;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/>
      <td class="result" style="border:1px solid black;text-align:right;"/-->
      <!--td class="result" style="border:1px solid black;"/-->
      <!--td class="result" style="border:1px solid black;text-align:center;"/-->
    </tr>
    <!-- afspraak-lijst gesorteerd op naam -->
    <!--xsl:for-each select="afspraak/bezoeker">
      <xsl:sort select="naam"/>
      <xsl:if test="position()=1">
        <tr><td height="10px;"/></tr>
        <tr>
          <td class="tekst"><xsl:value-of select="//lcl/BEZ/bezoekers"/></td>
        </tr>
        <tr>
          <th style="border:1px solid black;"><xsl:value-of select="//lcl/FAC/naam"/></th>
          <th colspan="2" style="border:1px solid black;"><xsl:value-of select="//lcl/FAC/bedrijf"/></th>
          <th colspan="4" style="border:1px solid black;"><xsl:value-of select="//lcl/BEZ/parkeerplaats"/></th>
        </tr>
      </xsl:if>
      <tr>
        <td class="result" style="border:1px solid black;"><xsl:value-of select="naam"/></td>
        <td colspan="2" class="result" style="border:1px solid black;"><xsl:value-of select="bedrijf"/></td>
        <td colspan="4" class="result" style="border:1px solid black;"><xsl:value-of select="deel/omschrijving"/></td>
      </tr>
    </xsl:for-each-->
    <!-- kenmerk -->
    <!--xsl:for-each select="kenmerk[@type!='L' and @type!='l' and @type!='Q' and count(@xmlnode)=0]">
      <xsl:sort select="@volgnummer" data-type="number"/>
      <xsl:if test="position()=1"><tr><td height="10px;"/></tr></xsl:if>
      <xsl:if test=".!=''">
        <tr>
          <td class="label"><xsl:value-of select="@naam"/></td>
          <td colspan="6" class="value">: <xsl:value-of select="."/></td>
        </tr>
      </xsl:if>
    </xsl:for-each-->
  </xsl:otherwise>
</xsl:choose>
  </xsl:template>

	<xsl:template match="reservering" mode="full">
		<xsl:choose>
			<xsl:when test="$mode='summary'"></xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$srtnotificatiecode = 'OUTLOOK'"><xsl:apply-templates select="." mode="outlook"/></xsl:when>
					<xsl:otherwise>
						<html>
							<xsl:comment>=============================== RESERVERINGEN ===============================</xsl:comment>
							<xsl:comment>FACILITOR default XSL template for reservering</xsl:comment>
							<xsl:call-template name="htmlhead"/>
							<xsl:element name="body">
								<xsl:if test="$mode!='email'"><xsl:attribute name="onload">window.print();</xsl:attribute></xsl:if>
								<!--xsl:call-template name="pageheader"/-->
								<xsl:choose>
									<xsl:when test="$srtnotificatiecode = 'RESKTO'"><xsl:apply-templates select="." mode="kto"/></xsl:when>
									<xsl:otherwise><xsl:apply-templates select="." mode="include"/></xsl:otherwise>
								</xsl:choose>
								<!--xsl:call-template name="pagefooter"/-->
							</xsl:element>
						</html>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="perslid" mode="include">
		<table border="0" width="100%">
			<xsl:choose>
				<xsl:when test="$srtnotificatiecode = 'CUST01'">
					<tr><td height="10px"/></tr>
					<tr>
						<td class="label" colspan="2">
							<p>Ter info.</p>
							<p>Onderstaande nieuwe gebruiker is geregistreerd in FACILITOR.</p>
						</td>
					</tr>
					<tr><td height="10px"/></tr>
					<tr>
						<td class="label" width="20%"><xsl:value-of select="//lcl/FAC/naam"/></td>
						<td class="value" width="80%">: <xsl:value-of select="naam_full"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/organisatie"/></td>
						<td class="value">: <xsl:value-of select="afdeling/naam"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/telefoon"/></td>
						<td class="value">: <xsl:value-of select="telefoonnr"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/e-mail"/></td>
						<td class="value">: <xsl:value-of select="email"/></td>
					</tr>
					<tr>
						<td class="label">Debiteurnummer</td>
						<td class="value">: <xsl:value-of select="nr"/></td>
					</tr>
					<tr><td height="10px" colspan="2" /></tr>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="prs_begintext"/>
					<tr><td height="10px"/></tr>
					<!-- Standaard persoonsgegevens (incl. kenmerken) -->
					<tr>
						<td class="label" width="20%"><xsl:value-of select="//lcl/FAC/naam"/></td>
						<td class="value" width="80%">: <xsl:value-of select="naam_full"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/organisatie"/></td>
						<td class="value">: <xsl:value-of select="afdeling/naam"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/functie"/></td>
						<td class="value">: (<xsl:value-of select="//lcl/FAC/nog_niet_aanwezig"/>)</td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/werkplek"/></td>
						<td class="value">: <xsl:value-of select="werkplek/plaats/plaatsaanduiding"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/telefoon"/></td>
						<td class="value">: <xsl:value-of select="telefoonnr"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/FAC/e-mail"/></td>
						<td class="value">: <xsl:value-of select="email"/></td>
					</tr>
					<tr>
						<td class="label"><xsl:value-of select="//lcl/PRS/personeelsnr"/></td>
						<td class="value">: <xsl:value-of select="nr"/></td>
					</tr>
					<xsl:for-each select="kenmerk[count(@xmlnode)=0]">
						<tr>
							<td class="label"><xsl:value-of select="@naam"/></td>
							<td class="value">: <xsl:value-of select="."/></td>
						</tr>
					</xsl:for-each>
					<tr><td height="10px"/></tr>
					<xsl:call-template name="prs_endtext"/>
				</xsl:otherwise>
			</xsl:choose>
		</table>
	</xsl:template>

	<xsl:template name="factuurfooter">
		<div style="position:absolute;bottom:0;width:100%;border-collapse:collapse;font-size:6.5pt;">
			Op alle werkzaamheden en alle rechtsverhoudingen met derden zijn Nederlands recht en de algemene voorwaarden van CBRE B.V. van toepassing. Deze bevatten onder meer een beperking van aansprakelijkheid en zijn gedeponeerd ter griffie van de Rechtbank te Amsterdam. De algemene voorwaarden kunnen worden geraadpleegd op www.cbre.nl en worden op verzoek toegezonden.<br/><br/>
			All commissioned work and all legal relations with third parties will be governed by Dutch law and the general terms and conditions of CBRE B.V. These include a limitation of liability and have been filed with the District Court at Amsterdam. The general terms and conditions may be consulted at www.cbre.nl and will be forwarded upon request.
		</div>	
	</xsl:template>

	<xsl:template match="rapport">
		<style>.pagebreak {page-break-after:always;}</style>

		<xsl:if test="@view='wibc_v_rap_res_frozen' or @view='WIBC_V_RAP_RES_FROZEN' or @view='wibc_v_rap_res_actual' or @view='WIBC_V_RAP_RES_ACTUAL'">
			<html>
				<xsl:call-template name="htmlhead"/>
				<body>
					<table border="0" style="width:100%;border-collapse:collapse;" cellpadding="0" cellspacing="0">
						<xsl:if test="count(rapport_data/data_row)=0">
							<tr><td><center><b>Geen gegevens gevonden</b></center></td></tr>
						</xsl:if>

						<xsl:variable name="sortedall">
							<xsl:for-each select="rapport_data/data_row">
								<xsl:sort select="HIDE_F_DEBNR"/>
								<!--xsl:sort select="FCLT_F_BEDRIJF"/-->
								<!--xsl:sort select="FCLT_F_AANVRAGER"/-->
								<xsl:sort select="FCLT_F_FACTUUR"/>
								<xsl:sort select="HIDE_F_DATUM"/>
								<xsl:sort select="HIDE_F_RESTYPE"/>
								<xsl:copy-of select="."/>
							</xsl:for-each>
						</xsl:variable>

						<xsl:for-each select="msxml:node-set($sortedall)/data_row">
							<xsl:variable name="prev_bedr">
								<xsl:choose>
									<xsl:when test="position()=1">Quqelequ</xsl:when>
									<xsl:otherwise><xsl:value-of select="preceding-sibling::data_row[1]/HIDE_F_DEBNR"/></xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<xsl:variable name="prev_fact">
								<xsl:choose>
									<xsl:when test="position()=1">Quqelequ</xsl:when>
									<xsl:otherwise><xsl:value-of select="preceding-sibling::data_row[1]/FCLT_F_FACTUUR"/></xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<xsl:variable name="cur_bedr">
								<xsl:value-of select="HIDE_F_DEBNR"/>
							</xsl:variable>
							<xsl:variable name="cur_fact">
								<xsl:value-of select="FCLT_F_FACTUUR"/>
							</xsl:variable>

							<!-- Als 'this' != 'prev', dan start nieuwe factuur! -->
							<xsl:if test="$cur_bedr!=$prev_bedr or $cur_fact!=$prev_fact">
								<xsl:if test="position()&gt;1">
									<tr class="pagebreak"><td colspan="3"/></tr>
								</xsl:if>

								<xsl:variable name="sortedfac">
									<xsl:for-each select="msxml:node-set($sortedall)/data_row">
										<xsl:sort select="HIDE_F_DEBNR"/>
										<!--xsl:sort select="FCLT_F_BEDRIJF"/-->
										<!--xsl:sort select="FCLT_F_AANVRAGER"/-->
										<xsl:sort select="FCLT_F_FACTUUR"/>
										<xsl:sort select="HIDE_F_DATUM"/>
										<xsl:sort select="HIDE_F_RESTYPE"/>
										<xsl:if test="HIDE_F_DEBNR=$cur_bedr and FCLT_F_FACTUUR=$cur_fact">
											<xsl:copy-of select="."/>
										</xsl:if>
									</xsl:for-each>
								</xsl:variable>

								<!-- KOSTEN+BTW_KOSTEN voor creditboekingen (ACTIVITEIT_KEY=50) zijn in achterliggende view negatief gemaakt (met -1 vermenigvuldigd)! -->
								<!-- Echter, bevat een factuur alléén creditregels, dan betreft het een creditfactuur en worden kosten als positieve bedragen getoond; -->
								<!-- in alle andere gevallen betreft het een "normale" factuur en worden creditboekingen als negatieve bedragen getoond.               -->
								<xsl:variable name="totsumfact">
									<xsl:value-of select="sum(msxml:node-set($sortedfac)/data_row/KOSTEN) + sum(msxml:node-set($sortedfac)/data_row/BTWKOSTEN)"/>
								</xsl:variable>
								<xsl:variable name="totsumcred">
									<xsl:value-of select="sum(msxml:node-set($sortedfac)/data_row[ACTIVITEIT_KEY='50']/KOSTEN) + sum(msxml:node-set($sortedfac)/data_row[ACTIVITEIT_KEY='50']/BTWKOSTEN)"/>
								</xsl:variable>
								<xsl:variable name="multiplier">
									<xsl:choose>
										<xsl:when test="$totsumfact=$totsumcred">-1</xsl:when>
										<xsl:otherwise>1</xsl:otherwise>
									</xsl:choose>
								</xsl:variable>

								<tr><td colspan="3"><xsl:call-template name="pageheader"/></td></tr>
								<tr><td colspan="3" height="40px"/></tr>
								<tr>
									<td colspan="3" class="tekst" style="width:55%;vertical-align:bottom">
										<xsl:if test="msxml:node-set($sortedfac)/data_row/FCLT_F_BEDRIJF!='' and msxml:node-set($sortedfac)/data_row/FCLT_F_BEDRIJF!=msxml:node-set($sortedfac)/data_row/HIDE_F_DEBNR">
											<xsl:value-of select="msxml:node-set($sortedfac)/data_row/FCLT_F_BEDRIJF"/>
											<xsl:if test="msxml:node-set($sortedfac)/data_row/PER_ADRES!=''">
												<br/>
												<xsl:value-of select="msxml:node-set($sortedfac)/data_row/PER_ADRES"/>
											</xsl:if>
										</xsl:if>&#xA0;
										<br/>
										<xsl:if test="msxml:node-set($sortedfac)/data_row/FCLT_F_BEDRIJF!='' and msxml:node-set($sortedfac)/data_row/FCLT_F_BEDRIJF!=msxml:node-set($sortedfac)/data_row/HIDE_F_DEBNR">
											<xsl:choose><xsl:when test="LANGUAGE = 'NL'">T.a.v.<xsl:text> </xsl:text></xsl:when><xsl:otherwise>Attn.<xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
										</xsl:if>
										<xsl:value-of select="msxml:node-set($sortedfac)/data_row/FCLT_F_AANVRAGER"/>
										<br/>
										<xsl:value-of select="msxml:node-set($sortedfac)/data_row/ADRES"/>
										<br/>
										<xsl:value-of select="msxml:node-set($sortedfac)/data_row/POSTCODE"/><xsl:text> </xsl:text><xsl:value-of select="msxml:node-set($sortedfac)/data_row/PLAATS"/>
										<br/>
										<xsl:value-of select="msxml:node-set($sortedfac)/data_row/LAND"/>
										<xsl:if test="not(msxml:node-set($sortedfac)/data_row/PER_ADRES!='')">
											<br/>
										</xsl:if>&#xA0;
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
<xsl:choose>
  <xsl:when test="LANGUAGE = 'NL'">
								<xsl:choose>
									<xsl:when test="$totsumfact=$totsumcred">
										<tr><td colspan="3" class="tekst"><b style="font-size:11pt">CREDITFACTUUR</b></td></tr>
									</xsl:when>
									<xsl:otherwise>
										<tr><td colspan="3" class="tekst"><b style="font-size:11pt">FACTUUR</b></td></tr>
									</xsl:otherwise>
								</xsl:choose>
								<tr>
									<td colspan="2" style="width:55%;padding-right:3px;">
										<table style="width:100%;border-collapse:collapse;border:1px solid black;">
											<tr>
												<td class="tekst" style="width:40%;border-width:0px;padding:3px;">Periode</td>
												<td class="tekst" style="width:60%;border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FACTUURPERIODE"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">BTW-identificatienr.</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/BTWNR"/></td>
											</tr>
										</table>
									</td>
									<td style="width:45%;padding-left:3px;">
										<table style="width:100%;border-collapse:collapse;border:1px solid black;">
											<tr>
												<td class="tekst" style="width:50%;border-width:0px;padding:3px;">Factuurnummer</td>
												<td class="tekst" style="width:50%;border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FCLT_F_FACTUUR"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Debiteurennummer</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/HIDE_F_DEBNR"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Factuurdatum</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FACTUURDATUM"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Vervaldatum</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/VERVALDATUM"/></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<tr>
									<td colspan="3" class="tekst">
										Hierbij brengen wij u namens onderstaande entiteit het volgende in rekening:<br/>
										Bouwinvest Dutch Institutional Office Fund N.V., La Guardiaweg 4, 1043 DG Amsterdam.
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<tr>
									<td colspan="3">
										<table border="0" style="width:100%;border-collapse:collapse;">
											<tr>
												<td class="tekst" style="width:9%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>RES.NR.</b>
												</td>
												<td class="tekst" style="width:46%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>OMSCHRIJVING</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>NETTO</b>
												</td>
												<td class="tekst" style="width:9%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>BTW %</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>BTW</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>TOTAAL</b>
												</td>
											</tr>
											<xsl:for-each select="msxml:node-set($sortedfac)/data_row">
												<tr>
													<td class="tekst" style="width:9%;text-left:center;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="RESNR"/>
													</td>
													<td class="tekst" style="width:46%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:choose>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='0L'">
														    Lidmaatschap <xsl:value-of select="RUIMTE_VOORZIENINGEN"/>
														  </xsl:when>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='1R'">
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/><xsl:text> </xsl:text><xsl:value-of select="DATUM"/><xsl:text> </xsl:text><xsl:value-of select="VAN"/>-<xsl:value-of select="TOT"/><br/>
														    <xsl:value-of select="OMSCHRIJVING"/>
														  </xsl:when>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='1S'">
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/> korting
														  </xsl:when>
														  <xsl:otherwise>
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/>
														  </xsl:otherwise>
														</xsl:choose>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * KOSTEN, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:9%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number(BTWTARIEF, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * BTWKOSTEN, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * (KOSTEN + BTWKOSTEN), '0,00', 'european')"/>
													</td>
												</tr>
											</xsl:for-each>
											<tr>
												<td colspan="2" class="tekst" style="width:55%;text-align:right;border:1px solid black;padding:3px;">
													<b>TOTAAL (€)</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<b><xsl:value-of select="format-number($multiplier * sum(msxml:node-set($sortedfac)/data_row/KOSTEN), '0,00', 'european')"/></b>
												</td>
												<td class="tekst" style="width:9%;text-align:right;border:1px solid black;padding:3px;">
													<b></b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<b><xsl:value-of select="format-number($multiplier * sum(msxml:node-set($sortedfac)/data_row/BTWKOSTEN), '0,00', 'european')"/></b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<!--b><xsl:value-of select="format-number(sum(msxml:node-set($sortedfac)/data_row/KOSTEN) + sum(msxml:node-set($sortedfac)/data_row/BTWKOSTEN), '0,00', 'european')"/></b-->
													<b><xsl:value-of select="format-number($multiplier * $totsumfact, '0,00', 'european')"/></b>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<!--tr><td colspan="3" class="tekst">Wij verzoeken u het bedrag vóór vervaldatum over te maken onder vermelding van het factuurnummer en het debiteurennummer.</td></tr-->
								<xsl:choose>
									<xsl:when test="$totsumfact=$totsumcred">
										<tr><td colspan="3" class="tekst">Laatstgenoemd bedrag zullen wij aan u overmaken, danwel in mindering brengen op eventuele openstaande bedragen.</td></tr>
									</xsl:when>
									<xsl:otherwise>
										<tr><td colspan="3" class="tekst">Wij verzoeken u het bedrag vóór vervaldatum over te maken onder vermelding van het factuurnummer en het debiteurennummer.</td></tr>
									</xsl:otherwise>
								</xsl:choose>
								<tr><td colspan="3" height="30px"/></tr>
								<tr>
									<td class="tekst" style="width:22%;">Bankrekeningnummer</td>
									<td colspan="2" class="tekst" style="width:78%;">: NL52RABO0173847757</td>
								</tr>
								<tr>
									<td class="tekst">Swift code</td>
									<td colspan="2" class="tekst">: RABONL2U</td>
								</tr>
								<tr>
									<td class="tekst">Ten name van</td>
									<td colspan="2" class="tekst">: Bouwinvest Dutch Institutional Office Fund N.V.</td>
								</tr>
								<tr>
									<td class="tekst">BTW-identificatienr.</td>
									<td colspan="2" class="tekst">: NL8215.49.571.B.01</td>
								</tr>
								<tr>
									<td class="tekst">KvK-nummer</td>
									<td colspan="2" class="tekst">: 34366457</td>
								</tr>
								<!--tr><td colspan="3"><xsl:call-template name="factuurfooter"/></td></tr-->
  </xsl:when>
  <xsl:otherwise>
								<xsl:choose>
									<xsl:when test="$totsumfact=$totsumcred">
										<tr><td colspan="3" class="tekst"><b style="font-size:11pt">CREDIT INVOICE</b></td></tr>
									</xsl:when>
									<xsl:otherwise>
										<tr><td colspan="3" class="tekst"><b style="font-size:11pt">INVOICE</b></td></tr>
									</xsl:otherwise>
								</xsl:choose>
								<tr>
									<td colspan="2" style="width:55%;padding-right:3px;">
										<table style="width:100%;border-collapse:collapse;border:1px solid black;">
											<tr>
												<td class="tekst" style="width:40%;border-width:0px;padding:3px;">Period</td>
												<td class="tekst" style="width:60%;border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FACTUURPERIODE"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
												<td class="tekst" style="border-width:0px;padding:3px;">&#xA0;</td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">VAT identification no.</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/BTWNR"/></td>
											</tr>
										</table>
									</td>
									<td style="width:45%;padding-left:3px;">
										<table style="width:100%;border-collapse:collapse;border:1px solid black;">
											<tr>
												<td class="tekst" style="width:50%;border-width:0px;padding:3px;">Invoice no.</td>
												<td class="tekst" style="width:50%;border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FCLT_F_FACTUUR"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Customer account</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/HIDE_F_DEBNR"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Date of invoice</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/FACTUURDATUM"/></td>
											</tr>
											<tr>
												<td class="tekst" style="border-width:0px;padding:3px;">Due date</td>
												<td class="tekst" style="border-width:0px;padding:3px;">: <xsl:value-of select="msxml:node-set($sortedfac)/data_row/VERVALDATUM"/></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<tr>
									<td colspan="3" class="tekst">
										On behalf of Bouwinvest Dutch Institutional Office Fund N.V., La Guardiaweg 4, 1043 DG, Amsterdam, The Netherlands, we bring into account:<br/>
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<tr>
									<td colspan="3">
										<table border="0" style="width:100%;border-collapse:collapse;">
											<tr>
												<td class="tekst" style="width:9%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>RES.NO.</b>
												</td>
												<td class="tekst" style="width:46%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>DESCRIPTION</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>NET (€)</b>
												</td>
												<td class="tekst" style="width:9%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>VAT %</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>VAT (€)</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;background-color:#ddd;padding:3px;">
													<b>TOTAL (€)</b>
												</td>
											</tr>
											<xsl:for-each select="msxml:node-set($sortedfac)/data_row">
												<tr>
													<td class="tekst" style="width:9%;text-left:center;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="RESNR"/>
													</td>
													<td class="tekst" style="width:46%;text-align:left;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:choose>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='0L'">
														    Membership <xsl:value-of select="RUIMTE_VOORZIENINGEN"/>
														  </xsl:when>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='1R'">
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/><xsl:text> </xsl:text><xsl:value-of select="DATUM"/><xsl:text> </xsl:text><xsl:value-of select="VAN"/>-<xsl:value-of select="TOT"/><br/>
														    <xsl:value-of select="OMSCHRIJVING"/>
														  </xsl:when>
														  <xsl:when test="substring(HIDE_F_RESTYPE, 1, 2)='1S'">
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/> discount
														  </xsl:when>
														  <xsl:otherwise>
														    <xsl:value-of select="RUIMTE_VOORZIENINGEN"/>
														  </xsl:otherwise>
														</xsl:choose>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * KOSTEN, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:9%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number(BTWTARIEF, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * BTWKOSTEN, '0,00', 'european')"/>
													</td>
													<td class="tekst" style="width:12%;text-align:right;border-left:1px solid black;border-right:1px solid black;border-top:1px solid black;padding:3px;">
														<xsl:value-of select="format-number($multiplier * (KOSTEN + BTWKOSTEN), '0,00', 'european')"/>
													</td>
												</tr>
											</xsl:for-each>
											<tr>
												<td colspan="2" class="tekst" style="width:55%;text-align:right;border:1px solid black;padding:3px;">
													<b>TOTAL (€)</b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<b><xsl:value-of select="format-number($multiplier * sum(msxml:node-set($sortedfac)/data_row/KOSTEN), '0,00', 'european')"/></b>
												</td>
												<td class="tekst" style="width:9%;text-align:right;border:1px solid black;padding:3px;">
													<b></b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<b><xsl:value-of select="format-number($multiplier * sum(msxml:node-set($sortedfac)/data_row/BTWKOSTEN), '0,00', 'european')"/></b>
												</td>
												<td class="tekst" style="width:12%;text-align:right;border:1px solid black;padding:3px;">
													<!--b><xsl:value-of select="format-number(sum(msxml:node-set($sortedfac)/data_row/KOSTEN) + sum(msxml:node-set($sortedfac)/data_row/BTWKOSTEN), '0,00', 'european')"/></b-->
													<b><xsl:value-of select="format-number($multiplier * $totsumfact, '0,00', 'european')"/></b>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr><td colspan="3" height="20px"/></tr>
								<!--tr><td colspan="3" class="tekst">Wij verzoeken u het bedrag vóór vervaldatum over te maken onder vermelding van het factuurnummer en het debiteurennummer.</td></tr-->
								<xsl:choose>
									<xsl:when test="$totsumfact=$totsumcred">
										<!--tr><td colspan="3" class="tekst">Laatstgenoemd bedrag zullen wij aan u overmaken, danwel in mindering brengen op eventuele openstaande bedragen.</td></tr-->
										<tr><td colspan="3" class="tekst">Above amount will be transferred to you or deducted from any outstanding invoices.</td></tr>
									</xsl:when>
									<xsl:otherwise>
										<!--tr><td colspan="3" class="tekst">Wij verzoeken u het bedrag vóór vervaldatum over te maken onder vermelding van het factuurnummer en het debiteurennummer.</td></tr-->
										<tr><td colspan="3" class="tekst">Payment should be made within 30 days by money transfer only quoting the invoice no. to the following account:</td></tr>
									</xsl:otherwise>
								</xsl:choose>
								<tr><td colspan="3" height="30px"/></tr>
								<tr>
									<td class="tekst" style="width:22%;">Bank account no. (Rabobank)</td>
									<td colspan="2" class="tekst" style="width:78%;">: NL52RABO0173847757</td>
								</tr>
								<tr>
									<td class="tekst">Swift code / BIC</td>
									<td colspan="2" class="tekst">: RABONL2U</td>
								</tr>
								<tr>
									<td class="tekst">In the name of</td>
									<td colspan="2" class="tekst">: Bouwinvest Dutch Institutional Office Fund N.V.</td>
								</tr>
								<tr>
									<td class="tekst">VAT identification no.</td>
									<td colspan="2" class="tekst">: NL8215.49.571.B.01</td>
								</tr>
								<tr>
									<td class="tekst">Chamber of Commerce no.</td>
									<td colspan="2" class="tekst">: 34366457</td>
								</tr>
								<!--tr><td colspan="3"><xsl:call-template name="factuurfooter"/></td></tr-->
  </xsl:otherwise>
</xsl:choose>
							</xsl:if>
						</xsl:for-each>
					</table>
				</body>
			</html>
		</xsl:if>

		<xsl:if test="@view='wibc_v_rap_freezereserveringen' or @view='WIBC_V_RAP_FREEZERESERVERINGEN'">
			<html>
				<xsl:call-template name="htmlhead"/>
				<body>
					<table width="100%" class="rstable" cellpadding="0" cellspacing="0">
						<xsl:if test="count(rapport_data/data_row)=0">
							<tr><td><center><b>Geen gegevens gevonden</b></center></td></tr>
						</xsl:if>

						<xsl:variable name="sorted">
							<xsl:for-each select="rapport_data/data_row">
								<xsl:sort select="FCLT_F_BEDRIJF"/>
								<xsl:copy-of select="."/>
							</xsl:for-each>
						</xsl:variable>

						<xsl:for-each select="msxml:node-set($sorted)/data_row">
							<xsl:if test="position()=1">
								<tr>
									<th style="text-align:left">Bedrijf</th>
									<th style="text-align:left">T.a.v.</th>
									<th style="text-align:center">#Reserveringen</th>
									<th style="text-align:left">Afsluiting</th>
									<th style="text-align:left">Controle</th>
								</tr>
							</xsl:if>
							<tr>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_BEDRIJF"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_AANVRAGER"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:center">
									<xsl:value-of select="AANTAL"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<xsl:choose>
								 <xsl:when test="PERIODE='0'">
									<xsl:element name="td">
										<xsl:attribute name="title">Bevries reservering(en) en genereer definitieve factuur!</xsl:attribute>
										<xsl:attribute name="style">cursor:pointer;text-align:left;</xsl:attribute>
										<!--xsl:attribute name="onclick">$.post('../../cust/wibc/res_statusupdate.asp?prskey=<xsl:value-of select="HIDE_F_PRSKEY"/>&amp;prsnaam=<xsl:value-of select="FCLT_F_BEDRIJF"/>', {}, FcltCallbackRefresh, "json");</xsl:attribute-->
										<xsl:attribute name="onclick">if (confirm(L("lcl_R_U_sure"))){$.post('../../cust/wibc/res_statusupdate.asp?prskey=<xsl:value-of select="HIDE_F_PRSKEY"/>&amp;prsnaam=<xsl:value-of select="HIDE_F_DEBNR"/>&amp;periode=<xsl:value-of select="PERIODE"/>', {}, FcltCallbackRefresh, "json");}</xsl:attribute>
										<u><b>Boeking afsluiten</b></u>
									</xsl:element>
								 </xsl:when>
								 <xsl:otherwise>
									<xsl:element name="td">
										<xsl:attribute name="title">Bevries reservering(en) en genereer definitieve factuur!</xsl:attribute>
										<xsl:attribute name="style">cursor:pointer;text-align:left;</xsl:attribute>
										<!--xsl:attribute name="onclick">$.post('../../cust/wibc/res_statusupdate.asp?prskey=<xsl:value-of select="HIDE_F_PRSKEY"/>&amp;prsnaam=<xsl:value-of select="FCLT_F_BEDRIJF"/>', {}, FcltCallbackRefresh, "json");</xsl:attribute-->
										<xsl:attribute name="onclick">if (confirm(L("lcl_R_U_sure"))){$.post('../../cust/wibc/res_statusupdate.asp?prskey=<xsl:value-of select="HIDE_F_PRSKEY"/>&amp;prsnaam=<xsl:value-of select="HIDE_F_DEBNR"/>&amp;periode=<xsl:value-of select="PERIODE"/>', {}, FcltCallbackRefresh, "json");}</xsl:attribute>
										<u>Periode afsluiten</u>
									</xsl:element>
								 </xsl:otherwise>
								</xsl:choose>
								<xsl:element name="td">
									<xsl:attribute name="title">Toon concept factuur.</xsl:attribute>
									<xsl:attribute name="style">cursor:pointer;text-align:left;</xsl:attribute>
									<!--xsl:attribute name="onclick">FcltMgr.openDetail('appl/fac/fac_usrrap_list.asp?usrrap_key=21&amp;fclt_f_colname1=FCLT_F_BEDRIJF&amp;fclt_f_colvalue1=<xsl:value-of select="FCLT_F_BEDRIJF"/>', 'Factuur <xsl:value-of select="HIDE_F_PRSKEY"/>');</xsl:attribute-->
									<xsl:attribute name="onclick">FcltMgr.openDetail('appl/fac/fac_usrrap_list.asp?usrrap_key=21&amp;fclt_f_colname1=HIDE_F_DEBNR&amp;fclt_f_colvalue1=<xsl:value-of select="HIDE_F_DEBNR"/>&amp;fclt_f_colname2=PERIODE&amp;fclt_f_colvalue2=<xsl:value-of select="PERIODE"/>', 'Factuur <xsl:value-of select="HIDE_F_PRSKEY"/>');</xsl:attribute>
									<u>Factuur controleren</u>
								</xsl:element>
							</tr>
						</xsl:for-each>
					</table>
				</body>
			</html>
		</xsl:if>

		<xsl:if test="@view='wibc_v_rap_transactielijst' or @view='WIBC_V_RAP_TRANSACTIELIJST'">
			<script>
				<xsl:text disable-output-escaping="yes">
					function run_opslaan (p_bb_key) {
					l_id = 'ref_' + p_bb_key;
					l_obj = document.getElementById (l_id);
					$.post('../../cust/wibc/bb_statusupdate.asp?bb_key=' + p_bb_key + '&amp;bb_ref=' + l_obj.value, {}, FcltCallbackRefresh, "json");
					}
				</xsl:text>
			</script>
			<html>
				<xsl:call-template name="htmlhead"/>
				<body>
					<table border="0" class="rstable" cellpadding="0" cellspacing="0">
						<xsl:if test="count(rapport_data/data_row)=0">
							<tr>
								<td>
									<center>
										<b>Geen gegevens gevonden</b>
									</center>
								</td>
							</tr>
						</xsl:if>

						<xsl:variable name="sorted">
							<xsl:for-each select="rapport_data/data_row">
								<xsl:sort select="HIDE_F_BB_KEY" data-type="number"/>
								<xsl:copy-of select="."/>
							</xsl:for-each>
						</xsl:variable>

						<xsl:for-each select="msxml:node-set($sorted)/data_row">
							<xsl:if test="position()=1">
								<tr>
									<th style="text-align:left">Afschrift</th>
									<th style="text-align:left">Boekdatum</th>
									<th style="text-align:left">Omschrijving</th>
									<th style="text-align:center">C/D</th>
									<th style="text-align:right">Transactiebedrag</th>
									<th style="text-align:left">Referentie</th>
									<th style="text-align:right">Referentiebedrag</th>
								</tr>
							</xsl:if>
							<tr>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_AFSCHRIFT"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_D_BOEKDATUM"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="OMSCHRIJVING"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:center">
									<xsl:value-of select="FCLT_F_CD"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:value-of select="format-number(T_BEDRAG, '0,00', 'european')"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<xsl:element name="td">
									<table border="0" style="width:100%;border-collapse:collapse;" cellpadding="0" cellspacing="0">
										<tr>
											<xsl:element name="td">
												<xsl:attribute name="style">border-width:0px;padding:0px;</xsl:attribute>
												<xsl:element name="input">
													<xsl:attribute name="id">ref_<xsl:value-of select="HIDE_F_BB_KEY"/>
													</xsl:attribute>
													<xsl:attribute name="type">text</xsl:attribute>
													<xsl:attribute name="size">40</xsl:attribute>
													<xsl:attribute name="maxlength">50</xsl:attribute>
													<xsl:attribute name="value"><xsl:value-of select="R_WAARDE"/></xsl:attribute>
												</xsl:element>
											</xsl:element>
											<xsl:element name="td">
												<xsl:attribute name="title">link voor opslaan referentie</xsl:attribute>
												<xsl:attribute name="style">cursor:pointer;border-width:0px;padding:0px;</xsl:attribute>
												<xsl:attribute name="onclick">run_opslaan (<xsl:value-of select="HIDE_F_BB_KEY"/>)</xsl:attribute>
												<u>Opslaan</u>
											</xsl:element>
										</tr>
									</table>
								</xsl:element>
								<td style="text-align:right">
									<xsl:if test="R_BEDRAG!=''"><xsl:value-of select="format-number(R_BEDRAG, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
							</tr>
						</xsl:for-each>
					</table>
				</body>
			</html>
		</xsl:if>

		<xsl:if test="@view='wibc_v_rap_openpostenlijst' or @view='WIBC_V_RAP_OPENPOSTENLIJST'">
			<html>
				<xsl:call-template name="htmlhead"/>
				<body>
					<table border="0" class="rstable" cellpadding="0" cellspacing="0">
						<xsl:if test="count(rapport_data/data_row)=0">
							<tr>
								<td>
									<center>
										<b>Geen gegevens gevonden</b>
									</center>
								</td>
							</tr>
						</xsl:if>

						<xsl:variable name="sorted">
							<xsl:for-each select="rapport_data/data_row">
								<xsl:sort select="FCLT_F_FACTUURNUMMER"/>
								<xsl:copy-of select="."/>
							</xsl:for-each>
						</xsl:variable>

						<xsl:for-each select="msxml:node-set($sorted)/data_row">
							<xsl:if test="position()=1">
								<tr>
									<th style="text-align:left">Legal<br/>Entity</th>
									<!--th style="text-align:left">Property</th-->
									<th style="text-align:left">Charge To</th>
									<th style="text-align:left">Factuurnummer</th>
									<th style="text-align:left;width:6%;">Factuur<br/>datum</th>
									<th style="text-align:left;width:6%;">Verval<br/>datum</th>
									<th style="text-align:left;width:6%;">Boek<br/>periode</th>
									<th style="text-align:right;width:6%;">Totaal<br/>Gefactureerd</th>
									<th style="text-align:right;width:6%;">Current<br/>Owed</th>
									<th style="text-align:right;width:6%;">0 - 30<br/>Owed</th>
									<th style="text-align:right;width:6%;">31 - 60<br/>Owed</th>
									<th style="text-align:right;width:6%;">61 - 90<br/>Owed</th>
									<th style="text-align:right;width:6%;">91 - 120<br/>Owed</th>
									<th style="text-align:right;width:6%;">Over 120<br/>Owed</th>
									<th style="text-align:right;width:6%;"><br/>Betalingen</th>
									<th style="text-align:left">Memo</th>
								</tr>
							</xsl:if>
							<tr>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_LEGAL_ENTITY"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<!--td style="text-align:left">
									<xsl:value-of select="PROPERTY"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td-->
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_CHARGE_TO"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="FCLT_F_FACTUURNUMMER"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="FACTUURDATUM"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="VERVALDATUM"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="BOEKPERIODE"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:value-of select="format-number(TOTAAL_GEFACTUREERD, '0,00', 'european')"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:value-of select="format-number(CURRENT_OWED, '0,00', 'european')"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="CURRENT_OWED!=0 and OWED_0_30!=''"><xsl:value-of select="format-number(OWED_0_30, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="CURRENT_OWED!=0 and OWED_31_60!=''"><xsl:value-of select="format-number(OWED_31_60, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="CURRENT_OWED!=0 and OWED_61_90!=''"><xsl:value-of select="format-number(OWED_61_90, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="CURRENT_OWED!=0 and OWED_91_120!=''"><xsl:value-of select="format-number(OWED_91_120, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="CURRENT_OWED!=0 and OWED_OVER_120!=''"><xsl:value-of select="format-number(OWED_OVER_120, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:right">
									<xsl:if test="BETALINGEN!=''"><xsl:value-of select="format-number(BETALINGEN, '0,00', 'european')"/></xsl:if>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
								<td style="text-align:left">
									<xsl:value-of select="MEMO"/>
									<xsl:if test="$mode!='excel'">&#xA0;</xsl:if>
								</td>
							</tr>
						</xsl:for-each>
					</table>
				</body>
			</html>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet>
