<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 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="melding" mode="include">
		<xsl:choose>
			<xsl:when test="discipline/key = '283' or discipline/key = '300' or discipline/key = '311'">
				<table border="1" bordercolor="#000000" width="95%" cellpadding="0" cellspacing="0">
					<tr>
						<td>
							<table border="1" bordercolor="#000000" width="100%" cellpadding="3" cellspacing="0">
								<tr>
									<td style="padding-left:10px">
										<b>MAINTENANCE</b>
									</td>
									<td rowspan="2" width="70%">
										<b>
											<center>WERKOPDRACHT</center>
										</b>
									</td>
									<td style="padding-left:20px; text-align:right;">NR. <b><xsl:value-of select="discipline/srtdiscipline/prefix"/><xsl:value-of select="key"/></b></td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td>
							<table border="1" bordercolor="#000000" width="100%" cellpadding="3" cellspacing="0">
								<tr>
									<td rowspan="2">Datum</td>
									<td colspan="20">
										<b>OPDRACHTOMSCHRIJVING</b>
									</td>
								</tr>
								<tr>
									<td colspan="20">
										<xsl:value-of select="begindatum/datum"/>
									</td>
								</tr>
								<tr>
									<td rowspan="2">Opdrachtgever</td>
									<td colspan="20">
										<xsl:value-of select="voor/naam_full"/>
									</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Installatie</td>
									<td colspan="20">
										<xsl:value-of select="stdmelding/omschrijving"/>
									</td>
								</tr>
								<tr>
									<td colspan="20">
										<xsl:call-template name="linebreaks">
											<xsl:with-param name="string" select="omschrijving"/>
										</xsl:call-template>
									</td>
								</tr>
								<tr>
									<td rowspan="2">Installatie deel</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Benodigde cap. M.U.</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Gevr. leverdatum</td>
									<td colspan="20">
										<b>RAPPORTAGE</b>
									</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Budgetnummer</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Uitvoerder</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Uitvoeringsdatum</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Gewerkte tijd</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td rowspan="2">Gereed</td>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td colspan="20">&#xA0;</td>
								</tr>
								<tr>
									<td><xsl:value-of select="//lcl/MLD/afhandeling"/></td>
									<td colspan="3">
        								<xsl:call-template name="linebreaks">
        									<xsl:with-param name="string" select="opmerking"/>
        								</xsl:call-template>
							        </td>
								</tr>
								<tr>
									<td colspan="20">
										<center>
											<b>VERBRUIKTE MATERIALEN</b>
										</center>
									</td>
								</tr>
								<tr>
									<td>Omschrijving</td>
									<td>Partnummer</td>
									<td>W/H</td>
									<td>Maint.</td>
									<td>Kosten</td>
									<td>Extern</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
								<tr>
									<td colspan="4" style="text-align:right">
										<b>TOTAAL</b>
									</td>
									<td>&#xA0;</td>
									<td>&#xA0;</td>
								</tr>
							</table>
						</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"/>&#xA0;<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/melddatum"/>:</b>
						</td>
						<td align="left">
							<xsl:value-of select="gemeld/datum"/>&#xA0;
							<xsl:value-of select="gemeld/tijd"/>
						</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/ordernr"/>:</b>
						</td>
						<td align="left">
							<xsl:value-of select="kenmerk[@naam='Ordernr']"/>
						</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>
						<td align="right">
							<b>
								<xsl:value-of select="//lcl/MLD/uitvoertijd"/>:</b>
						</td>
						<td align="left">
							<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>
                        </td>
					</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/status"/>:</b>
						</td>
						<td align="left">
							<xsl:value-of select="status"/>
						</td>
					</tr>
					<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!='Q']">
						<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:template>

	<xsl:template match="afspraak" mode="include">
		<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
			<TR>
				<TD WIDTH="40" ROWSPAN="30" ID="LINKERMARGE"/>
				<TD>
					<xsl:choose>
						<xsl:when test="not(boolean(bezoeker))">
							<table>
								<tr>
									<td height="20"/>
								</tr>
								<tr>
									<td class="caption">No visitors registered.</td>
								</tr>
							</table>
						</xsl:when>
						<xsl:otherwise>
							<!-- Bevestiging bezoekers registratie -->
							<table border="0" bordercolor="#ffffff" width="100%">
								<tr>
									<td class="caption" valign="top" colspan="2">Confirmation vistor registration <xsl:value-of select="key"/><br/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Requested by</td>
									<td class="value" width="80%">: <xsl:value-of select="contact_user/naam_full"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">E-mail address</td>
									<td class="value" width="80%">: <xsl:value-of select="contact_user/email"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Location</td>
									<td class="value" width="80%">: <xsl:value-of select="contact_user/werkplek/plaats/regio/district/locatie/omschrijving"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Organisation</td>
									<td class="value" width="80%">: <xsl:value-of select="contact_user/afdeling/omschrijving"/></td>
								</tr>
								<tr>
									<td height="30px"/>
								</tr>
								<xsl:if test="contact_user/key!=ingevoerd_user/key">
									<tr>
										<td width="20%" class="label">Registered by</td>
										<td width="80%" class="value">: <xsl:value-of select="ingevoerd_user/naam_full"/></td>
									</tr>
									<tr>
										<td height="30px"/>
									</tr>
								</xsl:if>
								<xsl:call-template name="bez_begintext"/>
								<tr>
									<td height="10px"/>
								</tr>
								<tr>
									<td class="tekstkop" colspan="2" style="text-decoration:underline">Visit details</td>
								</tr>
								<tr>
									<td height="5px"/>
								</tr>
								<tr>
									<td class="label" width="20%">Date visit</td>
									<td class="value" width="80%">: <xsl:value-of select="datum/datum"/>
										<xsl:if test="datum/datum!=eind/datum">- <xsl:value-of select="eind/datum"/></xsl:if>
									</td>
								</tr>
								<tr>
									<td class="label" width="20%">Time visit</td>
									<td class="value" width="80%">: <xsl:value-of select="datum/tijd"/> - <xsl:value-of select="eind/tijd"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Visiting</td>
									<td class="value" width="80%">: <xsl:value-of select="host_user/naam_full"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Phone</td>
									<td class="value" width="80%">: <xsl:value-of select="telefoonnr"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Visit location</td>
									<td class="value" width="80%">: <xsl:value-of select="plaats/plaatsaanduiding"/></td>
								</tr>
								<tr>
									<td class="label" width="20%">Visitors code</td>
									<td class="value" width="80%">: <xsl:value-of select="actie"/></td>
								</tr>
								<xsl:if test="opmerking!=''">
									<tr>
										<td class="label" width="20%">Remarks</td>
										<td class="value" width="80%">: <xsl:value-of select="opmerking"/></td>
									</tr>
								</xsl:if>
								<tr>
									<td height="10"/>
								</tr>
								<!-- afspraak -->

								<xsl:for-each select="bezoeker">
									<xsl:sort select="naam"/>
									<xsl:choose>
										<xsl:when test="position() = 1">
											<tr>
												<td height="10" style="border-right: 0px solid; border-top: 0px solid; border-left: 0px solid; border-bottom: 0px solid"/>
											</tr>
											<tr>
												<td colspan="2" class="label">Visitor(s)</td>
											</tr>
										</xsl:when>
									</xsl:choose>
									<tr>
										<td class="result">
											<xsl:value-of select="naam"/>
										</td>
										<td class="result">
											<xsl:value-of select="bedrijf"/>
											<xsl:if test="deel">- Request to program Nissan badge</xsl:if>
											<xsl:if test="done">
												<i>(in:<xsl:value-of select="done/datum"/>&#xA0;<xsl:value-of select="done/tijd"/>)</i>
											</xsl:if>
											<xsl:if test="out">
												<i>(out:<xsl:value-of select="out/datum"/>&#xA0;<xsl:value-of select="out/tijd"/>)</i>
											</xsl:if>
										</td>
									</tr>
								</xsl:for-each>
								<xsl:call-template name="bez_endtext"/>
							</table>
							<!-- Bevestiging bezoekers registratie -->
						</xsl:otherwise>
					</xsl:choose>
				</TD>
				<TD WIDTH="30" ROWSPAN="30" ID="RECHTERMARGE"/>
			</TR>
		</TABLE>
	</xsl:template>


	<xsl:template match="key">
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\Facilitor500\Temp\NMPCmelding2835.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>
-->