<?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:import href="../../aaxx/xsl/default.xsl"/>
	<xsl:variable name="Rev">
		<!-- Revision van deze cust.xsl -->
		<xsl:value-of select="substring(translate('$Revision$', '$ ', ''), 10)"/>
	</xsl:variable>

	<xsl:variable name="xsrtnotificatiecode">CUST03</xsl:variable>

	<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz</xsl:variable>
	<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>

	<xsl:template name="pageheader">
		<table border="0" width="100%">
			<tr>
				<td width="34%" bordercolor="#FFFFFF" align="center">
					<xsl:choose>
						<xsl:when test="$mode='email'">
							<img src="cid:tmpl_logo.gif"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:element name="img">
								<xsl:attribute name="src">../../cust/<xsl:value-of select="//header/custId"/>/tmpl_logo.gif</xsl:attribute>
							</xsl:element>
						</xsl:otherwise>
					</xsl:choose>
				</td>
				<td width="33%"></td>
				<td width="33%"></td>
			</tr>
		</table>
	</xsl:template>

  <xsl:template name="pagefooter">
  </xsl:template>
  
  <xsl:template match="melding" mode="include">
    <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>1
          </td>
          <td colspan="3">
            <xsl:call-template name="linebreaks">
              <xsl:with-param name="string" select="opmerking"/>
            </xsl:call-template>
          </td>
        </tr>
      </xsl:if>
      <xsl:if test="melding/key != '' and melding/opmerking != ''">
           <tr>
               <td>
                   <font color='#4F1E4C' size="2"><b>Afhandeling melding <xsl:value-of select="melding/key"/>:</b></font> 
               </td>   
               <td colspan="3"><font color='#4F1E4C' size="2">
                   <xsl:call-template name="linebreaks">
                       <xsl:with-param name="string" select="melding/opmerking"/>
                   </xsl:call-template>
               </font></td>                        
          </tr>
      </xsl:if>
    </table>
  </xsl:template>  

	<xsl:template name="string-replace-all">
		<xsl:param name="text"/>
		<xsl:param name="replace"/>
		<xsl:param name="by"/>
		<xsl:choose>
			<xsl:when test="contains($text, $replace)">
				<xsl:value-of select="substring-before($text,$replace)"/>
				<xsl:value-of select="$by"/>
				<xsl:call-template name="string-replace-all">
					<xsl:with-param name="text" select="substring-after($text,$replace)"/>
					<xsl:with-param name="replace" select="$replace"/>
					<xsl:with-param name="by" select="$by"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$text"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<xsl:template match="rapport" mode="cust">
		<xsl:if test="@view='aait_v_rap_infobord' or @view='AAIT_V_RAP_INFOBORD'">
			<html>
				<head>

					<style>th {
      border: 0px solid #c08080;
    }
    
    th.DefResultsetHeading {
      padding:  3px;
      background:url(../../cust/AAIT/xsl/heading.png);
      font-family: Verdana; 
      font-size: 12pt;
      color: #ffffff;
    }
    td.header {
      font-family: Verdana;
      padding:  3px;
      font-size: 16pt;
      font-weight: bold;
      color: #4f1e4c;
    }
    td.content {
      font-family: Verdana;
      padding:  3px;
      font-size: 12pt;
	    vertical-align: top;
      background-color: #eeeeee;
      border-bottom-style: solid;
      border-bottom-width: 1px;
      border-bottom-color: #c0c0c0;
    }
    body {
      margin-top:  3px;
      margin-bottom: 3px;
      margin-left:  15px;
      margin-right: 3px;
    }</style>

					<script language="javascript">var count=1;
