<?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:template name="rsv_ruimte">
		<xsl:param name="min_volgnr"/>
		<tr>
			<xsl:choose>
				<xsl:when test="res_ruimte!=''">
					<td class="tekstkop" colspan="10" frame="box" style="border-style:solid;border-width:0px;">
						<br/><xsl:value-of select="van/datum"/>&#xA0;<xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if><xsl:value-of select="//lcl/RES/deelreservering"/> &#160; <xsl:value-of select="volgnr"/>&#xA0;
						<xsl:if test="string(res_activiteit/omschrijving)!=''">(<xsl:value-of select="res_activiteit/omschrijving"/>)&#xA0;</xsl:if>
						<xsl:value-of select="res_ruimte/plaats/regio/district/locatie/omschrijving"/>-<xsl:value-of select="res_ruimte/plaats/regio/district/locatie/gebouw/naam"/>(<xsl:value-of select="res_ruimte/plaats/regio/district/locatie/gebouw/code"/>)
					</td>
				</xsl:when>
				<!-- "roomservice" -->
				<xsl:otherwise>
					<td class="tekstkop" colspan="10" frame="box" style="border-style:solid;border-width:0px;">
						<br/><xsl:value-of select="van/datum"/><xsl:if test="string(van/datum)!=string(tot/datum)">&#xA0;-&#xA0;<xsl:value-of select="tot/datum"/></xsl:if>&#xA0;<xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if><xsl:value-of select="//lcl/RES/deelreservering"/>  &#160;<xsl:value-of select="volgnr"/>&#xA0;
						<xsl:value-of select="plaats/regio/district/locatie/omschrijving"/> - 
						<xsl:value-of select="plaats/regio/district/locatie/gebouw/naam"/>(<xsl:value-of select="plaats/regio/district/locatie/gebouw/code"/>) - 
						<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/omschrijving"/> - 
						<xsl:value-of select="plaats/regio/district/locatie/gebouw/verdieping/ruimte/nr"/>
					</td>
				</xsl:otherwise>
			</xsl:choose>
		</tr>
		<xsl:if test="string(omschrijving)!=string(//reservering/rsv_ruimte[volgnr=$min_volgnr]/omschrijving)">
			<tr>
				<td class="label" frame="box" style="border-style:solid;border-width:0px;">- <xsl:value-of select="//lcl/FAC/omschrijving"/>:</td>
				<td class="value" colspan="9" frame="box" style="border-style:solid;border-width:0px;">
					<xsl:value-of select="omschrijving"/>
				</td>
			</tr>
		</xsl:if>
		<xsl:if test="string(opmerking)!=string(//reservering/rsv_ruimte[volgnr=$min_volgnr]/opmerking)">
			<tr>
				<td class="label" frame="box" style="border-style:solid;border-width:0px;">- <xsl:value-of select="//lcl/FAC/opmerking"/>:</td>
				<td class="value" colspan="9" frame="box" style="border-style:solid;border-width:0px;">
					<xsl:call-template name="linebreaks">
						<xsl:with-param name="string" select="opmerking"/>
					</xsl:call-template>
				</td>
			</tr>
		</xsl:if>
		<xsl:if test="string(contact_user/naam_full)!=string(//reservering/rsv_ruimte[volgnr=$min_volgnr]/contact_user/naam_full)">
			<tr>
				<td class="label" frame="box" style="border-style:solid;border-width:0px;">- <xsl:value-of select="//lcl/FAC/aanvrager"/>:</td>
				<td class="value" colspan="9" frame="box" style="border-style:solid;border-width:0px;">
					<xsl:value-of select="contact_user/naam_full"/>/ <xsl:value-of select="contact_user/werkplek/plaats/regio/district/locatie/omschrijving"/></td>
			</tr>
		</xsl:if>
		<xsl:if test="string(host_user/naam_full)!=string(//reservering/rsv_ruimte[volgnr=$min_volgnr]/host_user/naam_full)">
			<tr>
				<td class="label" frame="box" style="border-style:solid;border-width:0px;">- <xsl:value-of select="//lcl/RES/gastheer_vrouw"/>:</td>
				<td class="value" colspan="9" frame="box" style="border-style:solid;border-width:0px;">
					<xsl:value-of select="host_user/naam_full"/>
				</td>
			</tr>
		</xsl:if>
		<xsl:if test="string(kostenplaats/nr)!=string(//reservering/rsv_ruimte[volgnr=$min_volgnr]/kostenplaats/nr)">
			<tr>
				<td class="label" frame="box" style="border-style:solid;border-width:0px;">- <xsl:value-of select="//lcl/FAC/kostenplaats"/>:</td>
				<td class="value" colspan="9" frame="box" style="border-style:solid;border-width:0px;">
					<xsl:value-of select="kostenplaats/nr"/>&#xA0;<xsl:value-of select="kostenplaats/omschrijving"/></td>
			</tr>
		</xsl:if>
		<tr>
			<th><xsl:value-of select="//lcl/FAC/omschrijving"/></th>
			<th><xsl:value-of select="//lcl/RES/aantal"/></th>
			<th style="text-align:right"><xsl:value-of select="//lcl/RES/prijs"/></th>
			<!--<th width="80">Datum</th>-->
			<th style="text-align:right"><xsl:value-of select="//lcl/RES/begintijd"/></th>
			<th style="text-align:right"><xsl:value-of select="//lcl/RES/eindtijd"/></th>
			<th><xsl:value-of select="//lcl/RES/status"/></th>
			<th><xsl:value-of select="//lcl/RES/opstelling"/></th>
		</tr>
		<xsl:if test="res_ruimte!=''">
			<tr>
				<td class="result" style="text-align:left" width="35%"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
					<xsl:value-of select="res_ruimte/nr"/>
					<br/>(max. <xsl:value-of select="res_ruimte/bezoekers"/> <xsl:value-of select="//lcl/FAC/personen"/>)
					<xsl:if test="res_ruimte/omschrijving!=''">
					  <br/><br/><xsl:value-of select="res_ruimte/omschrijving"/> 
			        </xsl:if>
			    </td>
				<td class="result" style="text-align:left">
					<xsl:value-of select="bezoekers"/>&#xA0;<xsl:value-of select="//lcl/FAC/personen"/></td>
				<td class="result" style="text-align:right">
					<xsl:call-template name="europrijs">
						<xsl:with-param name="prijs" select="prijs"/>
					</xsl:call-template>
				</td>
				<!--<td class="result" style="text-align:right">
					<xsl:value-of select="van/datum"/>
				</td>-->
				<td class="result" style="text-align:right">
					<xsl:value-of select="van/tijd"/>
				</td>
				<td class="result" style="text-align:right">
					<xsl:value-of select="tot/tijd"/>
				</td>
				<td class="result" style="text-align:left">
					<xsl:value-of select="status_fo"/>
				</td>
				<td class="result" style="text-align:left">
					<xsl:value-of select="res_ruimte/opstelling"/>
				</td>
			</tr>
		</xsl:if>
		<!-- rsv_deel-lijst gesorteerd op van-tijd -->
		<xsl:for-each select="rsv_deel">
			<xsl:sort select="van/tijd"/>
			<tr>
				<td class="result"><xsl:if test="dirtlevel!='0'"><span class="fatal"><xsl:value-of select="//lcl/RES/ongeldig"/></span>&#xA0;</xsl:if>
					<xsl:value-of select="res_deel/deel/omschrijving"/>
				</td>
				<td class="result">
					<xsl:value-of select="aantal"/>
				</td>
				<td class="result" style="text-align:right">
					<xsl:call-template name="europrijs">
						<xsl:with-param name="prijs" select="prijs"/>
					</xsl:call-template>
				</td>
				<!--<td class="result" style="text-align:right">
					<xsl:value-of select="van/datum"/>
				</td>-->
				<td class="result" style="text-align:right">
					<xsl:value-of select="van/tijd"/>
				</td>
				<td class="result" style="text-align:right">
					<xsl:value-of select="tot/tijd"/>
				</td>
			</tr>
		</xsl:for-each>
		<!-- rsv_artikel-lijst gesorteerd op van-tijd -->
		<xsl:for-each select="rsv_artikel">
			<xsl:sort select="levering/tijd"/>
			<tr>
				<td class="result">
					<xsl:value-of select="res_artikel/omschrijving"/>
				</td>
				<td class="result">
					<xsl:value-of select="aantal"/>
				</td>
				<td class="result" style="text-align:right">
					<xsl:call-template name="europrijs">
						<xsl:with-param name="prijs" select="prijs"/>
					</xsl:call-template>
				</td>
				<!--<td class="result" style="text-align:right">
					<xsl:value-of select="levering/datum"/>
				</td>-->
				<td class="result" style="text-align:right">
					<xsl:value-of select="levering/tijd"/>
				</td>
			</tr>
		</xsl:for-each>		
		<!-- totaal per deelreservering -->
		<tr>
			<td class="tekst" colspan="2" style="border-style:solid;border-width:0px;"><xsl:value-of select="//lcl/RES/totaal_deelreservering"/></td>
			<td class="tekst" style="text-align:right;border-style:solid;border-width:0px;">
             <xsl:call-template name="europrijs">
               <xsl:with-param name="prijs" select="sum(prijs[string(number(.))!='NaN'])+sum(rsv_deel/prijs[string(number(.))!='NaN'])+sum(rsv_artikel/prijs[string(number(.))!='NaN'])"/>
             </xsl:call-template>
			</td>
		</tr>
		
		<!-- afspraak-lijst gesorteerd op naam -->
		<xsl:for-each select="afspraak/bezoeker">
			<xsl:sort select="naam"/>
			<xsl:choose>
				<xsl:when test="position() = 1">
					<tr>
						<td class="tekst" style="border-style:solid;border-width:0px;">
							<br/><xsl:value-of select="//lcl/BEZ/bezoekers"/></td>
					</tr>
					<tr>
						<th><xsl:value-of select="//lcl/FAC/naam"/></th>
						<th colspan="3"><xsl:value-of select="//lcl/FAC/bedrijf"/></th>
						<th colspan="4"><xsl:value-of select="//lcl/BEZ/parkeerplaats"/></th>
					</tr>
				</xsl:when>
			</xsl:choose>
			<tr>
				<td class="result">
					<xsl:value-of select="naam"/>
				</td>
				<td class="result" colspan="3">
					<xsl:value-of select="bedrijf"/>
				</td>
				<td class="result" colspan="4">
					<xsl:value-of select="deel/omschrijving"/>
				</td>
			</tr>
		</xsl:for-each>
	

		<!-- kenmerk -->
		<xsl:if test="kenmerk">
		<tr>
		<td colspan="5">
		<table>
			<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 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 height="20px">
				<td class="tekst" colspan="2" style="border-style:solid;border-width:0px;"></td>
		</tr>
		</xsl:if>			
	</xsl:template>	

	<xsl:template match="perslid" mode="full">
       <xsl:choose>
            <xsl:when test="$mode='summary'"></xsl:when>
       <xsl:otherwise>
		<html>
			<xsl:comment>================================ PERSONEN ==============================</xsl:comment>
			<xsl:comment>Facilitor new style default XSL template for perslid</xsl:comment>
			<xsl:call-template name="htmlhead"/>
				<xsl:apply-templates select="." mode="include"/>
		</html>
       </xsl:otherwise>
      </xsl:choose>
	</xsl:template>


</xsl:stylesheet>
<!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="file:///x:/2dto/OrderTemplatesAAXX/RFQ.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->