<?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:decimal-format name="euro" decimal-separator="," NaN='-' grouping-separator="."/>

<xsl:variable name="Xmode">email</xsl:variable>
  <xsl:template name="stylesheet">
    <style>body {
       font-family: Calibri, Verdana;
       background-color: #fff;
       margin-left: 8px;
       margin-top: 8px;
       color: #000;
       font-size: 1em;
    }

    table {
      border: 0;
    }

    th {
      font-family: Calibri,Verdana;
      font-size: 11pt;
      font-weight: normal;
      color: #ffffff;
      text-decoration: none;
      padding:  3px;
      background-color: #003478;
    }

    th.resth {
      font-family: Calibri,Verdana;
      font-size: 11pt;
      font-weight: normal;
      color: #000;
      text-decoration: none;
      padding:  3px;
      background-color: #fff;
    }

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

    td.result {
      text-decoration: none;
      padding-bottom: 2px;
      padding-top: 2px;
      padding-left: 2px;
      padding-right: 2px;
      background-color: #D6D8E8;
    }

    td.resresult {
      text-decoration: none;
      padding-bottom: 2px;
      padding-top: 2px;
      padding-left: 2px;
      padding-right: 2px;
      background-color: #fff;
    }

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

    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: 10pt;
    }

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

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

    td.tiny {
      font-size: 6pt;
      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">
	    <xsl:param name="bedrijf"/>
	    <xsl:variable name="Logo">
	        <xsl:choose>
	            <xsl:when test="$bedrijf='Facilitor BV'">tmpl_logo.gif</xsl:when>
	            <xsl:otherwise>tmpl_logoaar.gif</xsl:otherwise>
	          </xsl:choose>
	      </xsl:variable>
		<table border="0" width="100%">
			<tr>
				<td width="34%" bordercolor="#FFFFFF" align="center">
					<xsl:choose>
						<xsl:when test="$mode='email'">
						<xsl:element name="img"><xsl:attribute name="src">cid:<xsl:value-of select="$Logo"/></xsl:attribute></xsl:element>
						</xsl:when>
						<xsl:otherwise><xsl:element name="img"><xsl:attribute name="src">../../cust/<xsl:value-of select="//header/custId"/>/<xsl:value-of select="$Logo"/></xsl:attribute></xsl:element></xsl:otherwise>
					</xsl:choose>
				</td>
				<td width="33%"></td>
				<td width="33%" align="right" valign="bottom" style="text-align:right">
					<b><xsl:value-of select="//lcl/FAC/printdatum"/>:&#xA0;</b><xsl:value-of select="//header/dateTime"/>&#xA0;&#xA0;
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="pagefooter">
		<table border="0" width="100%">
			<tr>
				<td height="10px"/>
			</tr>
			<tr>
				<td align="right" valign="top" class="tiny">
					<b>FACILITOR</b>&#160;<xsl:value-of select="//header/version"/>.<xsl:value-of select="$DefRev"/>.<xsl:value-of select="$Rev"/>&#xA0;&#xA0;
				</td>
			</tr>
		</table>
	</xsl:template>
	
  <xsl:template match="melding" mode="full">
       <xsl:choose>
            <xsl:when test="$mode='summary'"></xsl:when>
       <xsl:otherwise>
    <html>
      <xsl:comment>================================ MELDINGEN ==============================</xsl:comment>
      <xsl:comment>FACILITOR default XSL template for melding</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:with-param name="bedrijf" select="voor/descendant::*/bedrijf/naam"/>
        </xsl:call-template>
        <xsl:choose>
             <xsl:when test="$srtnotificatiecode = 'MLDKTO'">
               <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:template>	

	<xsl:template match="melding" mode="include">
		<xsl:choose>
			<xsl:when test="discipline/srtdiscipline/prefix='AX'">
		    <xsl:choose>
			    <xsl:when test="discipline/omschrijving='Facturen'">
				<table border="0" width="100%" cellpadding="2">
					<tr>
						<td colspan="4" class="caption" style="padding-top:20px;padding-bottom:20px">
							<b>Aanvraagformulier creditering facturen</b>
						</td>
					</tr>
					<tr>
					<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" width="25%" colspan="1">
										<b>Datum</b>
									</th>
									<td align="left" colspan="3">
										<xsl:value-of select="gemeld/datum"/>
									</td>
								</tr>
								<tr>
									<th align="left" colspan="1"><b>Aanvrager</b></th>
									<td align="left" colspan="3"><xsl:value-of select="voor/naam_full"/></td>
								</tr>
								<tr>
									<th align="left" colspan="1"><b>Klant/debiteurnummer</b></th>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Klant/debiteurnummer']/bedrijf/naam"/> / <xsl:value-of select="kenmerk[@naam='Klant/debiteurnummer']/bedrijf/leverancier_nr"/></td>
								</tr>
								<tr>
									<th align="left" colspan="1"><b>Betreft factuurnummer(s)</b></th>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Betreft factuurnummer(s)']"/></td>
								</tr>
								<tr>
									<th align="left" colspan="1"><b>Betreft projectnummer(s)/ordernummer(s)</b></th>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Betreft projectnummer(s)/ordernummer(s)']"/></td>
								</tr>
								<tr>
									<th align="left" colspan="1"><b>Creditbedrag</b></th>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Creditbedrag']"/></td>
								</tr>
						        <tr>
									<th align="left" colspan="1"><b>Reden</b></th>
									<td align="left" colspan="3">
									<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="omschrijving"/>
									</xsl:call-template>
									</td>
								</tr>
							</table>
						</td>
					</tr>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
						<td>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" colspan="3">
										<b>Honorering creditering facturen:</b>
									</th>
								</tr>
								<tr>
									<xsl:choose>
									<xsl:when test="tracking/track[@code='MLDACP']">
									    <td width="30%">Goedgekeurd / <strike>Afgekeurd</strike></td>
									</xsl:when>
									<xsl:otherwise>
                                        <td width="30%">Goedgekeurd / Afgekeurd</td>
									</xsl:otherwise>
									</xsl:choose>
									<td width="25%">Datum: <xsl:value-of select="tracking/track[@code='MLDACP']/datum/datum"/></td>
									<td>Paraaf: <xsl:value-of select="tracking/track[@code='MLDACP']/user/naam_full"/><br/><br/><br/></td>
								</tr>
								<tr>
									<th align="left" colspan="3">
										<b>Opmerkingen</b>
									</th>
								</tr>
								<tr>
									<td align="left" colspan="3">
									<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="opmerking"/>
									</xsl:call-template>
									</td>
								</tr>
							</table>
						</td>
					</tr>
						</td>
					</tr>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
					<td>
					 <xsl:element name="a">
                      <xsl:attribute name="href">https://<xsl:value-of select="$FacilitorRoot"/>?<xsl:value-of select="../bookmarks/melding"/><xsl:value-of select="key"/></xsl:attribute>klik hier om direct naar de melding te gaan</xsl:element>
					</td>
					</tr>
				</table>
			    </xsl:when>
			    <xsl:otherwise>
				<table border="0" width="100%" cellpadding="2">
					<tr>
						<td colspan="2" class="caption" style="padding-top:20px;padding-bottom:20px">
							<b>Aanvraagformulier: <xsl:value-of select="stdmelding/omschrijving"/></b>
						</td>
						<td colspan="2" class="caption" style="padding-top:20px;padding-bottom:20px">
						</td>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="100%" cellpadding="2px">
								<tr>
									<th align="left" width="20%">
										<b>Datum aanvraag</b>
									</th>
									<th align="left" width="35%">
										<b><xsl:value-of select="gemeld/datum"/></b>
									</th>
									<th align="left" width="20%">
										<b>Projectnummer</b>
									</th>
									<th align="left" width="25%">
										<b>(<xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/>)
											<xsl:value-of select="kenmerk[@naam='Actief projectnummer']"/></b>
									</th>
								</tr>
								<tr>
									<td align="right" width="18%">Klant</td>
									<td align="left" width="32%">
									<xsl:choose>
									<xsl:when test="kenmerk[@naam='Klant']=''">
									    <xsl:value-of select="kenmerk[@naam='KlantID']"/>-<xsl:value-of select="kenmerk[@naam='Klant(oud)']"/>
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="kenmerk[@naam='KlantID']"/>-<xsl:value-of select="kenmerk[@naam='Klant']/bedrijf/naam"/><xsl:if test="kenmerk[@naam='Klant']/bedrijf/leverancier_nr!=''"> / <xsl:value-of select="kenmerk[@naam='Klant']/bedrijf/leverancier_nr"/></xsl:if>
										<xsl:if test="kenmerk[@naam='Klant']/bedrijf/post_adres!=''"><br/><br/><xsl:value-of select="kenmerk[@naam='Klant']/bedrijf/post_adres"/><br/><xsl:value-of select="kenmerk[@naam='Klant']/bedrijf/post_postcode"/><br/><xsl:value-of select="kenmerk[@naam='Klant']/bedrijf/post_plaats"/></xsl:if>
									</xsl:otherwise>
									</xsl:choose>
									</td>
									<td align="right" width="18%">Acontobedrag</td>
									<td align="left" width="32%"><xsl:if test="kenmerk[@naam='Acontobedrag']!=''">€&#xA0;<xsl:value-of select="kenmerk[@naam='Acontobedrag']"/></xsl:if></td>
								</tr>
								<tr>
									<td>Offertekenmerk</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Offertenr']"/>
									</td>
									<td>Facturatie</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Factuurschema']"/>
									</td>
								</tr>
								<tr>
									<td>Factuurkenmerk</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Factuurkenmerk']"/>
									</td>
									<td>Kilometerprijs</td>
									<td><xsl:if test="kenmerk[@naam='Kilometerprijs']!=''">€&#xA0;<xsl:value-of select="format-number(kenmerk[@naam='Kilometerprijs'], '###.##0,00', 'european')"/></xsl:if></td>
								</tr>
								<tr>
									<td>Projectmanager</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Projectmanager']/perslid/naam_full"/>
									</td>
									<td>Ingangsdatum</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Ingangsdatum']"/>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height="20px">
						<td/>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="100%" cellpadding="2">
								<tr>
									<th align="left" width="17%">
										<b>Projectnummer</b>
									</th>
									<th align="left" width="19%">
										<b>Omschrijving</b>
									</th>
									<th align="left" width="14%">
										<b>Uren</b>
									</th>
									<th align="left" width="16%">
										<b>Urensoort</b>
									</th>
									<th align="left" width="16%">
										<b>Uurtarief</b>
									</th>
									<th align="left" width="16%">
										<b>Opdrachttype</b>
									</th>
								</tr>
								<tr>
									<td>AX:&#xA0;<xsl:value-of select="kenmerk[@naam='Toegekend AX-nummer']"/><br/>
										<br/>
										<i>Logcentre:&#xA0;<xsl:value-of select="kenmerk[@naam='Logcentre']"/></i>
									</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Opdracht titel']"/>
									</td>
									<td>
										<xsl:value-of select="kenmerk[@naam='Raming']"/>
									</td>
									<td>F-Consult</td>
									<td>
										<xsl:if test="kenmerk[@naam='Uurtarief']!=''">€&#xA0;</xsl:if>
										<xsl:value-of select="kenmerk[@naam='Uurtarief']"/>
									</td>
									<td>
										<xsl:choose>
											<xsl:when test="kenmerk[@naam='Uurtarief']!=''">Tijd en Materiaal</xsl:when>
											<xsl:otherwise>Vaste prijs</xsl:otherwise>
										</xsl:choose>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="100%" cellpadding="2">
								<tr>
									<th align="left">
										<b>Toelichting</b>
									</th>
								</tr>
								<tr>
									<td align="left" colspan="3">
										<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="omschrijving"/>
										</xsl:call-template>
									</td>
								</tr>
								<tr>
									<td align="left" colspan="3">
										<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="opmerking"/>
										</xsl:call-template>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height="20px">
						<td/>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="100%" cellpadding="2">
								<tr>
									<th align="left" width="25%">
										<b>Benodigde parafen voor acceptatie</b>
									</th>
									<th align="left" width="25%">
										<b>Functie</b>
									</th>
									<th align="left" width="20%">
										<b>Datum</b>
									</th>
									<th align="left" width="30%">
										<b>Paraaf</b>
									</th>
								</tr>
								<tr>
									<td>Alle projecten <br/><br/><br/><br/></td>
									<td>Procuratiehouder</td>
									<td>
										<xsl:value-of select="tracking/track[@code='MLDACP']/datum/datum"/>&#xA0;<xsl:value-of select="tracking/track[@code='MLDACP']/datum/tijd"/></td>
									<td>
										<xsl:value-of select="tracking/track[@code='MLDACP']/user/naam_full"/>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="discipline/srtdiscipline/prefix='AXI'">
				<table border="0" width="100%" cellpadding="2">
					<tr>
						<td colspan="4" class="caption" style="padding-top:20px;padding-bottom:20px">
							<b>Bestelformulier Facilitor: verplichting <xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
						</td>
					</tr>
					<tr>
					<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" width="25%" colspan="1">
										<b>Datum: <xsl:value-of select="gemeld/datum"/></b>
									</th>
									<th align="left" colspan="3">
										<b>Aanvraagnummer: <xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
									</th>
								</tr>
								<tr>
									<td align="right" colspan="1">Aanvrager</td>
									<td align="left" colspan="3"><xsl:value-of select="voor/naam_full"/></td>
								</tr>
						        <tr>
									<td align="right" colspan="1">Omschrijving</td>
									<td align="left" colspan="3">
									<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="omschrijving"/>
									</xsl:call-template>
									</td>
								</tr>
								<tr>
									<td align="right" colspan="1">Aantal</td>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Aantal']"/></td>
								</tr>
								<tr>
									<td align="right" colspan="1">Prijs</td>
									<td align="left" colspan="3">
    									<xsl:if test="kenmerk[@naam='Prijs'] !=''">
    									    € <xsl:value-of select="format-number(kenmerk[@naam='Prijs'], '###.##0,00', 'european')"/>
    									</xsl:if>
									</td>
								</tr>
								<tr>
									<td align="right" colspan="1">BTW</td>
									<td align="left" colspan="3">
    									<xsl:if test="kenmerk[@naam='BTW'] !=''">
    									    € <xsl:value-of select="format-number(kenmerk[@naam='BTW'], '###.##0,00', 'european')"/>
    									</xsl:if>
									</td>
								</tr>
								<tr>
									<td align="right" colspan="1">Artikelcode</td>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Artikelcode']"/></td>
								</tr>
								<tr>
									<td align="right" colspan="1">Voorkeur Leverancier</td>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Voorkeur Leverancier']"/></td>
								</tr>
								<tr>
									<td align="right" colspan="1">Evt. projectnummer</td>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Evt. projectnummer']"/></td>
								</tr>
								<tr>
									<td align="right" colspan="1">Verwachte leverdatum</td>
									<td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Verwachte leverdatum']"/></td>
								</tr>
								<tr>
									<td align="right" colspan="1">Bestemd voor</td>
									<xsl:choose>
									<xsl:when test="stdmelding/omschrijving='Verplichting-eigen gebruik'">
									    <td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Bestemd voor afdeling']"/></td>
									</xsl:when>
									<xsl:otherwise>
                                        <td align="left" colspan="3"><xsl:value-of select="kenmerk[@naam='Bestemd voor']/bedrijf/naam"/></td>
									</xsl:otherwise>
									</xsl:choose>
								</tr>
								<tr>
									<td align="right" colspan="1">Opmerkingen</td>
									<td colspan="3">
									    <xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="kenmerk[@naam='Opmerkingen']"/>
										</xsl:call-template>
									</td>
								</tr>
								<xsl:if test="opmerking !=''">
								<tr>
								    <td align="right" colspan="1">Afhandeling</td>
									<td align="left" colspan="3">
									<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="opmerking"/>
										</xsl:call-template>
								    </td>
								</tr>
								</xsl:if>
							</table>
						</td>
					</tr>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
						<td>
							<table border="0" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" colspan="2">
										<b>Bestelgegevens:</b>
									</th>
								</tr>
								<tr>
									<td width="25%">Datum besteld</td>
									<td align="left"><xsl:value-of select="tracking/track[@code='MLDNEW']/datum/datum"/>&#xA0;<xsl:value-of select="tracking/track[@code='MLDNEW']/datum/tijd"/></td>
								</tr>
								<tr>
									<td>Besteld door</td>
									<td align="left"><xsl:value-of select="tracking/track[@code='MLDNEW']/user/naam_full"/></td>
								</tr>
								<tr>
									<td>Datum verwacht</td>
									<td align="left"><xsl:value-of select="kenmerk[@naam='Datum verwacht']"/></td>
								</tr>
								<tr>
									<td>Datum ontvangen</td>
									<td align="left"><xsl:value-of select="kenmerk[@naam='Datum ontvangen']"/></td>
								</tr>
								<tr>
									<td>Datum uitgeleverd</td>
									<td align="left"><xsl:value-of select="kenmerk[@naam='Datum uitgeleverd']"/></td>
								</tr>
							</table>
					<tr height="20px">
						<td/>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" colspan="3">
										<b>Afdelingsmanager:</b>
									</th>
								</tr>
								<tr>
									<xsl:choose>
									<xsl:when test="kenmerk[@naam='Afdelingsmanager']!=''">
									    <td width="30%">Goedgekeurd / <strike>Afgekeurd</strike></td>
									</xsl:when>
									<xsl:otherwise>
                                        <td width="30%">Goedgekeurd / Afgekeurd</td>
									</xsl:otherwise>
									</xsl:choose>
									<td width="25%">Datum: <xsl:value-of select="kenmerk[@naam='Goedkeuringsdatum']"/></td>
									<td>Paraaf: <xsl:value-of select="kenmerk[@naam='Afdelingsmanager']"/><br/><br/><br/></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" colspan="3">
										<b>Procuratiehouder (conform procuratiebeleid):</b>
									</th>
								</tr>
								<tr>
									<xsl:choose>
									<xsl:when test="tracking/track[@code='MLDACP']">
									    <td width="30%">Goedgekeurd / <strike>Afgekeurd</strike></td>
									</xsl:when>
									<xsl:otherwise>
                                        <td width="30%">Goedgekeurd / Afgekeurd</td>
									</xsl:otherwise>
									</xsl:choose>
									<td width="25%">Datum: <xsl:value-of select="tracking/track[@code='MLDACP']/datum/datum"/>&#xA0;<xsl:value-of select="tracking/track[@code='MLDACP']/datum/tijd"/></td>
									<td>Paraaf: <xsl:value-of select="tracking/track[@code='MLDACP']/user/naam_full"/><br/><br/><br/></td>
								</tr>
							</table>
						</td>
					</tr>
						</td>
					</tr>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
					<td>
					 <xsl:element name="a">
                      <xsl:attribute name="href">https://<xsl:value-of select="$FacilitorRoot"/>?<xsl:value-of select="../bookmarks/melding"/><xsl:value-of select="key"/></xsl:attribute>klik hier om direct naar de melding te gaan</xsl:element>
					</td>
					</tr>
				</table>
			</xsl:when>
			<xsl:when test="discipline/srtdiscipline/prefix='HR'">
			 <xsl:choose>
			    <xsl:when test="discipline/key=561"> <!-- vakgroep verlof -->
				<table border="0" width="100%" cellpadding="2">
					<tr>
						<td colspan="5" class="caption" style="padding-top:20px;padding-bottom:20px">
							<b>Verlofaanvraag&#xA0;<xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
						</td>
					</tr>
					<tr>
						<td align="left" colspan="1" width="23%">
							<b>Naam:</b>
						</td>
						<td align="left" colspan="1" width="23%">
							<xsl:value-of select="voor/naam_full"/>
						</td>
						<td width="8%"/>
						<td width="23%"></td>
						<td width="23%"></td>
					</tr>
					<tr>
						<td align="left">
							<b>Personeelsnummer:</b>
						</td>
						<td align="left">
							<xsl:value-of select="voor/nr"/>
						</td>
						<td/>
						<td align="left">
							<b>Datum aanvraag:</b>
						</td>
						<td align="left">
							<xsl:value-of select="gemeld/datum"/>
						</td>
					</tr>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
					<td colspan="5">
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" width="25%" colspan="1">
										<b>Soort Verlof</b>
									</th>
									<th align="left">
										<b>Datum verlof</b>
									</th>
									<th align="left">
										<b>T/m datum</b>
									</th>
									<th align="left">
										<b>Dagdeel</b>
									</th>
									<th align="left">
										<b>Aantal uren</b>
									</th>
								</tr>
								<tr>
									<td align="right" width="15%">Verlof</td>
									<td align="left" width="20%"><xsl:value-of select="kenmerk[@volgnummer='20']"/></td>
									<td align="left" width="20%"><xsl:value-of select="kenmerk[@volgnummer='25']"/></td>
									<td align="left" width="20%"><xsl:value-of select="kenmerk[@volgnummer='30']"/></td>
									<td align="left" width="15%"><xsl:value-of select="format-number(kenmerk[@volgnummer='35'], '###.##0,0', 'european')"/> uur</td>
								</tr>
								<xsl:if test="kenmerk[@volgnummer='45']">
								<tr>
									<td align="right">Verlof</td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='45']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='50']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='55']"/></td>
									<td align="left" width="15%"><xsl:value-of select="format-number(kenmerk[@volgnummer='60'], '###.##0,0', 'european')"/> uur</td>
								</tr>
								</xsl:if>
								<xsl:if test="kenmerk[@volgnummer='70']">
								<tr>
									<td align="right">Verlof</td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='70']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='75']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='80']"/></td>
									<td align="left" width="15%"><xsl:value-of select="format-number(kenmerk[@volgnummer='85'], '###.##0,0', 'european')"/> uur</td>
								</tr>
								</xsl:if>
							</table>
						</td>
					</tr>
					<xsl:if test="omschrijving">
                    <tr height="10px">
						<td colspan="5"/>
					</tr>
					<td><b>Toelichting:</b></td>
					<td align="left" colspan="4">
							<xsl:call-template name="linebreaks">
								<xsl:with-param name="string" select="omschrijving"/>
							</xsl:call-template>
						</td>
					</xsl:if>
                    <tr height="20px">
						<td colspan="5"/>
					</tr>
                    <tr>
                    <td colspan="5">
                        <table width="99%" cellpadding="5" style="border-collapse: collapse; border: 1px solid #003478;">
                            <tr>
                            <th colspan="2"><b>Akkoord Leidinggevende:</b></th>
                            <th colspan="3" style="border-left: 1px solid #003478;"><b>Verwerkt in:</b></th>
                            </tr>
                            <tr>
                            <xsl:choose>
    							<xsl:when test="tracking/track[@code='MLDACP']">
    							    <td colspan="2">Goedgekeurd / <strike>Afgekeurd</strike></td>
    							</xsl:when>
    							<xsl:otherwise>
                                    <td colspan="2">Goedgekeurd / Afgekeurd</td>
    							</xsl:otherwise>
    							</xsl:choose>
    						  <td width="20%" style="border-left: 1px solid #003478;"/>
    						  <td width="20%"/>
    						  <td width="25%"/>
                            </tr>
                            <tr>
                             <td colspan="1" width="15%"/>
                              <td/>
                              <td style="border-left: 1px solid #003478;"/>
                              <td>Datum</td>
                              <td>Door</td>
                            </tr>
                            <tr>
                              <td>Datum</td>
                              <td>Naam</td>
                              <td style="border-left: 1px solid #003478;">Agenda:</td>
                              <td>____________</td>
                              <td>____________</td>
                            </tr>
                            <tr>
                              <td><b><xsl:value-of select="tracking/track[@code='MLDACP']/datum/datum"/></b></td>
                              <td><b><xsl:value-of select="tracking/track[@code='MLDACP']/user/naam_full"/></b></td>
                              <td style="border-left: 1px solid #003478;">Planning:</td>
                              <td>____________</td>
                              <td>____________</td>
                            </tr>
                            <tr>
						      <td/>
						      <td/>
						      <td style="border-left: 1px solid #003478;">Administratie:</td>
						      <td>____________</td>
						      <td>____________</td>
					        </tr>
                            <tr height="20px">
				                <td colspan="2"/>
				                <td style="border-left: 1px solid #003478;"/>
				                <td colspan="2"/>
			                </tr>
                        </table>
                    </td>
                    </tr>
                    <tr height="30px">
				      <td/>
			        </tr>
					<tr>
					<td colspan="5">
					 <xsl:element name="a">
                      <xsl:attribute name="href">https://<xsl:value-of select="$FacilitorRoot"/>?<xsl:value-of select="../bookmarks/melding"/><xsl:value-of select="key"/></xsl:attribute>klik hier om direct naar de melding te gaan</xsl:element>
					</td>
					</tr>
				</table>
				</xsl:when>
			    <xsl:when test="discipline/key=601"> <!-- vakgroep declaratie -->
			    <style>
			    td.bedrag {
			        text-align: right;
			    }
			    </style>
			    
                <xsl:variable name="Kosten_1">
                  <xsl:choose>
                    <xsl:when test="string(number(kenmerk[@volgnummer = 25]))='NaN' or kenmerk[@volgnummer = 25] = ''">0</xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="kenmerk[@volgnummer = 25]"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <xsl:variable name="Kosten_2">
                  <xsl:choose>
                    <xsl:when test="string(number(kenmerk[@volgnummer = 50]))='NaN' or kenmerk[@volgnummer = 50] = ''">0</xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="kenmerk[@volgnummer = 50]"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <xsl:variable name="Kosten_3">
                  <xsl:choose>
                    <xsl:when test="string(number(kenmerk[@volgnummer = 75]))='NaN' or kenmerk[@volgnummer = 75] = ''">0</xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="kenmerk[@volgnummer = 75]"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <xsl:variable name="Kosten_4">
                  <xsl:choose>
                    <xsl:when test="string(number(kenmerk[@volgnummer = 100]))='NaN' or kenmerk[@volgnummer = 100] = ''">0</xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="kenmerk[@volgnummer = 100]"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>
                <xsl:variable name="Kosten_5">
                  <xsl:choose>
                    <xsl:when test="string(number(kenmerk[@volgnummer = 125]))='NaN' or kenmerk[@volgnummer = 125] = ''">0</xsl:when>
                    <xsl:otherwise>
                      <xsl:value-of select="kenmerk[@volgnummer = 125]"/>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:variable>

                <xsl:variable name="tot_kosten" select="format-number($Kosten_1, '#.00') + format-number($Kosten_2, '#.00') + format-number($Kosten_3, '#.00') + format-number($Kosten_4, '#.00') + format-number($Kosten_5, '#.00')"/>                                 	                	                			    
			    
				<table border="0" width="100%" cellpadding="2">
					<tr>
						<td colspan="5" class="caption" style="padding-top:20px;padding-bottom:20px">
							<b><xsl:value-of select="stdmelding/omschrijving"/>&#xA0;<xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
						</td>
					</tr>
					<tr>
						<td align="left" colspan="1" width="23%">
							<b>Naam:</b>
						</td>
						<td align="left" colspan="1" width="23%">
							<xsl:value-of select="voor/naam_full"/>
						</td>
						<td width="8%"/>
						<td width="23%"></td>
						<td width="23%"></td>
					</tr>
					<tr>
						<td align="left">
							<b>Personeelsnummer:</b>
						</td>
						<td align="left">
							<xsl:value-of select="voor/nr"/>
						</td>
						<td/>
						<td align="left">
							<b>Datum aanvraag:</b>
						</td>
						<td align="left">
							<xsl:value-of select="gemeld/datum"/>
						</td>
					</tr>
					<xsl:if test="stdmelding/key='261'">
					<tr>
					<td align="left">
                        <b>Betaald per bank d.d.:</b>
						</td>
						<td align="left" colspan="4">
							<xsl:value-of select="kenmerk[@volgnummer='920']"/>
						</td>
					</tr>
					</xsl:if>
                    <tr height="20px">
						<td/>
					</tr>
					<tr>
					<td colspan="5">
							<table border="1" style="border-collapse: collapse; border: 1px solid #003478;" width="99%" cellpadding="3">
								<tr>
									<th align="left" width="10%" colspan="1">
										<b>Datum</b>
									</th>
									<th align="left">
										<b><xsl:value-of select="kenmerk[@volgnummer='10']/@naam"/></b>
									</th>
									<xsl:if test="stdmelding/key='261'">
									<th align="right">
										<b>Km's</b>
									</th>
									<th align="right">
										<b>à</b>
									</th>
									</xsl:if>
									<th align="right">
										<b>Totaal incl. BTW</b>
									</th>
									<th align="left">
										<b>BTW niet invullen</b>
									</th>									
								</tr>
								<tr>
									<td align="left" width="12%"><xsl:value-of select="kenmerk[@volgnummer='5']"/></td>
									<td align="left" width="32%"><xsl:value-of select="kenmerk[@volgnummer='10']"/></td>
							        <xsl:if test="stdmelding/key='261'">
							        <td align="left" width="8%" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='15'], '0,0', 'euro')"/></td>
							        <td align="left" width="8%" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='20'], '0,00', 'euro')"/></td>
							        </xsl:if>
							        <td align="left" class="bedrag">&#8364; <xsl:value-of select="format-number(kenmerk[@volgnummer='25'], '0,00', 'euro')"/></td>
							        <td align="left" width="25%"></td>
								</tr>
								<xsl:if test="kenmerk[@volgnummer='30']">
								<tr>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='30']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='35']"/></td>
									<xsl:if test="stdmelding/key='261'">
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='40'], '0,0', 'euro')"/></td>
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='45'], '0,00', 'euro')"/></td>
							        </xsl:if>
							        <td align="left" class="bedrag">&#8364; <xsl:value-of select="format-number(kenmerk[@volgnummer='50'], '0,00', 'euro')"/></td>
							        <td align="left"></td>
								</tr>
								</xsl:if>
								<xsl:if test="kenmerk[@volgnummer='55']">
								<tr>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='55']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='60']"/></td>
									<xsl:if test="stdmelding/key='261'">
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='65'], '0,0', 'euro')"/></td>
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='70'], '0,00', 'euro')"/></td>
							        </xsl:if>
							        <td align="left" class="bedrag">&#8364; <xsl:value-of select="format-number(kenmerk[@volgnummer='75'], '0,00', 'euro')"/></td>
							        <td align="left"></td>
								</tr>
								</xsl:if>
								<xsl:if test="kenmerk[@volgnummer='80']">
								<tr>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='80']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='85']"/></td>
									<xsl:if test="stdmelding/key='261'">
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='90'], '0,0', 'euro')"/></td>
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='95'], '0,00', 'euro')"/></td>
							        </xsl:if>
							        <td align="left" class="bedrag">&#8364; <xsl:value-of select="format-number(kenmerk[@volgnummer='100'], '0,00', 'euro')"/></td>
							        <td align="left"></td>
								</tr>
								</xsl:if>
								<xsl:if test="kenmerk[@volgnummer='105']">
								<tr>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='105']"/></td>
									<td align="left"><xsl:value-of select="kenmerk[@volgnummer='110']"/></td>
									<xsl:if test="stdmelding/key='261'">
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='115'], '0,0', 'euro')"/></td>
							        <td align="left" class="bedrag"><xsl:value-of select="format-number(kenmerk[@volgnummer='120'], '0,00', 'euro')"/></td>
							        </xsl:if>
							        <td align="left" class="bedrag">&#8364; <xsl:value-of select="format-number(kenmerk[@volgnummer='125'], '0,00', 'euro')"/></td>
							        <td align="left"></td>
								</tr>
								</xsl:if>
								<tr>
									<xsl:choose>
									<xsl:when test="stdmelding/key='261'">
									  <td colspan= "4" align="left"><b>Totaal:</b></td>
									</xsl:when>
									<xsl:otherwise>
									  <td colspan= "2" align="left"><b>Totaal:</b></td>
									</xsl:otherwise>
									</xsl:choose>
							        <td align="left" class="bedrag"><b>&#8364; <xsl:value-of select="format-number($tot_kosten, '0,00', 'euro')"/></b></td>
							        <td align="left"></td>
								</tr>																
							</table>
						</td>
					</tr>
                    <tr height="10px">
						<td colspan="5"/>
					</tr>
                    <tr>
                    <td colspan="5">
                        <table width="99%" cellpadding="5" style="border-collapse: collapse; border: 1px solid #003478;">
                            <tr>
                            <th colspan="2"><b>Paraaf afdelingshoofd:</b></th>
                             <th style="border-left: 1px solid #003478;"><b>Declaratienummer:</b></th>
                             <th colspan="2" style="border-left: 1px solid #003478;"><b>Paraaf geboekt:</b></th>
                            </tr>
                            <tr>
                            <xsl:choose>
    							<xsl:when test="tracking/track[@code='MLDACP']">
    							    <td colspan="2">Goedgekeurd / <strike>Afgekeurd</strike></td>
    							</xsl:when>
    							<xsl:otherwise>
                                    <td colspan="2">Goedgekeurd / Afgekeurd</td>
    							</xsl:otherwise>
    							</xsl:choose>
    						  <td width="20%" style="border-left: 1px solid #003478; text-align: center;"><xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></td>
    						  <xsl:choose>
    							<xsl:when test="tracking/track[@code='MLDAFM']">
    							    <td colspan="2" style="border-left: 1px solid #003478;">Goedgekeurd / <strike>Afgekeurd</strike></td>
    							</xsl:when>
    							<xsl:otherwise>
                                    <td colspan="2" style="border-left: 1px solid #003478;">Goedgekeurd / Afgekeurd</td>
    							</xsl:otherwise>
    					    </xsl:choose>
                            </tr>
                            <tr>
                             <td colspan="1" width="15%"/>
                              <td/>
                              <td style="border-left: 1px solid #003478;"/>
                              <td style="border-left: 1px solid #003478;"/>
                              <td/>
                            </tr>
                            <tr>
                            <xsl:choose>
    						  <xsl:when test="tracking/track[@code='MLDACP']">                            
                              <td>Datum: <xsl:value-of select="tracking/track[@code='MLDACP']/datum/datum"/></td>
                              <td>Naam: <xsl:value-of select="tracking/track[@code='MLDACP']/user/naam_friendly"/></td>
                              </xsl:when>
                              <xsl:otherwise>
                              <td>Datum</td>
                              <td>Naam</td>                              
                              </xsl:otherwise>
                            </xsl:choose>
                            <xsl:choose>
    						  <xsl:when test="tracking/track[@code='MLDAFM']">                            
                              <td style="border-left: 1px solid #003478;"></td>
                              <td style="border-left: 1px solid #003478;">Datum: <xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/></td>
                              <td>Naam: <xsl:value-of select="tracking/track[@code='MLDAFM']/user/naam_friendly"/></td>
                              </xsl:when>
                              <xsl:otherwise>
                              <td style="border-left: 1px solid #003478;"></td>
                              <td style="border-left: 1px solid #003478;">Datum</td>
                              <td>Naam</td>                            
                              </xsl:otherwise>
                            </xsl:choose>                            
                            </tr>
                        </table>
                    </td>
                    </tr>
                    <tr height="30px">
				      <td/>
			        </tr>
					<tr>
					<td colspan="5">
					 <xsl:element name="a">
                      <xsl:attribute name="href">https://<xsl:value-of select="$FacilitorRoot"/>?<xsl:value-of select="../bookmarks/melding"/><xsl:value-of select="key"/></xsl:attribute>klik hier om direct naar de melding te gaan</xsl:element>
					</td>
					</tr>
				</table>
				</xsl:when>				
				<xsl:otherwise/>
				</xsl:choose>
			</xsl:when>
			<xsl:otherwise>
			<xsl:choose>
			<xsl:when test="$srtnotificatiecode='MLDMAI'">			
				<table border="0" width="85%" cellpadding="2" style="margin-left:10%;margin-right:5%;max-width:40em;">
					<tr>
						<td colspan="2" class="caption">
							<b><xsl:value-of select="//lcl/MLD/melding"/>&#xA0;<xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
						</td>
						<td><xsl:if test="spoed&lt;3"><p style="font-size:2em;"><xsl:value-of select="//lcl/MLD/spoed"/></p></xsl:if></td>
    					<td style="text-align:right"><b><xsl:value-of select="//lcl/MLD/status"/>:&#xA0;</b><xsl:value-of select="status"/></td>
					</tr>
					<tr><td colspan="4" style="padding-bottom: 10px; font-size: 1em;">Op <xsl:value-of select="gemeld/datum"/> is om <xsl:value-of select="gemeld/tijd"/> onderstaande melding geregistreerd
					<xsl:if test="voor/key!=melder/key">namens </xsl:if>
					<xsl:if test="voor/key=melder/key">door </xsl:if>
					<xsl:value-of select="voor/naam_friendly"/> van <xsl:value-of select="voor/afdeling/parent/bedrijf/naam"/>.
    				<xsl:if test="status_key!=5 and status_key!=6 and status_key!=1">
    					<br/><br/>Voor vragen over deze melding of de afhandeling kunt u contact opnemen via telefoon <xsl:value-of select="voor/telefoonnr"/><xsl:if test="voor/mobiel">/<xsl:value-of select="voor/mobiel"/></xsl:if> of via e-mail <xsl:value-of select="voor/email"/>.
    					De verwachting is dat e.e.a. binnen <xsl:value-of select="uitvoertijd"/>
        					<xsl:choose>
        					    <xsl:when test="uitvoertijd[@eenheid='U']">&#160;<xsl:value-of select="//lcl/MLD/uren"/>
        					    </xsl:when>
        					    <xsl:otherwise>&#160;<xsl:value-of select="//lcl/FAC/dagen"/>
        					    </xsl:otherwise>
                            </xsl:choose> is behandeld, dus uiterlijk <xsl:value-of select="einddatum/datum"/>. Neemt u alstublieft contact op indien dat niet gaat lukken.
                    </xsl:if>
    				<xsl:if test="status_key=5 or status_key=6">
    				    Deze melding is op <xsl:value-of select="tracking/track[@code='MLDAFM']/datum/datum"/> om <xsl:value-of select="tracking/track[@code='MLDAFM']/datum/tijd"/> door <xsl:value-of select="tracking/track[@code='MLDAFM']/user/naam_friendly"/> afgemeld.
                    </xsl:if>
    				<xsl:if test="status_key=1">
    				    Deze melding is op <xsl:value-of select="tracking/track[@code='MLDREJ']/datum/datum"/> om <xsl:value-of select="tracking/track[@code='MLDREJ']/datum/tijd"/> door <xsl:value-of select="tracking/track[@code='MLDREJ']/user/naam_friendly"/> afgewezen.
                    </xsl:if>
                    </td></tr>
					<tr height="40px"><td colspan="4"><hr/></td></tr>
					<tr>
						<td align="right">
							<b><xsl:value-of select="//lcl/MLD/stdmelding"/>:</b>
						</td>
						<td align="left">
							<xsl:if test="stdmelding/omschrijving=''">-</xsl:if>
							<xsl:value-of select="stdmelding/omschrijving"/>
						</td>
						<td align="right">
							<b><xsl:value-of select="//lcl/MLD/vakgroep"/>:</b>
						</td>
						<td align="left">
							<xsl:if test="discipline/omschrijving=''">-</xsl:if>
							<xsl:value-of select="discipline/omschrijving"/>
						</td>
					</tr>
					<tr>
						<td align="right">
							<b><xsl:value-of select="//lcl/FAC/locatie"/>:</b>
						</td>
						<td colspan="3"><xsl:value-of select="plaats/regio/district/locatie/omschrijving"/></td>
					</tr>
					<tr>
						<xsl:choose>
							<xsl:when test="plaats/@type='T'">
								<td align="right"><b><xsl:value-of select="//lcl/FAC/terrein"/>:</b></td>
								<td colspan="3"><xsl:value-of select="plaats/regio/district/locatie/terrein/code"/>-<xsl:value-of select="plaats/regio/district/locatie/terrein/naam"/></td>
							</xsl:when>
							<xsl:otherwise>
								<td align="right"><b><xsl:value-of select="//lcl/FAC/gebouw"/>:</b></td>
								<td colspan="3"><xsl:value-of select="plaats/regio/district/locatie/gebouw/code"/>-<xsl:value-of select="plaats/regio/district/locatie/gebouw/naam"/></td>
							</xsl:otherwise>
						</xsl:choose>
					</tr>
					<tr>
						<xsl:if test="plaats/@type='T' or plaats/@type='G'">
							<td colspan="2"/>
						</xsl:if>
						<xsl:if test="plaats/@type!='T' and plaats/@type!='G'">
							<td align="right">
								<b><xsl:value-of select="//lcl/FAC/bouwlaag"/>:</b>
							</td>
							<td  colspan="3">
								<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/code"/>&#xA0;
								<xsl:if test="plaats/regio/district/locatie/gebouw/verdieping/omschrijving!=''">(<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/omschrijving"/>)</xsl:if>
							</td>
						</xsl:if>
					</tr>
					<tr>
						<xsl:if test="plaats/@type='R'">
							<td align="right">
								<b><xsl:value-of select="//lcl/FAC/ruimte"/>:</b>
							</td>
							<td  colspan="3">
								<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/ruimte/nr"/>&#xA0;
								<xsl:if test="plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving!=''">(<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving"/>)</xsl:if>
							</td>
						</xsl:if>

					</tr>
					<tr height="30px">
						<td colspan="4"/>
					</tr>
					<xsl:comment>als we binnen een opdracht zijn, tonen we de meldingtekst niet</xsl:comment>
					<tr>
						<td align="right">
							<b><xsl:value-of select="//lcl/FAC/omschrijving"/>:</b>
						</td>
						<td align="left" colspan="3">
							<xsl:call-template name="linebreaks">
								<xsl:with-param name="string" select="omschrijving"/>
							</xsl:call-template>
						</td>
					</tr>
					<xsl:for-each select="kenmerk[@type!='L' and @type!='Q' and count(@xmlnode)=0]">
						<xsl:sort select="@volgnummer" data-type="number"/>
						<xsl:if test=".!=''">
							<tr>
								<td align="right">
									<b><xsl:value-of select="@naam"/>:</b>
								</td>
								<td colspan="3">
									<xsl:value-of select="."/>
								</td>
							</tr>
						</xsl:if>
					</xsl:for-each>
					<xsl:if test="count(deel)&gt;0">
						<xsl:for-each select="deel">
							<xsl:sort select="omschrijving"/>
							<tr>
								<xsl:choose>
									<xsl:when test="position()=1">
										<td align="right">
											<b><xsl:value-of select="//lcl/MLD/objecten"/>:</b>
										</td>
									</xsl:when>
									<xsl:otherwise>
										<td/>
									</xsl:otherwise>
								</xsl:choose>
								<td align="left">
									<xsl:value-of select="omschrijving"/>
								</td>
								<td colspan="2" valign="top">
									<xsl:comment>NADER TE DEFINIEREN</xsl:comment>
								</td>
							</tr>
						</xsl:for-each>
					</xsl:if>
					<xsl:if test="opmerking!=''">
						<tr>
							<td align="right" valign="top">
								<b><xsl:value-of select="//lcl/MLD/afhandeling"/>:</b>
							</td>
							<td colspan="3">
								<xsl:call-template name="linebreaks">
									<xsl:with-param name="string" select="opmerking"/>
								</xsl:call-template>
							</td>
						</tr>
					</xsl:if>
					<tr height="40px"><td colspan="4"><hr/></td></tr>
				</table>
				</xsl:when>
				<xsl:otherwise>
    <table border="0" width="100%" cellpadding="2">
      <tr>
        <td colspan="2" class="caption" style="padding-top:20px;padding-bottom:20px">
          <b><xsl:value-of select="//lcl/MLD/melding"/>&#160;<xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b>
        </td>
        <td colspan="2" class="caption" style="padding-top:20px;padding-bottom:20px">
          <xsl:if test="spoed&lt;3">
            <b><xsl:value-of select="//lcl/MLD/spoed"/></b>
          </xsl:if>
        </td>
      </tr>
      <tr>
        <td align="right" width="16%">
          <b><xsl:value-of select="//lcl/FAC/aanvrager"/>:</b>
        </td>
        <td align="left" width="34%">
          <xsl:value-of select="voor/naam_full"/>
        </td>
        <td align="right" width="16%">
          <b><xsl:value-of select="//lcl/FAC/telefoon"/>:</b>
        </td>
        <td align="left" width="34%">
          <xsl:if test="voor/telefoonnr=''">-</xsl:if>
          <xsl:value-of select="voor/telefoonnr"/>
        </td>
      </tr>
      <xsl:if test="string(voor/naam_full)!=string(voor/naam_full)">
                          <tr>
                <td align="right" width="16%"><b><xsl:value-of select="//lcl/MLD/meldingvoor"/>:</b></td>
                <td align="left" width="34%"><xsl:value-of select="voor/naam_full"/></td>
              </tr>
            </xsl:if>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/locatie"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/code"/>&#xA0;
          <xsl:if test="voor/werkplek/plaats/regio/district/locatie/omschrijving!=''">(<xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/omschrijving"/>)</xsl:if>
        </td>
        <td align="right" valign="top">
          <b><xsl:value-of select="//lcl/FAC/afdeling"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="voor/afdeling/omschrijving"/>
        </td>
      </tr>
      <tr>
        <td align="right" valign="top">
          <b><xsl:value-of select="//lcl/FAC/werkplek"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/gebouw/code"/>-<xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/gebouw/naam"/><br/>
          <xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/gebouw/verdieping/code"/>.<xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/gebouw/verdieping/ruimte/nr"/>&#xA0;
          <xsl:if test="voor/werkplek/plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving!=''">(<xsl:value-of select="voor/werkplek/plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving"/>)</xsl:if>
        </td>
        <td colspan="2"/>
      </tr>
      <tr height="40px">
        <td colspan="4">
          <hr/>
        </td>
      </tr>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/locatie"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="plaats/regio/district/locatie/code"/>&#xA0;
          <xsl:if test="plaats/regio/district/locatie/omschrijving!=''">(<xsl:value-of select="plaats/regio/district/locatie/omschrijving"/>)</xsl:if>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/status"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="status"/>
        </td>
      </tr>
      <tr>
        <xsl:choose>
          <xsl:when test="plaats/@type='T'">
            <td align="right">
              <b><xsl:value-of select="//lcl/FAC/terrein"/>:</b>
            </td>
            <td align="left">
              <xsl:value-of select="plaats/regio/district/locatie/terrein/code"/>-<xsl:value-of select="plaats/regio/district/locatie/terrein/naam"/></td>
          </xsl:when>
          <xsl:otherwise>
            <td align="right">
              <b><xsl:value-of select="//lcl/FAC/gebouw"/>:</b>
            </td>
            <td align="left">
              <xsl:value-of select="plaats/regio/district/locatie/gebouw/code"/>-<xsl:value-of select="plaats/regio/district/locatie/gebouw/naam"/></td>
          </xsl:otherwise>
        </xsl:choose>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/melddatum"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="gemeld/datum"/>&#xA0;
          <xsl:value-of select="gemeld/tijd"/>
        </td>
      </tr>
      <tr>
        <xsl:if test="plaats/@type='T' or plaats/@type='G'">
          <td colspan="2"/>
        </xsl:if>
        <xsl:if test="plaats/@type!='T' and plaats/@type!='G'">
          <td align="right">
            <b><xsl:value-of select="//lcl/FAC/bouwlaag"/>:</b>
          </td>
          <td align="left">
            <xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/code"/>&#xA0;
            <xsl:if test="plaats/regio/district/locatie/gebouw/verdieping/omschrijving!=''">(<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/omschrijving"/>)</xsl:if>
          </td>
        </xsl:if>
        <xsl:choose>
            <xsl:when test="uitvoertijd[@eenheid='U']">
              <td width="16%" align="right">
                <b><xsl:value-of select="//lcl/MLD/uitvoertijd"/>:</b>
              </td>
              <td width="34%">
                <xsl:value-of select="uitvoertijd"/>&#160;<xsl:value-of select="//lcl/MLD/uren"/>
              </td>
            </xsl:when>
            <xsl:otherwise>
              <td width="16%" align="right">
                <b><xsl:value-of select="//lcl/MLD/uitvoertijd"/>:</b>
              </td>
              <td width="34%">
                <xsl:value-of select="uitvoertijd"/>&#160;<xsl:value-of select="//lcl/FAC/dagen"/>
              </td>
            </xsl:otherwise>
        </xsl:choose>
      </tr>
      <tr>
        <xsl:if test="plaats/@type='R'">
          <td align="right" valign="top">
            <b><xsl:value-of select="//lcl/FAC/ruimte"/>:</b>
          </td>
          <td align="left">
            <xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/ruimte/nr"/>&#xA0;
            <xsl:if test="plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving!=''">(<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/ruimte/omschrijving"/>)</xsl:if>
          </td>
        </xsl:if>
        <xsl:if test="plaats/@type!='R'">
          <td colspan="2"/>
        </xsl:if>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/datum_gereed"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="datum_gepland/datum"/>&#xA0;<xsl:value-of select="datum_gepland/tijd"/>
        </td>
      </tr>
      <xsl:if test="kenmerk[@naam='Ordernr']!=''">
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/ordernr"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="kenmerk[@naam='Ordernr']"/>
        </td>
      </tr>
      </xsl:if>
      <tr height="30px">
        <td colspan="4"/>
      </tr>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/stdmelding"/>:</b>
        </td>
        <td align="left">
          <xsl:if test="stdmelding/omschrijving=''">-</xsl:if>
          <xsl:value-of select="stdmelding/omschrijving"/>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/vakgroep"/>:</b>
        </td>
        <td align="left">
          <xsl:if test="discipline/omschrijving=''">-</xsl:if>
          <xsl:value-of select="discipline/omschrijving"/>
        </td>
      </tr>
      <xsl:comment>als we binnen een opdracht zijn, tonen we de meldingtekst niet</xsl:comment>
      <tr>
        <td align="right" valign="top">
          <b><xsl:value-of select="//lcl/FAC/omschrijving"/>:</b>
        </td>
        <td align="left" colspan="3">
          <xsl:call-template name="linebreaks">
            <xsl:with-param name="string" select="omschrijving"/>
          </xsl:call-template>
        </td>
      </tr>
      <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=".!=''">
          <tr>
            <td align="right">
              <b>
                <xsl:value-of select="@naam"/>:</b>
            </td>
            <td colspan="3">
              <xsl:value-of select="."/>
            </td>
          </tr>
        </xsl:if>
      </xsl:for-each>
      <xsl:if test="count(deel)&gt;0">
        <xsl:for-each select="deel">
          <xsl:sort select="omschrijving"/>
          <tr>
            <xsl:choose>
              <xsl:when test="position()=1">
                <td align="right" valign="top">
                  <b><xsl:value-of select="//lcl/MLD/objecten"/>:</b>
                </td>
              </xsl:when>
              <xsl:otherwise>
                <td/>
              </xsl:otherwise>
            </xsl:choose>
            <td align="left" valign="top">
              <xsl:value-of select="omschrijving"/>
            </td>
            <td colspan="2" valign="top">
              <xsl:comment>NADER TE DEFINIEREN</xsl:comment>
            </td>
          </tr>
        </xsl:for-each>
      </xsl:if>
      <xsl:if test="opmerking!=''">
        <tr>
          <td align="right" valign="top">
            <b><xsl:value-of select="//lcl/MLD/afhandeling"/>:</b>
          </td>
          <td colspan="3">
            <xsl:call-template name="linebreaks">
              <xsl:with-param name="string" select="opmerking"/>
            </xsl:call-template>
          </td>
        </tr>
      </xsl:if>
    </table>
				</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="contract" mode="include">
<xsl:choose>
<!--FACILITOR SaaS=481, Onderhoud=482 of CARE=501-->
<xsl:when test="discipline/key = 481 or discipline/key = 482 or discipline/key = 501">
<!--xsl:when test="1=1"-->
				<table border="0" width="100%">
					<colgroup>
						<col width="15%"/>
						<col width="50%"/>
						<col width="35%"/>
					</colgroup>
					<tr><td colspan="3" height="10px"/></tr>
					<tr>
						<td colspan="2" style="font-size:12pt"><strong>Objecten van dienstverlening<xsl:text> </xsl:text><xsl:value-of select="discipline/omschrijving"/></strong></td>
						<td style="text-align:right"><xsl:value-of select="bedrijf/naam"/>&#xA0;&#xA0;<xsl:if test="contactpersoon"><br/><xsl:value-of select="//lcl/FAC/contactpersoon"/>:<xsl:text> </xsl:text><xsl:value-of select="contactpersoon/naam_full"/>&#xA0;&#xA0;</xsl:if></td>
					</tr>
					<tr><td colspan="3" height="10px"/></tr>
					<!--tr>
						<td colspan="3" class="subcaption"><xsl:value-of select="//lcl/CNT/algemene_gegevens"/></td>
					</tr-->
					<tr>
						<td class="label"><xsl:value-of select="//lcl/CNT/contract"/>:</td>
						<td colspan="2" class="value">C<xsl:value-of select="nummer_intern"/>&#xA0;<xsl:value-of select="omschrijving"/></td>
					</tr>
					<xsl:if test="nummer != ''">
					<tr>
						<td class="label"><xsl:value-of select="//lcl/CNT/extern_nr"/>:</td>
						<td colspan="2" class="value"><xsl:value-of select="nummer"/></td>
					</tr>
					</xsl:if>
					<xsl:if test="kenmerk[@naam='SaaS-variant'] != ''">
						<tr>
							<td class="label">SaaS-variant:</td>
							<td colspan="2" class="value"><xsl:value-of select="kenmerk[@naam='SaaS-variant']"/></td>
						</tr>
					</xsl:if>
					<xsl:if test="kenmerk[@naam='Laatste index-datum'] != '' and kenmerk[@naam='Laatste index-percentage'] != ''">
						<tr>
							<td class="label">Prijspeil/indexatie:</td>
							<td colspan="2" class="value"><xsl:value-of select="kenmerk[@naam='Laatste index-datum']"/></td>
						</tr>
					</xsl:if>
					<tr><td colspan="3" height="10px"/></tr>
				</table>
				<table style="border:none;border-collapse:collapse" width="100%" cellPadding="5px">
					<colgroup>
						<col width="40%"/>
						<col width="18%"/>
						<col width="2%"/>
						<col width="16%"/>
						<col width="24%"/>
					</colgroup>
					<tr>
						<th style="border:1px solid black;text-align:left"><b>Module</b></th>
						<th style="border:1px solid black;text-align:center"><b>Ingangsdatum</b></th>
						<th colspan="2" style="border:1px solid black;text-align:center">
							<xsl:choose>
								<xsl:when test="/facilitor/contract/discipline/key = 482"><b>Onderhoudskosten</b></xsl:when>
								<xsl:otherwise><b>Per maand</b></xsl:otherwise>
							</xsl:choose>
						</th>
					</tr>
					<xsl:variable name="vandaag"><xsl:value-of select="concat(/facilitor/header/dateYear, /facilitor/header/dateMonth, /facilitor/header/dateDay)"/></xsl:variable>
					<!--Modules (datum-velden) gesorteerd op ingangsdatum én ingangsdatum niet in toekomst; nvt. voor CARE!-->
					<!--xsl:for-each select="kenmerk[substring(@naam,3,1) = '.' and @volgnummer mod 10 = 0 and @type = 'D' and . != '' and concat(substring (.,7,4), substring (.,4,2), substring (.,1,2)) &lt;= $vandaag]"-->
					<!--Modules (datum-velden) gesorteerd op ingangsdatum; nvt. voor CARE!-->
					<xsl:for-each select="kenmerk[substring(@naam,3,1) = '.' and @volgnummer mod 10 = 0 and (@type = 'D' or @type='C') and @volgnummer &lt; 700 and . != '']">
						<xsl:sort select="concat(substring (.,7,4), substring (.,4,2), substring (.,1,2))"/>
						<!--xsl:variable name="prijsvolgnr"><xsl:value-of select="@volgnummer + 5"/></xsl:variable-->
						<xsl:variable name="prijsnaam"><xsl:value-of select="concat(substring(@naam, 1, 3),' Prijs')"/></xsl:variable>
						<tr>
							<td style="border-left:1px solid black;text-align:left"><xsl:value-of select="substring(@naam, 4)"/></td>
							<td style="border-left:1px solid black;text-align:center"><xsl:value-of select="."/></td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:choose>
									<xsl:when test="/facilitor/contract/kenmerk[@naam=$prijsnaam] &gt; 0"><xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam=$prijsnaam], '###.##0,00', 'european')"/></xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</td>
							<td/>
						</tr>
					</xsl:for-each>
					<!--Specials (volgnummer > 700) gesorteerd op volgnummer; nvt. voor CARE!-->
					<xsl:for-each select="kenmerk[substring(@naam,3,1) = '.' and @volgnummer mod 10 = 0 and @volgnummer &gt; 700 and . != '']">
						<xsl:sort select="@volgnummer"/>
						<!--xsl:variable name="prijsvolgnr"><xsl:value-of select="@volgnummer + 5"/></xsl:variable-->
						<xsl:variable name="prijsnaam"><xsl:value-of select="concat(substring(@naam, 1, 3),' Prijs')"/></xsl:variable>
						<tr>
							<!--Module(naam) is veld-inhoud!-->
							<td style="border-left:1px solid black;text-align:left"><xsl:value-of select="."/></td>
							<!--Ingangsdatum is onbekend(-)!-->
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:choose>
									<xsl:when test="/facilitor/contract/kenmerk[@naam=$prijsnaam] &gt; 0"><xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam=$prijsnaam], '###.##0,00', 'european')"/></xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</td>
							<td/>
						</tr>
					</xsl:for-each>
					<!--Enige "module"-regel voor CARE; nvt. voor SaaS en Onderhoud!-->
					<xsl:if test="discipline/key = 501 and (/facilitor/contract/kenmerk[@naam='01. CARE users'] != 0 or /facilitor/contract/kenmerk[@naam='01. Prijs'] != 0)">
						<tr>
							<td style="border-left:1px solid black;text-align:left">CARE userpack <xsl:if test="/facilitor/contract/kenmerk[@naam='01. CARE users'] != 0">(<xsl:value-of select="/facilitor/contract/kenmerk[@naam='01. CARE users']"/>)</xsl:if></td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:choose>
									<xsl:when test="/facilitor/contract/kenmerk[@naam='01. Prijs'] != 0"><xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam='01. Prijs'], '###.##0,00', 'european')"/></xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</td>
							<td/>
						</tr>
					</xsl:if>
					<xsl:variable name="prijzen">
						<!--xsl:for-each select="kenmerk[substring(@naam,3,1) = '.' and @volgnummer mod 10 = 0 and @type = 'D' and . != '' and concat(substring (.,7,4), substring (.,4,2), substring (.,1,2)) &lt;= $vandaag]"-->
						<xsl:for-each select="kenmerk[substring(@naam,3,1) = '.' and @volgnummer mod 10 = 0 and . != '']">
						  <xsl:variable name="prijsnaam"><xsl:value-of select="concat(substring(@naam, 1, 3),' Prijs')"/></xsl:variable>
							<xsl:if test="/facilitor/contract/kenmerk[@naam=$prijsnaam] &gt; 0">
								<xsl:copy-of select="/facilitor/contract/kenmerk[@naam=$prijsnaam]"/>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>
					<xsl:variable name="modules">
						<xsl:choose>
							<xsl:when test="$prijzen != ''"><xsl:value-of select="sum(msxml:node-set($prijzen)/kenmerk)"/></xsl:when>
							<xsl:otherwise>0</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:variable name="keypack">
						<xsl:choose>
							<xsl:when test="/facilitor/contract/kenmerk[@naam='Key prijs'] != ''"><xsl:value-of select="/facilitor/contract/kenmerk[@naam='Key prijs']"/></xsl:when>
							<xsl:otherwise>0</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:variable name="fepack">
						<xsl:choose>
							<xsl:when test="/facilitor/contract/kenmerk[@naam='Frontend prijs'] != ''"><xsl:value-of select="/facilitor/contract/kenmerk[@naam='Frontend prijs']"/></xsl:when>
							<xsl:otherwise>0</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:variable name="hosting">
						<xsl:choose>
							<xsl:when test="/facilitor/contract/kenmerk[@naam='Hosting'] != ''"><xsl:value-of select="/facilitor/contract/kenmerk[@naam='Hosting']"/></xsl:when>
							<xsl:otherwise>0</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:variable name="korting_w">
						<xsl:choose>
							<xsl:when test="/facilitor/contract/kenmerk[@naam='Korting'] != ''"><xsl:value-of select="/facilitor/contract/kenmerk[@naam='Korting']"/></xsl:when>
							<xsl:otherwise>0</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:variable name="korting_p">
						<xsl:choose>
							<xsl:when test="/facilitor/contract/korting != ''"><xsl:value-of select="/facilitor/contract/korting div 100"/></xsl:when>
							<xsl:otherwise>1</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>
					<xsl:if test="/facilitor/contract/kenmerk[@naam='Key users'] != 0 or $keypack != 0">
						<tr>
							<td style="border-left:1px solid black;text-align:left">Key userpack <xsl:if test="/facilitor/contract/kenmerk[@naam='Key users']!=0">(<xsl:value-of select="/facilitor/contract/kenmerk[@naam='Key users']"/>)</xsl:if></td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:choose>
									<xsl:when test="$keypack != 0"><xsl:value-of select="format-number($keypack, '###.##0,00', 'european')"/></xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</td>
							<td/>
						</tr>
					</xsl:if>
					<xsl:if test="/facilitor/contract/kenmerk[@naam='Frontend users'] != 0 or $fepack != 0">
						<tr>
							<td style="border-left:1px solid black;text-align:left">Frontend userpack <xsl:if test="/facilitor/contract/kenmerk[@naam='Frontend users'] != 0">(<xsl:value-of select="/facilitor/contract/kenmerk[@naam='Frontend users']"/>)</xsl:if></td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:choose>
									<xsl:when test="$fepack != 0"><xsl:value-of select="format-number($fepack, '###.##0,00', 'european')"/></xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</td>
							<td/>
						</tr>
					</xsl:if>
					<xsl:if test="$hosting &gt; 0">
						<tr>
							<td style="border-left:1px solid black;text-align:left">Hosting</td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:value-of select="format-number($hosting, '###.##0,00', 'european')"/>
							</td>
							<td/>
						</tr>
					</xsl:if>
					<xsl:if test="$korting_w &lt; 0">
						<tr>
							<td style="border-left:1px solid black;text-align:left">Korting</td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left">€</td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:value-of select="format-number($korting_w, '###.##0,00', 'european')"/>
							</td>
							<td/>
						</tr>
					</xsl:if>
					<xsl:if test="$korting_p != 1">
						<tr>
							<td style="border-left:1px solid black;text-align:left">Contractkorting</td>
							<td style="border-left:1px solid black;text-align:center">-</td>
							<td style="border-left:1px solid black;text-align:left"></td>
							<td style="border-right:1px solid black;text-align:right">
								<xsl:value-of select="format-number($korting_p * 100, '###.##0,0', 'european')"/>%
							</td>
							<td/>
						</tr>
					</xsl:if>
					<tr>
						<td style="border:1px solid black;text-align:left"/>
						<td style="border:1px solid black;text-align:center"/>
						<td style="border-left:1px solid black;border-top:1px solid black;border-bottom:1px solid black;text-align:left"><b>€</b></td>
						<td style="border-right:1px solid black;border-top:1px solid black;border-bottom:1px solid black;text-align:right">
							<b><xsl:value-of select="format-number(($modules + $keypack + $fepack + $hosting + $korting_w) * $korting_p, '###.##0,00', 'european')"/></b>
						</td>
						<td/>
					</tr>
				</table>
				<table border="0" width="100%">
					<colgroup>
						<col width="15%"/>
						<col width="50%"/>
						<col width="35%"/>
					</colgroup>
					<tr><td colspan="3" height="10px"/></tr>
					<xsl:if test="/facilitor/contract/kenmerk[@naam='Tarief Consultant'] != ''">
						<tr>
							<td class="label">Tarief Consultant:</td>
							<td colspan="2" class="value">€&#xA0;<xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam='Tarief Consultant'], '###.##0,00', 'european')"/></td>
						</tr>
					</xsl:if>
					<xsl:if test="/facilitor/contract/kenmerk[@naam='Tarief Specialist'] != ''">
						<tr>
							<td class="label">Tarief Specialist:</td>
							<td colspan="2" class="value">€&#xA0;<xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam='Tarief Specialist'], '###.##0,00', 'european')"/></td>
						</tr>
					</xsl:if>
					<xsl:if test="/facilitor/contract/kenmerk[@naam='Reiskosten'] != ''">
						<tr>
							<td class="label">Reiskosten (per km):</td>
							<td colspan="2" class="value">€&#xA0;<xsl:value-of select="format-number(/facilitor/contract/kenmerk[@naam='Reiskosten'], '###.##0,00', 'european')"/></td>
						</tr>
					</xsl:if>
					<tr><td colspan="3" height="10px"/></tr>
					<tr>
						<td colspan="3">Alle genoemde bedragen zijn exclusief BTW.</td>
					</tr>
				</table>