function startAutoRefreshTim() {
  // verwijder scrollbar
  parent.document.body.style.overflow="hidden";
  return;
}</script>
				</head>

				<xsl:variable name="gebouw">
					<xsl:if test="contains(where,'gebouw')">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:if test="position()=1">
								<xsl:value-of select="GEBOUW_OMSCHRIJVING"/>
							</xsl:if>
						</xsl:for-each>
					</xsl:if>
				</xsl:variable>

				<body onLoad="startAutoRefreshTim();parent.Activate();">
					<table width="100%">
						<tr>
							<td class="header" width="100%">AAFM- Room Booking <xsl:value-of select="$gebouw"/></td>
							<td>
								<xsl:element name="img">
									<xsl:attribute name="src">../../cust/<xsl:value-of select="//header/custId"/>/tmpl_logo.gif</xsl:attribute>
								</xsl:element>
							</td>
						</tr>
					</table>

					<xsl:variable name="ruimten">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:sort select="RUIMTE"/>
							<xsl:sort select="TIJD_VAN"/>
							<xsl:sort select="ITEM_KEY"/>
							<xsl:if test="OFFSET &lt; 3000 or AKTIEF='active'">
								<xsl:if test="ITEM_TYPE='RES'">
									<xsl:copy-of select="."/>
								</xsl:if>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>

					<xsl:variable name="ruimte_bezoekers">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:sort select="ITEM_KEY"/>
							<xsl:if test="OFFSET &gt; -60 and OFFSET &lt; 60 and BEZOEK_STATUS='expected'">
								<xsl:if test="ITEM_TYPE='RES'">
									<xsl:copy-of select="."/>
								</xsl:if>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>

					<xsl:variable name="bezoekers">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:sort select="TIJD_VAN"/>
							<xsl:sort select="ITEM_KEY"/>
							<xsl:if test="OFFSET &gt; -60 and OFFSET &lt; 60 and BEZOEK_STATUS='expected'">
								<xsl:if test="ITEM_TYPE='BEZ'">
									<xsl:copy-of select="."/>
								</xsl:if>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>

					<xsl:variable name="bezoekers_bezoekers">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:sort select="ITEM_KEY"/>
							<xsl:if test="OFFSET &lt; 3000 or AKTIEF='active'">
								<xsl:if test="ITEM_TYPE='BEZ'">
									<xsl:copy-of select="."/>
								</xsl:if>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>
					<table width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<th class="DefResultsetHeading" style="text-align:left">Room</th>
							<th class="DefResultsetHeading" style="text-align:left">From</th>
							<th class="DefResultsetHeading" style="text-align:left">To</th>
							<th class="DefResultsetHeading" style="text-align:left">Name</th>
							<th class="DefResultsetHeading" style="text-align:left">Visitors</th>
						</tr>

						<xsl:for-each select="msxml:node-set($ruimten)/data_row">
							<xsl:variable name="prev_ruimte">
								<xsl:choose>
									<xsl:when test="position()=1">Quqelequ</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="preceding-sibling::data_row[1]/RUIMTE"/>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:variable>

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

							<xsl:variable name="rsv_ruimte">
								<xsl:value-of select="ITEM_KEY"/>
							</xsl:variable>

							<xsl:choose>
								<xsl:when test="ITEM_KEY = $prev_rsv_ruimte">
								</xsl:when>
								<xsl:otherwise>
									<xsl:if test="RUIMTE != $prev_ruimte and position() != '1'">
										<tr>
											<td height="2"></td>
										</tr>
									</xsl:if>
									<tr>
										<td class="content">
											<xsl:if test="RUIMTE != $prev_ruimte">
												<b>
													<xsl:value-of select="RUIMTE"/>
												</b>
											</xsl:if>&#xA0;</td>

										<td class="content">
											<xsl:value-of select="TIJD_VAN"/>
										</td>
										<td class="content">
											<xsl:value-of select="TIJD_TOT"/>
										</td>
										<td class="content">
											<xsl:value-of select="GASTHEER"/>
										</td>
										<td class="content">
											<xsl:for-each select="msxml:node-set($ruimte_bezoekers)/data_row">
												<xsl:variable name="prev_rsv_ruimte2">
													<xsl:choose>
														<xsl:when test="position()=1">Quqelequ</xsl:when>
														<xsl:otherwise>
															<xsl:value-of select="preceding-sibling::data_row[1]/ITEM_KEY"/>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:variable>
												<xsl:if test="ITEM_KEY = $rsv_ruimte">
													<xsl:if test="ITEM_KEY = $prev_rsv_ruimte2">
														<br/>
													</xsl:if>

													<xsl:value-of select="BEZOEKER"/>
													<xsl:if test="BEDRIJF!=''">&#xA0;(<xsl:value-of select="BEDRIJF"/>)</xsl:if>
												</xsl:if>
											</xsl:for-each>&#xA0;</td>
									</tr>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>

						<xsl:for-each select="msxml:node-set($bezoekers)/data_row">
							<xsl:variable name="afspraak">
								<xsl:value-of select="ITEM_KEY"/>
							</xsl:variable>
							<xsl:variable name="prev_afspraak">
								<xsl:choose>
									<xsl:when test="position()=1">Quqelequ</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="preceding-sibling::data_row[1]/ITEM_KEY"/>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:variable>
							<xsl:if test="position()=1">
								<tr>
									<td height="30"></td>
								</tr>
								<tr>
									<th class="DefResultsetHeading" style="text-align:left">Appointments</th>
									<th class="DefResultsetHeading" style="text-align:left">From</th>
									<th class="DefResultsetHeading" style="text-align:left">To</th>
									<th class="DefResultsetHeading" style="text-align:left">Name</th>
									<th class="DefResultsetHeading" style="text-align:left">&#xA0;</th>
									<th class="DefResultsetHeading" style="text-align:left">Visitors</th>
								</tr>
							</xsl:if>
							<xsl:if test="$prev_afspraak != $afspraak">
								<xsl:if test="position() != '1'">
									<tr>
										<td height="2"></td>
									</tr>
								</xsl:if>
								<tr>
									<td class="content">&#xA0;</td>
									<td class="content">
										<xsl:value-of select="TIJD_VAN"/>
									</td>
									<td class="content">
										<xsl:value-of select="TIJD_TOT"/>
									</td>
									<td class="content">
										<xsl:value-of select="GASTHEER"/>
									</td>
									<td class="content">
										<xsl:value-of select="OMSCHRIJVING"/>&#xA0;</td>

									<td class="content">
										<xsl:for-each select="msxml:node-set($bezoekers_bezoekers)/data_row">
											<xsl:variable name="prev_afspraak2">
												<xsl:choose>
													<xsl:when test="position()=1">Quqelequ</xsl:when>
													<xsl:otherwise>
														<xsl:value-of select="preceding-sibling::data_row[1]/ITEM_KEY"/>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:variable>
											<xsl:if test="ITEM_KEY = $afspraak">
												<xsl:if test="ITEM_KEY = $prev_afspraak2">
													<br/>
												</xsl:if>

												<xsl:value-of select="BEZOEKER"/>
												<xsl:if test="BEDRIJF!=''">&#xA0;(<xsl:value-of select="BEDRIJF"/>)</xsl:if>
											</xsl:if>
										</xsl:for-each>&#xA0;</td>
								</tr>
							</xsl:if>
						</xsl:for-each>
					</table>
					<input type="hidden" name="timeID2" value="-1"/>
				</body>
			</html>
		</xsl:if>


		<xsl:if test="@view='aait_v_rap_bezoekers' or @view='AAIT_V_RAP_BEZOEKERS'">
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:300normal,300italic,200italic"/>
    <style>
     .title {
         font-family: 'Open Sans', serif;
         font-style:  italic;
         font-weight: 300;
         font-size: 20pt;
      }
     th {
         font-family: 'Open Sans', serif;
         font-style:  normal;
         font-weight: 300;
         font-size: 22pt;
				 background-color:#FFFFFF;
         border-bottom-style: solid; 
         border-bottom-width:2px;
         border-bottom-color:#000000;
				 text-align: left;
      }
     td .normal {
         font-family: 'Open Sans', serif;
         font-style:  normal;
         font-weight: 300;
         font-size: 22pt;
				 height: 100px;
      }
    </style>
					<script language="javascript">var count=1;
