<?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 match="rapport">
		<xsl:if test="@view='bofo_v_info_verkoopkamer'">
			<xsl:variable name="bezoek">
				<xsl:for-each select="rapport_data/data_row">
					<xsl:if test="position()=1">
						<xsl:if test="BEZOEKERS != 'geen'">ja</xsl:if>
						<xsl:if test="BEZOEKERS = 'geen'">nee</xsl:if>
					</xsl:if>
				</xsl:for-each>
			</xsl:variable>

			<xsl:variable name="ruimte">
				<xsl:for-each select="rapport_data/data_row">
					<xsl:if test="position()=1">
						<xsl:value-of select="RES_RUIMTE_NR"/>
					</xsl:if>
				</xsl:for-each>
			</xsl:variable>
			<html>
				<head>
					<style>th {
      border: 1px solid #808080;
    }
    td.welkom {
      padding:  3px;
      font-family: Verdana;
      font-size: 60pt;
      color: #666666;
      text-align:center;
    }
    td.naam {
      font-family: Verdana;
      padding:  3px;
      font-size: 40pt;
      text-align:center;
    }
    td.sub {
      font-family: Verdana;
      padding:  3px;
      font-size: 10pt;
      text-align:center;
      height: 10px;
    }
    body {
      margin: 0;
      overflow: hidden;
    }</style>
   
				    </head>
				<body onLoad="parent.Activate();parent.document.body.style.overflow='hidden';">
					<table height="100%" width="100%" cellpadding="0" cellspacing="0">
						<xsl:if test="$bezoek='ja'">

							<xsl:for-each select="rapport_data/data_row">
								<xsl:if test="position()=1">
									<tr height="20">
										<td>
											<img src="../../cust/bofo/infobord/bdp_welkom.png"/>
										</td>
									</tr>
									<tr>
										<td height="80"></td>
									</tr>
								</xsl:if>
								<tr>
									<td colspan="2" class="naam">
										<xsl:value-of select="BEZOEKERS"/>
									</td>
								</tr>
							</xsl:for-each>
							<tr>
								<td height="50%" colspan="2"></td>
							</tr>
							<tr height="100">
								<td style="padding-left:0">
									<img src="../../cust/bofo/infobord/BPD_logo1.jpg"/>
								</td>
							</tr>
							<tr>
								<td height="00" colspan="2"></td>
							</tr>

						</xsl:if>
						<xsl:if test="$bezoek='nee'">


							<tr>
								<td>
									<xsl:element name="embed">

										<xsl:choose>
											<xsl:when test="contains($ruimte, '[1.114]')">
												<xsl:attribute name="src">../../cust/bofo/infobord/Slides-verkoopscherm-Da-Gama.swf</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.115]')">
												<xsl:attribute name="src">../../cust/bofo/infobord/Slides-verkoopscherm-Marco-Polo.swf</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.116]')">
												<xsl:attribute name="src">../../cust/bofo/infobord/Slides-verkoopscherm-Da-Vinci.swf</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.103]')">
												<xsl:attribute name="src">../../cust/bofo/infobord/Slides-verkoopscherm-Tasman.swf</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.102]')">
												<xsl:attribute name="src">../../cust/bofo/infobord/Slides-verkoopscherm-Huygen.swf</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.104]')">
												<xsl:attribute name="src">
													<xsl:text disable-output-escaping="yes">https://www.youtube.com/v/1afhVoUiTPU&amp;loop=1&amp;hl=en&amp;fs=1&amp;autoplay=1&amp;fmt=32&amp;hd=1</xsl:text>
												</xsl:attribute>
											</xsl:when>
											<xsl:when test="contains($ruimte, '[1.117]')">
												<xsl:attribute name="src">
													<xsl:text disable-output-escaping="yes">https://www.youtube.com/v/9gqJFCZWscg&amp;loop=1&amp;hl=en&amp;fs=1&amp;autoplay=1&amp;fmt=32&amp;hd=1</xsl:text>
												</xsl:attribute>
											</xsl:when>
										</xsl:choose>
										<xsl:attribute name="quality">high</xsl:attribute>
										<xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
										<xsl:attribute name="width">100%</xsl:attribute>
										<xsl:attribute name="height">100%</xsl:attribute>
										<xsl:attribute name="name">presentation</xsl:attribute>
										<xsl:attribute name="align">middle</xsl:attribute>
										<xsl:attribute name="allowScriptAccess">sameDomain</xsl:attribute>
										<xsl:attribute name="type">application/x-shockwave-flash</xsl:attribute>
										<xsl:attribute name="pluginspage">https://www.adobe.com/go/getflashplayer</xsl:attribute>
										<xsl:attribute name="allowFullScreen">true</xsl:attribute>
									</xsl:element>
								</td>
							</tr>

						</xsl:if>
					</table>
				</body>
			</html>
		</xsl:if>

		<xsl:if test="@view='bofo_v_rap_ziekmelding'">
			<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="DATUM_ZIEKMELDING"/>
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>

				<xsl:for-each select="msxml:node-set($sorted)/data_row">
					<xsl:if test="position() = 1">
						<thead>
							<tr>
								<th style="text-align:left">Naam</th>
								<th style="text-align:left">Datum ziekmelding</th>
								<th style="text-align:left">Omschrijving</th>
								<th style="text-align:left">Opmerking</th>
								<th style="text-align:left">Betermelding</th>
							</tr>
						</thead>
					</xsl:if>
				</xsl:for-each>

				<tbody>
					<xsl:for-each select="msxml:node-set($sorted)/data_row">
						<xsl:element name="tr">
							<xsl:if test="DATUM_BETERMELDING">
								<xsl:attribute name="style">background-color: #dddddd</xsl:attribute>
							</xsl:if>
							<td style="text-align:left">
								<xsl:value-of select="NAAM"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="DATUM_ZIEKMELDING"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:call-template name="linebreaks">
									<xsl:with-param name="string" select="OMSCHRIJVING"/>
								</xsl:call-template>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:call-template name="linebreaks">
									<xsl:with-param name="string" select="OPMERKING"/>
								</xsl:call-template>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<xsl:if test="DATUM_BETERMELDING">
								<td style="text-align:left">
									<xsl:value-of select="DATUM_BETERMELDING"/>
									<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
								</td>
							</xsl:if>
							<xsl:if test="not(DATUM_BETERMELDING)">
								<xsl:element name="td">
									<xsl:attribute name="colspan">2</xsl:attribute>
									<xsl:attribute name="title">link voor beter melden van <xsl:value-of select="NAAM"/></xsl:attribute>
									<xsl:attribute name="style">{ cursor: hand; border:none; text-align:left; }</xsl:attribute>
        							<xsl:attribute name="onclick">$.post('../../cust/bofo/mld_statusupdate.asp?melding_key=<xsl:value-of select="NUMMER"/>', {}, FcltCallbackRefresh, "json");</xsl:attribute>
									<u>Beter melden</u>
								</xsl:element>
							</xsl:if>
						</xsl:element>
					</xsl:for-each>
				</tbody>
			</table>
		</xsl:if>


		<xsl:if test="@view='bofo_v_rap_verlof_goedkeuring'">

			<script>
				<xsl:text disable-output-escaping="yes">
				function run_afwijzen (p_mld_key) {
					l_id = 'reden_' + p_mld_key;
					l_obj = document.getElementById (l_id);
					$.post('../../cust/bofo/mld_statusupdate.asp?melding_key=' + p_mld_key + '&amp;mld_status=1&amp;mld_info=' + l_obj.value, {}, FcltCallbackRefresh, "json");
				}
				</xsl:text>
			</script>

			<table width="100%" class="rstable" cellpadding="0" cellspacing="0">
				<colgroup>
					<col width="5%"/>
					<col width="10%"/>
					<col width="10%"/>
					<col width="10%"/>
					<col width="5%"/>
					<col width="5%"/>
					<col width="5%"/>
					<col width="20%"/>
					<col width="30%"/>
				</colgroup>

				<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="NAAM"/>
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>

				<xsl:for-each select="msxml:node-set($sorted)/data_row">
					<xsl:if test="position() = 1">
						<thead>
							<tr>
								<th style="text-align:left">Nummer</th>
								<th style="text-align:left">Naam</th>
								<th style="text-align:left">Van</th>
								<th style="text-align:left">Tot en met</th>
								<th style="text-align:left">Vakantie</th>
								<th style="text-align:left">ATV</th>
								<th style="text-align:left">Bijz.</th>
								<th style="text-align:left">Omschrijving</th>
								<th style="text-align:center">Accepteren / Afwijzen / Details</th>
							</tr>
						</thead>
					</xsl:if>
				</xsl:for-each>

				<tbody>
					<xsl:for-each select="msxml:node-set($sorted)/data_row">
						<tr>
							<td style="text-align:left">
								<xsl:value-of select="MLD_MELDING_KEY"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="NAAM"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="VAN"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="TOT"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="VAK"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="ATV"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:value-of select="BIJZ"/>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<xsl:call-template name="linebreaks">
									<xsl:with-param name="string" select="OMSCHRIJVING"/>
								</xsl:call-template>
								<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
							</td>
							<td style="text-align:left">
								<table width="100%" cellpadding="0" cellspacing="0">
									<tr>
										<xsl:element name="td">
											<xsl:attribute name="colspan">2</xsl:attribute>
											<xsl:attribute name="title">link voor accepteren verlof aanvraag</xsl:attribute>
											<xsl:attribute name="style">{ cursor: hand; border:none; text-align:right; }</xsl:attribute>
               							    <xsl:attribute name="onclick">$.post('../../cust/bofo/mld_statusupdate.asp?melding_key=<xsl:value-of select="MLD_MELDING_KEY"/>&amp;mld_status=5', {}, FcltCallbackRefresh, "json");</xsl:attribute>
											<u>Accepteren</u>
										</xsl:element>
									</tr>
									<tr>
										<xsl:element name="td">
											<xsl:attribute name="style">{ border:none; }</xsl:attribute>
											<xsl:element name="input">
												<xsl:attribute name="id">reden_<xsl:value-of select="MLD_MELDING_KEY"/></xsl:attribute>
												<xsl:attribute name="type">text</xsl:attribute>
												<xsl:attribute name="size">40</xsl:attribute>
												<xsl:attribute name="maxlength">100</xsl:attribute>
											</xsl:element>
										</xsl:element>
										<xsl:element name="td">
											<xsl:attribute name="title">link voor afwijzen verlofaanvraag</xsl:attribute>
											<xsl:attribute name="style">{ cursor: hand; border:none; text-align:right; }</xsl:attribute>
											<xsl:attribute name="onclick">run_afwijzen (<xsl:value-of select="MLD_MELDING_KEY"/>)</xsl:attribute>
											<u>Afwijzen</u>
										</xsl:element>
									</tr>
								</table>
							</td>
						</tr>
					</xsl:for-each>
				</tbody>
			</table>
		</xsl:if>


		<xsl:if test="@view='bofo_v_rap_verlof_totaal' or @view='bofo_v_rap_verlof_tot_afg_jaar'">
			<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_NAAM"/>
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>

				<xsl:for-each select="msxml:node-set($sorted)/data_row">
					<xsl:if test="position() = 1">
						<thead style="border-color:ffffff">
							<tr>
								<th rowspan="2" style="text-align:left">Naam</th>
								<th colspan="2" style="text-align:center">Beginstand</th>
								<th colspan="2" style="text-align:center">Aangevraagd</th>
								<th colspan="2" style="text-align:center">Goedgekeurd</th>
								<th colspan="2" style="text-align:center">Saldo</th>
							</tr>
							<tr>
								<th style="text-align:center">Vakantie</th>
								<th style="text-align:center">ATV</th>
								<th style="text-align:center">Vakantie</th>
								<th style="text-align:center">ATV</th>
								<th style="text-align:center">Vakantie</th>
								<th style="text-align:center">ATV</th>
								<th style="text-align:center">Vakantie</th>
								<th style="text-align:center">ATV</th>
							</tr>
						</thead>
					</xsl:if>

					<xsl:element name="tr">
						<td style="text-align:left">
							<xsl:value-of select="FCLT_F_NAAM"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="BEGIN_V"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="BEGIN_A"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="AANGEVR_V"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="AANGEVR_A"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="GOEDGEK_V"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="GOEDGEK_A"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="SALDO_V"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="SALDO_A"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
					</xsl:element>
				</xsl:for-each>
			</table>
		</xsl:if>


		<xsl:if test="@view='bofo_v_rap_verlof_detail' or @view='bofo_v_rap_verlof_medew'">
			<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_NAAM"/>
						<xsl:sort select="HIDE_F_OFFSET" data-type="number" order="descending"/>
						<xsl:copy-of select="."/>
					</xsl:for-each>
				</xsl:variable>

				<xsl:for-each select="msxml:node-set($sorted)/data_row">

					<xsl:variable name="prev_naam">
						<xsl:choose>
							<xsl:when test="position()=1">Quqelequ</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="preceding-sibling::data_row[1]/FCLT_F_NAAM"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:variable>

					<xsl:if test="FCLT_F_NAAM != $prev_naam and position() != 1">
						<tr>
							<td colspan="12" style="background-color:#ffffff;">&#xA0;</td>
						</tr>
					</xsl:if>

					<xsl:if test="position() = 1 or FCLT_F_NAAM != $prev_naam">
						<thead>
							<tr>
								<th style="text-align:left">Naam</th>
								<th style="text-align:left">Status</th>
								<th style="text-align:center">Van</th>
								<th style="text-align:center">Tot en met</th>
								<th style="text-align:center">Vakantie</th>
								<th style="text-align:center">ATV</th>
								<th style="text-align:center">Bijz. verlof</th>
							</tr>
						</thead>
					</xsl:if>



					<xsl:element name="tr">
						<td style="text-align:left">
							<xsl:value-of select="FCLT_F_NAAM"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:left">
							<xsl:value-of select="STATUS"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="VAN"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="TOT"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="VAK"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="ATV"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
						<td style="text-align:right">
							<xsl:value-of select="BIJZ"/>
							<xsl:if test="$mode != 'excel'">&#xA0;</xsl:if>
						</td>
					</xsl:element>
				</xsl:for-each>
			</table>
		</xsl:if>

		<xsl:if test="@view='bofo.rap_verlof_overzicht'">