</xsl:when>
<xsl:otherwise>
		<table border="0" cellpadding="1">
			<tr>
				<td colspan="4" class="caption">
					<strong>
						<xsl:value-of select="//lcl/CNT/contract"/>
						<xsl:value-of select="nummer_intern"/>
						<xsl:if test="versie!=''">.<xsl:value-of select="versie"/></xsl:if>
					</strong>&#xA0;
					<xsl:value-of select="eigenaar_afd/omschrijving"/>/<xsl:value-of select="bedrijf/naam"/></td>
			</tr>
			<xsl:call-template name="cnt_begintext"/>
			<tr>
				<td class="subcaption" colspan="2" width="50%">
					<xsl:value-of select="//lcl/CNT/algemene_gegevens"/>
				</td>
				<td class="subcaption" colspan="2" width="50%">
					<xsl:value-of select="//lcl/CNT/data"/>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<table border="0" id="administratief" width="100%">
						<tr>
							<td class="label" width="30%">
								<xsl:value-of select="//lcl/CNT/contractsoort"/>:</td>
							<td class="value">
								<xsl:value-of select="discipline/omschrijving"/>
							</td>
						</tr>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/beschrijving"/>:</td>
							<td class="value">
								<xsl:value-of select="omschrijving"/>
							</td>
						</tr>
						<xsl:if test="nummer!=''">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/CNT/extern_nr"/>:</td>
								<td class="value">
									<xsl:value-of select="nummer"/>
								</td>
							</tr>
						</xsl:if>
						<xsl:if test="contract">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/CNT/mantel"/>:</td>
								<td class="value">
									<xsl:value-of select="contract/nummer_intern"/>
								</td>
							</tr>
						</xsl:if>
						<xsl:if test="document!=''">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/FAC/omschrijving"/>:</td>
								<td class="value">
									<xsl:value-of select="document"/>
								</td>
							</tr>
						</xsl:if>
					</table>
				</td>
				<td colspan="2">
					<table border="0" width="100%" id="datums">
						<tr>
							<td class="label" width="30%">
								<xsl:value-of select="//lcl/CNT/ingangsdatum"/>:</td>
							<td class="value">
								<xsl:value-of select="looptijd_van/datum"/>
							</td>
						</tr>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/rappeldatum"/>:</td>
							<td class="value">
								<xsl:value-of select="rappeldatum/datum"/>
							</td>
						</tr>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/opzegdatum"/>:</td>
							<td class="value">
								<xsl:value-of select="opzegdatum/datum"/>
							</td>
						</tr>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/einddatum"/>:</td>
							<td class="value">
								<xsl:value-of select="looptijd_tot/datum"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td class="subcaption" colspan="2">
					<xsl:value-of select="//lcl/CNT/eigenaar"/>
				</td>
				<td class="subcaption" colspan="2">
					<xsl:value-of select="//lcl/CNT/contractpartij"/>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<table border="0" id="eigenaar" width="100%">
						<tr>
							<td class="label" width="30%">
								<xsl:value-of select="//lcl/CNT/eigenaar"/>:</td>
							<td class="value">
								<xsl:value-of select="eigenaar_afd/omschrijving"/>
							</td>
						</tr>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/beheerder"/>:</td>
							<td class="value">
								<xsl:value-of select="beheerder/naam_full"/>
							</td>
						</tr>
						<xsl:if test="kostenplaats">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/FAC/kostenplaats"/>:</td>
								<td class="value">
									<xsl:value-of select="kostenplaats/nr"/>&#xA0;
									<xsl:value-of select="kostenplaats/omschrijving"/>
								</td>
							</tr>
						</xsl:if>
					</table>
				</td>
				<td colspan="2">
					<table border="0" id="contractant" width="100%">
						<tr>
							<td class="label" width="30%">
								<xsl:value-of select="//lcl/CNT/uitvoerder"/>:</td>
							<td class="value">
								<xsl:value-of select="bedrijf/naam"/>
								<xsl:if test="bedrijf/bezoek_plaats!=''">&#xA0;
    					-&#xA0;<xsl:value-of select="bedrijf/bezoek_plaats"/></xsl:if>
								<xsl:if test="bedrijf/leverancier_nr!=''">&#xA0;
    					(<xsl:value-of select="bedrijf/leverancier_nr"/>)</xsl:if>
							</td>
						</tr>
						<tr>
							<td/>
							<td class="value">
								<xsl:value-of select="bedrijf/post_adres"/>
							</td>
						</tr>
						<tr>
							<td/>
							<td class="value">
								<xsl:value-of select="bedrijf/post_postcode"/>&#xA0;
								<xsl:value-of select="bedrijf/post_plaats"/>
							</td>
						</tr>
						<xsl:if test="contactpersoon">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/FAC/contactpersoon"/>:</td>
								<td class="value">
									<xsl:value-of select="contactpersoon/naam_full"/>
								</td>
							</tr>
						</xsl:if>
						<xsl:if test="contactpersoon/telefoon1!=''">
							<tr>
								<td class="label">
									<xsl:value-of select="//lcl/FAC/telefoon"/>:</td>
								<td class="value">
									<xsl:value-of select="contactpersoon/telefoon1"/>
								</td>
							</tr>
						</xsl:if>
					</table>
				</td>
			</tr>
			<tr>
				<td class="subcaption" colspan="2">
					<xsl:value-of select="//lcl/FAC/opmerkingen"/>
				</td>
				<td class="subcaption" colspan="2">
					<xsl:value-of select="//lcl/CNT/financieel"/>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<xsl:value-of select="opmerking"/>
				</td>
				<td colspan="2">
					<table border="0" id="financieel" width="100%">
						<xsl:if test="termijnkosten!=''">
							<tr>
								<td class="label" width="30%">
									<xsl:value-of select="//lcl/CNT/termijnbedrag"/>:</td>
								<td class="value">
									<xsl:value-of select="termijnkosten"/>
								</td>
							</tr>
						</xsl:if>
						<tr>
							<td class="label">
								<xsl:value-of select="//lcl/CNT/contractbedrag"/>:</td>
							<td class="value">
								<xsl:value-of select="kosten"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td class="subcaption" colspan="4">
					<xsl:value-of select="//lcl/FAC/details"/>
				</td>
			</tr>
			<tr>
				<td colspan="4">
					<table>
						<xsl:for-each select="kenmerk[count(@xmlnode)=0]">
							<xsl:sort select="@volgnummer" data-type="number"/>
							<xsl:if test=".!=''">
								<tr>
									<td class="label">
										<xsl:value-of select="@naam"/>:</td>
									<td class="value">
										<xsl:value-of select="."/>
									</td>
								</tr>
							</xsl:if>
						</xsl:for-each>
					</table>
				</td>
			</tr>
			<tr>
				<td class="subcaption" colspan="4">
					<xsl:value-of select="//lcl/CNT/scope"/>
				</td>
			</tr>
			<tr>
				<td colspan="4">
					<xsl:if test="contract_plaats/plaats">
						<table cellspacing="1" width="100%">
							<tr>
								<td>
									<strong>
										<xsl:value-of select="//lcl/FAC/locatie"/>
									</strong>
								</td>
								<td>
									<strong>
										<xsl:value-of select="//lcl/FAC/adres"/>
									</strong>
								</td>
								<td>
									<strong>
										<xsl:value-of select="//lcl/FAC/plaats"/>
									</strong>
								</td>
								<td style="text-align:right">
									<strong>
										<xsl:value-of select="//lcl/CNT/bedrag"/>
									</strong>
								</td>
							</tr>
							<xsl:for-each select="contract_plaats/plaats">
								<xsl:sort select="regio/district/locatie/omschrijving"/>
								<tr>
									<td>
										<xsl:value-of select="regio/district/locatie/omschrijving"/>&#xA0;<xsl:value-of select="regio/district/locatie/gebouw/omschrijving"/></td>
									<td>
										<xsl:value-of select="regio/district/locatie/adres"/>
									</td>
									<td>
										<xsl:value-of select="regio/district/locatie/plaats"/>
									</td>
									<td style="text-align:right">
										<xsl:call-template name="europrijs">
											<xsl:with-param name="prijs" select="../kosten"/>
										</xsl:call-template>
									</td>
								</tr>
							</xsl:for-each>
						</table>
					</xsl:if>
					<xsl:if test="contract_object/srtdeel">
						<table cellspacing="1">
							<tr>
								<td>
									<strong>
										<xsl:value-of select="//lcl/CNT/betreft"/>:</strong>
								</td>
							</tr>
							<xsl:for-each select="contract_object/srtdeel">
								<xsl:sort select="omschrijving"/>
								<tr>
									<td>
										<xsl:value-of select="omschrijving"/>
									</td>
								</tr>
							</xsl:for-each>
						</table>
					</xsl:if>
					<xsl:if test="contract_object/deel">
						<table cellspacing="1">
							<tr>
								<td>
									<strong>
										<xsl:value-of select="//lcl/CNT/objecten"/>:</strong>
								</td>
							</tr>
							<xsl:for-each select="contract_object/deel">
								<xsl:sort select="omschrijving"/>
								<tr>
									<td>
										<xsl:value-of select="omschrijving"/>
									</td>
								</tr>
							</xsl:for-each>
						</table>
					</xsl:if>
					<!-- moet nog voor terreinen -->
					<xsl:if test="contract_onrgoed">
						<table cellspacing="1">
							<tr>
								<td>
									<strong>
										<xsl:value-of select="//lcl/CNT/gehuurd"/>:</strong>
								</td>
							</tr>
							<xsl:for-each select="contract_onrgoed">
								<xsl:sort select="ruimte/srtruimte/omschrijving"/>
								<tr>
									<td>
										<xsl:value-of select="ruimte/srtruimte/omschrijving"/>
									</td>
									<td>
										<xsl:value-of select="ruimte/nr"/>
									</td>
									<td>
										<xsl:value-of select="ruimte/omschrijving"/>
									</td>
									<td>
										<xsl:value-of select="ruimte/prijs"/>
									</td>
								</tr>
							</xsl:for-each>
						</table>
					</xsl:if>
				</td>
			</tr>
			<xsl:call-template name="cnt_endtext"/>
		</table>
</xsl:otherwise>
</xsl:choose>
	</xsl:template>

	<xsl:template match="contract" mode="full">
		<xsl:choose>
			<xsl:when test="$mode='summary'"></xsl:when>
			<xsl:otherwise>
				<html>
					<xsl:comment>================================ CONTRACT ==============================</xsl:comment>
					<xsl:comment>FACILITOR default XSL template for contract</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:with-param name="bedrijf" select="beheerder/descendant::*/bedrijf/naam"/>
                        </xsl:call-template> 
						<xsl:apply-templates select="." mode="include"/>
						<xsl:call-template name="pagefooter"/>
					</xsl:element>
				</html>
			</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:with-param name="bedrijf" select="rsv_ruimte/contact_user/descendant::*/bedrijf/naam"/>
            </xsl:call-template>    
            <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:stylesheet><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. -->