function startAutoRefreshTim() {
  // verwijder scrollbar
  parent.document.body.style.overflow="hidden";
  return;
}</script>
	</head>
					<xsl:variable name="bezoekers">
						<xsl:for-each select="rapport_data/data_row">
							<xsl:sort select="TIJD_VAN"/>
							<xsl:sort select="ITEM_KEY"/>
								<xsl:if test="OFFSET &gt; -60 and OFFSET &lt; 30 and BEZOEK_STATUS='expected' and BEZOEKER != ''">
									<xsl:copy-of select="."/>
							</xsl:if>
						</xsl:for-each>
					</xsl:variable>

  <body topmargin="5" leftmargin="5" onLoad="startAutoRefreshTim();parent.Activate();">
    <table cellspacing="0" cellpadding="0" width="100%" height="100%">
      <tr>
        <td colspan="2" class="title" style="background-image:url('../../cust/aait/infobord/vis_head_back.png'); background-repeat: repeat-x;">
          <img src="../../cust/aait/infobord/vis_logo.png"/>Verwelkomt
        </td>
      </tr>
      <tr height="100%">
        <td VALIGN="top" style="background-image:url('../../cust/aait/infobord/vis_left_back.png'); background-repeat: repeat-y" height="100%">
          <img src="../../cust/aait/infobord/vis_left.png"/>
        </td>
        <td width="100%" valign="top" style="padding: 40px 40px; "> 
          <table width="100%">
            <tr><td colspan="3" class="title"></td></tr>
            <tr>
              <th>De heer/mevrouw</th>
              <th>Aankomsttijd</th>
              <th>Uw gastheer/vrouw</th>
            </tr>

						<xsl:for-each select="msxml:node-set($bezoekers)/data_row">
            	<tr>
								<td class="normal"><xsl:value-of select="BEZOEKER"/><br/>
										&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;<i><xsl:value-of select="BEDRIJF"/></i>
								</td>
								<td class="normal"><xsl:value-of select="TIJD_VAN"/>
								</td>
								<td class="normal"><xsl:value-of select="GASTHEER"/>
								</td>
							</tr>
						</xsl:for-each>
					</table>
				</td>
			</tr>
		</table>
		<input type="hidden" name="timeID2" value="-1"/>
	</body>