<script language="javascript">
function hide_dep(afd) {
  var table = document.getElementById("result");
  var rows = table.getElementsByTagName("tr");
  for(i = 0; i &lt; rows.length; i++){
    //hide rows
    if (rows[i].id == afd) {
      rows[i].style.display= "none";
    }
  }
}</script>

			<table class="rstable" id="result" 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="NAAM"/>
						<xsl:if test="AFD">
  						<xsl:copy-of select="."/>
  				  </xsl:if>
					</xsl:for-each>
				</xsl:variable>

				<xsl:for-each select="msxml:node-set($sorted)/data_row">
					<xsl:if test="position() = 1">
						<thead>
							<tr>
								<xsl:for-each select="*">
									<xsl:choose>
										<xsl:when test="name()='NAAM'">
											<th>Naam</th>
										</xsl:when>
										<xsl:when test="name()='AFD'">
											<th>Afdeling</th>
										</xsl:when>
										<xsl:when test="substring(node(),1,1)=1">
											<th colspan="7">
												<xsl:value-of select="substring(name(),4,2)"/>/<xsl:value-of select="substring(name(),2,2)"/></th>
										</xsl:when>
										<xsl:when test="position() = 3">
											<xsl:element name="th">
												<xsl:attribute name="colspan">
													<xsl:value-of select="8-substring(node(),1,1)"/>
												</xsl:attribute>
											</xsl:element>
										</xsl:when>
									</xsl:choose>
								</xsl:for-each>
							</tr>
						</thead>
					</xsl:if>
					</xsl:for-each>
					<tbody>
					<xsl:for-each select="msxml:node-set($sorted)/data_row">
					<xsl:element name="tr">
					  <xsl:attribute name="id"><xsl:value-of select="AFD"/></xsl:attribute>
						<xsl:for-each select="*">
							<xsl:element name="td">
								<xsl:choose>
									<xsl:when test="name()='NAAM'">
										<xsl:value-of select="node()"/>
									</xsl:when>
									<xsl:when test="name()='AFD'">
   									<xsl:attribute name="style">{ cursor: hand;}</xsl:attribute>
									  <xsl:attribute name="onclick">hide_dep (&apos;<xsl:value-of select="node()"/>&apos;)</xsl:attribute>
										<xsl:value-of select="node()"/>
									</xsl:when>
									<xsl:when test="substring(node(),1,1)=1 or substring(node(),1,1)=7">
										<xsl:attribute name="BGCOLOR">#888888</xsl:attribute>
									</xsl:when>
									<xsl:when test="substring(node(),3)='goedgekeurd'">
										<xsl:attribute name="BGCOLOR">#ff0000</xsl:attribute>
									</xsl:when>
									<xsl:when test="substring(node(),3)='aangevraagd'">
										<xsl:attribute name="BGCOLOR">#ffff00</xsl:attribute>
									</xsl:when>
								</xsl:choose>
							</xsl:element>
						</xsl:for-each>
					</xsl:element>

				</xsl:for-each>
				</tbody>
			</table>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. -->