</html>
		</xsl:if>



		<xsl:if test="@view='aait_v_rap_factuur_goedkeuring' or @view='AAIT_V_RAP_FACTUUR_GOEDKEURING'">
			<html>
				<head>

					<style>th {
      border: 0px solid #c08080;
    }
    
    td.verdeling {
      font-family: Verdana;
      padding:  3px;
      font-size: 8pt;
	  border-bottom-width: thin; 
	  border-bottom-style: solid; 
	  border-bottom-color: #808080;
    }
    td.header {
      font-family: Verdana;
      padding:  3px;
      font-size: 8pt;
      font-weight: bold;
    }
    td.content {
      font-family: Verdana;
      padding:  3px;
      font-size: 8pt;
    }
    body {
      margin-top:  0px;
      margin-bottom: 0px;
      margin-left:  0px;
      margin-right: 0px;
    }</style>
				</head>
				<body>
					<xsl:for-each select="rapport_data/data_row">
						<xsl:if test="position() != '1'">
							<div style="page-break-before:always">&#xA0;</div>
						</xsl:if>
						<table width="100%">
							<tr>

								<td rowspan="2">
									<xsl:element name="img">
										<xsl:attribute name="src">../../cust/<xsl:value-of select="//header/custId"/>/tmpl_logo.gif</xsl:attribute>
									</xsl:element>
								</td>
								<td class="header">AAFM IT Inkoop Factuur</td>
							</tr>
							<tr>
								<td class="content">
									<b>NO:</b>
									<xsl:value-of select="FIN_FACTUUR_NR"/>
								</td>
							</tr>
						</table>
						<hr/>
						<table width="100%">
							<tr>
								<td colspan="2" class="header">Leverancier:</td>
							</tr>
							<tr>
								<td colspan="2" class="content">
									<xsl:value-of select="PRS_BEDRIJF_NAAM"/>
								</td>
							</tr>
							<tr>
								<td colspan="2" class="content">
									<xsl:value-of select="PRS_BEDRIJF_BEZOEK_ADRES"/>
								</td>
							</tr>
							<tr>
								<td class="header">Tel nr:</td>
								<td class="content">
									<xsl:value-of select="PRS_BEDRIJF_TELEFOON"/>
								</td>
							</tr>
							<tr>
								<td class="header">Fax nr:</td>
								<td class="content">
									<xsl:value-of select="PRS_BEDRIJF_FAX"/>
								</td>
							</tr>
						</table>
						<hr/>
						<table width="100%">
							<tr>
								<td width="25%" class="header">Factuurnummer:</td>
								<td width="25%" class="content">
									<xsl:value-of select="FIN_FACTUUR_NR"/>
								</td>
								<td width="25%" class="header">
									<xsl:choose>
										<xsl:when test="MODULE='CNT'">Contractnummer:</xsl:when>
										<xsl:otherwise>Ordernummer:</xsl:otherwise>
									</xsl:choose>
								</td>
								<td width="25%" class="content">
									<xsl:value-of select="ORDERNUMMER"/>
								</td>
							</tr>
							<tr>
								<td class="header">Factuurdatum:</td>
								<td class="content">
									<xsl:value-of select="FIN_FACTUUR_DATUM"/>
								</td>
								<td class="header">
									<xsl:choose>
										<xsl:when test="MODULE='CNT'">Begindatum contract:</xsl:when>
										<xsl:otherwise>Orderdatum:</xsl:otherwise>
									</xsl:choose>
								</td>
								<td class="content">
									<xsl:value-of select="ORDERDATUM"/>
								</td>
							</tr>
							<tr>
								<td class="header">Inboekdatum:</td>
								<td class="content">
									<xsl:value-of select="FIN_FACTUUR_AANMAAK"/>
								</td>
								<td class="header">Orderstatus:</td>
								<td class="content">
									<xsl:value-of select="ORDERSTATUS"/>
								</td>
							</tr>
							<tr>
								<td class="header">Factuurbedrag excl.:</td>
								<td class="content">
									<xsl:call-template name="europrijs">
										<xsl:with-param name="prijs" select="FIN_FACTUUR_TOTAAL"/>
									</xsl:call-template>
								</td>
								<td class="header">
									<xsl:choose>
										<xsl:when test="MODULE='CNT'">Termijnbedrag excl.:</xsl:when>
										<xsl:otherwise>Orderbedrag excl.:</xsl:otherwise>
									</xsl:choose>
								</td>
								<td class="content">
									<xsl:call-template name="europrijs">
										<xsl:with-param name="prijs" select="ORDERBEDRAG"/>
									</xsl:call-template>
								</td>
							</tr>
							<tr>
								<td class="header">Factuurbedrag incl.:</td>
								<td class="content">
									<xsl:call-template name="europrijs">
										<xsl:with-param name="prijs" select="FIN_FACTUUR_BTW"/>
									</xsl:call-template>
								</td>
								<td class="header">Caller:</td>
								<td class="content">
									<xsl:value-of select="CALLER"/>
								</td>
							</tr>
						</table>
						<hr/>
						<table width="100%" height="100px">
							<tr>
								<td class="header">Verdeling:</td>
							</tr>
							<tr>
								<td width="25%" class="verdeling">Costcenter</td>
								<td width="10%" class="verdeling">bedrag</td>
								<td width="5%">&#xA0;</td>
								<td width="30%" class="verdeling">Account Code Name</td>
								<td width="20%" class="verdeling">Account Code</td>
								<td width="10%" class="verdeling">bedrag</td>
							</tr>
							<tr>
								<td class="content">
									<xsl:value-of select="PRS_KOSTENPLAATS_NR"/>-<xsl:value-of select="PRS_KOSTENPLAATS_OMSCHRIJVING"/></td>
								<td class="content">
									<xsl:call-template name="europrijs">
										<xsl:with-param name="prijs" select="FIN_FACTUUR_TOTAAL"/>
									</xsl:call-template>
								</td>
								<td>&#xA0;</td>
								<td class="content">
									<xsl:value-of select="PRS_KOSTENSOORT_OPMERKING"/>
								</td>
								<td class="content">
									<xsl:value-of select="PRS_KOSTENSOORT_OMS"/>
								</td>
								<td class="content">
									<xsl:call-template name="europrijs">
										<xsl:with-param name="prijs" select="FIN_FACTUUR_TOTAAL"/>
									</xsl:call-template>
								</td>
							</tr>
							<tr>
								<td height="100%">&#xA0;</td>
							</tr>
						</table>
						<hr/>
						<table width="100%" height="200px">
							<tr>
								<td class="header">Omschrijving:</td>
							</tr>
							<tr>
								<td class="content">
									<xsl:call-template name="linebreaks">
										<xsl:with-param name="string" select="OMSCHRIJVING"/>
									</xsl:call-template>
								</td>
							</tr>
							<tr>
								<td height="100%">&#xA0;</td>
							</tr>
						</table>
						<hr/>
						<table width="100%">
							<tr>
								<td class="header">Accepted date:</td>
								<td class="header">Accepted by:</td>
							</tr>
							<tr>
								<td class="content">
									<xsl:value-of select="FCLT_D_DATUM_GOEDKEURING"/>
								</td>
								<td class="content">
									<xsl:choose>
										<xsl:when test="APPROVER">
											<xsl:value-of select="APPROVER"/>
										</xsl:when>
										<xsl:otherwise>Automatisch</xsl:otherwise>
									</xsl:choose>
								</td>
							</tr>
						</table>
					</xsl:for-each>
				</body>
			</html>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. --><!-- Stylesheet edited using Stylus Studio - (c) 2004-2007. Progress Software Corporation. All rights reserved. -->