<?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="bestelopdracht" mode="include">
    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
      <TR>
        <TD WIDTH="40" ROWSPAN="30" ID="LINKERMARGE"></TD>
        <TD>
          <!-- Bestelopdracht -->
          <table border="0" bordercolor="#ffffff" width="100%">
            <tr>
              <td colspan="5" class="caption" style="text-align:center">
                <b><xsl:value-of select="//lcl/BES/inkooporder"/></b>
              </td>
            </tr>
            <tr>
              <td colspan="5" style="height:30"/>
            </tr>
            <tr>
              <td colspan="2" style="width:47%">
                <b><xsl:value-of select="//lcl/BES/factuur_aan"/>:</b>
              </td>
              <td style="width:6%"></td>
              <td colspan="2" style="width:47%">
                <b><xsl:value-of select="//lcl/BES/leverancier"/>:</b>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <xsl:value-of select="factuuradres/naam"/>
                <br/>
                <xsl:value-of select="factuuradres/post_adres"/>
                <br/>
                <xsl:value-of select="factuuradres/post_postcode"/>&#xA0;
                <xsl:value-of select="factuuradres/post_plaats"/>
                <br/>
                <xsl:value-of select="factuuradres/post_land"/>
              </td>
              <td/>
              <td colspan="2">
                <xsl:value-of select="bedrijf/naam"/>
                <br/>
                <xsl:value-of select="bedrijf/post_adres"/>
                <br/>
                <xsl:value-of select="bedrijf/post_postcode"/>&#xA0;
                <xsl:value-of select="bedrijf/post_plaats"/>
                <br/>
                <xsl:value-of select="bedrijf/post_land"/>
              </td>
            </tr>
            <tr>
              <td colspan="5" style="height:20"/>
            </tr>
            <tr>
              <td colspan="2">
                <b><xsl:value-of select="//lcl/FAC/contactgegevens"/>:</b>
              </td>
              <td/>
              <td colspan="2">
                <b/>
              </td>
            </tr>
            <tr>
              <td colspan="2" style="vertical-align:top">
                <b><xsl:value-of select="//lcl/BES/besteller"/>: </b>
                <xsl:value-of select="bestelling/aanvrager/naam_full"/>
                <br/>
                <b><xsl:value-of select="//lcl/FAC/e-mail"/>: </b>
                <xsl:value-of select="bestelling/aanvrager/email"/>
                <br/>
                <b><xsl:value-of select="//lcl/FAC/telefoon"/>: </b>
                <xsl:value-of select="bestelling/aanvrager/telefoonnr"/>
                <br/>
                <b><xsl:value-of select="//lcl/FAC/kostenplaats"/>: </b>
                <xsl:value-of select="bestelling/kostenplaats/nr"/>
                <br/>
                <b><xsl:value-of select="//lcl/FAC/werkplek"/>: </b>
                <xsl:value-of select="bestelling/plaats"/>
                <br/>
                <br/>
                <b><xsl:value-of select="//lcl/BES/gewenste_afleverdatum"/>: </b>
                <xsl:value-of select="bestelling/leverdatum/datum"/>
              </td>
              <td/>
              <td colspan="2" style="vertical-align:top">
                <b><xsl:value-of select="//lcl/BES/aanvraagnummers"/>: </b>
                <xsl:value-of select="bestelling/key"/>
                <br/>
                <b><xsl:value-of select="//lcl/BES/opdrachtnummer"/>: </b>
                <xsl:value-of select="id"/>
                <br/>
                <b><xsl:value-of select="//lcl/BES/orderdatum"/>: </b>
                <xsl:value-of select="datum/datum"/>
                <br/>
                  <xsl:comment><b><xsl:value-of select="//lcl/BES/gewenste_afleverdatum"/>: </b><xsl:value-of select="bestelling/leverdatum/datum"/></xsl:comment>
              </td>
            </tr>
            <tr>
              <td colspan="5" style="height:20"/>
            </tr>
            <tr>
              <td colspan="2">
                <b><xsl:value-of select="//lcl/BES/afleveradres"/>:</b>
              </td>
              <td/>
              <td colspan="2">
                <b/>
              </td>
            </tr>
            <tr>
              <td colspan="2" style="vertical-align:top">
                <xsl:value-of select="afleveradres/naam"/>
                <br/>
                <xsl:value-of select="afleveradres/bezoek_adres"/>
                <br/>
                <xsl:value-of select="afleveradres/bezoek_postcode"/>&#xA0;
                <xsl:value-of select="afleveradres/bezoek_plaats"/>
                <br/>
                <xsl:value-of select="afleveradres/bezoek_land"/>
              </td>
              <td/>
              <td colspan="2" style="vertical-align:top">
                <xsl:for-each select="bestelling/kenmerk[@type!='L' and @type!='l' and @type!='Q']">
                  <b>
                    <xsl:value-of select="@naam"/>: </b>
                  <xsl:value-of select="."/>
                  <br/>
                </xsl:for-each>&#xA0;</td>
            </tr>
            <tr>
              <td colspan="5" style="height:20"/>
            </tr>
            <TR>
              <TD colspan="5">
                <TABLE cellpadding="0" cellspacing="0" border="1" bordercolor="#303030" width="100%">
                  <tr>
                    <th style="width:20"><xsl:value-of select="//lcl/BES/regel"/></th>
                    <th style="width:20"><xsl:value-of select="//lcl/BES/artikelnr"/></th>
                    <th style="width:200"><xsl:value-of select="//lcl/FAC/omschrijving"/></th>
                    <th style="width:20"><xsl:value-of select="//lcl/FAC/eenheid"/></th>
                    <th style="width:20; text-align:right"><xsl:value-of select="//lcl/FAC/aantal"/></th>
                    <th style="width:20; text-align:right"><xsl:value-of select="//lcl/FAC/prijs"/></th>
                    <th style="width:20; text-align:right"><xsl:value-of select="//lcl/FAC/totaal"/></th>
                  </tr>
                  <xsl:for-each select="bestelopdrachtitem">
                    <xsl:sort select="srtdeel/omschrijving"/>
                    <xsl:sort select="posnr" data-type="number"/>
                    <tr>
                      <td class="result">
                        <xsl:value-of select="posnr"/>
                      </td>
                      <td class="result">
                        <xsl:value-of select="bestelitem/srtdeel/artikel_nummer"/>
                      </td>
                      <td class="result">
                        <xsl:value-of select="bestelitem/srtdeel/omschrijving"/>&#xA0;
                        <xsl:for-each select="bestelitem/kenmerk">
                          <br/>
                          <xsl:value-of select="@naam"/>: <xsl:value-of select="."/></xsl:for-each>
                      </td>
                      <td class="result">
                        <xsl:value-of select="bestelitem/srtdeel/eenheid"/>
                      </td>
                      <td class="result" style="text-align:right">
                        <xsl:value-of select="aantal"/>
                      </td>
                      <td class="result" style="text-align:right">
                        <xsl:value-of select="format-number(prijs, '0,00', 'european')"/>
                      </td>
                      <td class="result" style="text-align:right">
                        <xsl:value-of select="format-number(totaal, '0,00', 'european')"/>
                      </td>
                    </tr>
                  </xsl:for-each>
                  <tr>
                    <td colspan="6"/>
                    <td style="text-align:right">
                      <b>
                        <xsl:value-of select="format-number(sum(bestelopdrachtitem/totaal), '0,00', 'european')"/>
                      </b>
                    </td>
                  </tr>
                </TABLE>
              </TD>
            </TR>
            <tr>
              <td colspan="5" style="height:40"/>
            </tr>
            <tr>
              <td colspan="5" style="text-align:center; font-size:9px"><xsl:value-of select="//lcl/BES/order_disclaimer1"/>(<xsl:value-of select="id"/>)<xsl:value-of select="//lcl/BES/order_disclaimer2"/></td>
            </tr>
          </table>
        </TD>
        <TD WIDTH="30" ROWSPAN="30" ID="RECHTERMARGE"/>
      </TR>
    </TABLE>
  </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/e-mail"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="voor/email"/>
        </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 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 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>
        <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/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!='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:template>

	
	<xsl:template match="opdracht" mode="include">
    <table border="0" width="100%" cellpadding="2">
      <tr>
        <td colspan="4" class="caption" style="padding-top:20px;padding-bottom:20px">
          <b>
            <xsl:value-of select="opdrachttype/omschrijving"/>&#160;
            <xsl:value-of select="melding/stdmelding/discipline/srtdiscipline/prefix"/>
            <xsl:value-of select="melding/key"/>/<xsl:value-of select="bedrijfopdr_volgnr"/></b>
        </td>
      </tr>
      <tr>
        <xsl:choose>        
            <xsl:when test="melding/aflever_adres/naam != ''">
                <td width="25%"><b><u>Afleveradres</u></b></td>
            </xsl:when>
            <xsl:otherwise>
                <td width="25%"/>
            </xsl:otherwise>
        </xsl:choose>
        <xsl:choose>        
            <xsl:when test="factuuradres/naam != ''">
                <td width="25%"><b><u>Factuuradres</u></b></td>
            </xsl:when>
            <xsl:otherwise>
                <td width="25%"/>
            </xsl:otherwise>
        </xsl:choose>
        
        <td width="25%" align="right">
          <b><xsl:value-of select="//lcl/FAC/bedrijf"/>:</b>
        </td>
        <td width="25%">
          <xsl:value-of select="uitvoerende/bedrijf/naam"/>
        </td>
      </tr>
      <tr>
        <td>
            <xsl:value-of select="melding/aflever_adres/naam"/>
        </td>
        <td>
          <xsl:value-of select="factuuradres/naam"/>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/contactpersoon"/>:</b>
        </td>
        <td>
          <xsl:value-of select="contactpersoon/naam_full"/>
        </td>
      </tr>
      <tr>
        <td>
            <xsl:value-of select="melding/aflever_adres/bezoek_adres"/>
        </td>
        <td>
          <xsl:value-of select="factuuradres/post_adres"/>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/telefoon"/>:</b>
        </td>
        <td>
          <xsl:value-of select="contactpersoon/telefoon1"/>
        </td>
      </tr>
      <tr>
        <td>
            <xsl:value-of select="melding/aflever_adres/bezoek_postcode"/>&#160;&#160;<xsl:value-of select="melding/aflever_adres/bezoek_plaats"/>
        </td>
        <td>
          <xsl:value-of select="factuuradres/post_postcode"/>&#160;&#160;<xsl:value-of select="factuuradres/post_plaats"/>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/adres"/>:</b>
        </td>
        <td>
          <xsl:value-of select="uitvoerende/bedrijf/post_adres"/>
        </td>
      </tr>
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/plaats"/>:</b>
        </td>
        <td>
          <xsl:value-of select="uitvoerende/bedrijf/post_plaats"/>
        </td>
      </tr>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/contactpersoon"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="backoffice_contact/naam_full"/>
        </td>
        <td colspan="2"/>
      </tr>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/telefoon"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="backoffice_contact/telefoonnr"/>
        </td>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/kostenplaats"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="kostenplaats/nr"/>
        </td>
      </tr>
      <xsl:if test="melding/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="melding/kenmerk[@naam='Ordernr']"/>
          </td>
        </tr>
      </xsl:if>
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/datum_gereed"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="datumgereed/datum"/>
        </td>
      </tr>
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/status"/>:</b>
        </td>
        <td align="left">
          <xsl:value-of select="status"/>
        </td>
      </tr>
      <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>
      <tr>
        <td colspan="4">
          <hr/>
        </td>
      </tr>
      <tr>
        <td colspan="4" align="center">
          <table width="100%" style="background-color:#EEEEEE;border: 1px solid blue">
            <tr>
              <td>
                <xsl:apply-templates select="melding" mode="include"/>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td colspan="4" height="30px" valign="center">
          <hr/>
        </td>
      </tr>
      <xsl:variable name="arbeid" select="uren*uurloon"/>
      <tr>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/uren"/>:</b>
        </td>
        <td>
          <xsl:value-of select="format-number(uren, '0,00', 'european')"/>
          <b>&#xA0;à&#xA0;</b>&#x20AC;&#xA0;<xsl:value-of select="format-number(uurloon, '0,00', 'european')"/></td>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/arbeid"/>:</b>
        </td>
        <td style="width:1in;text-align:right">&#x20AC;&#xA0;<xsl:value-of select="format-number($arbeid, '0,00', 'european')"/></td>
      </tr>
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/MLD/materiaal"/>:</b>
        </td>
        <td style="width:1in;text-align:right">&#x20AC;&#xA0;<xsl:value-of select="format-number(materiaal, '0,00', 'european')"/></td>
      </tr>
      <xsl:variable name="correctie0" select="$arbeid + materiaal"/>
      <xsl:variable name="correctie" select="kosten - $correctie0"/>
      <xsl:if test="$correctie!=0">
        <tr>
          <td colspan="2"/>
          <td align="right">
            <b><xsl:value-of select="//lcl/MLD/correctie"/>:</b>
          </td>
          <td style="width:1in;text-align:right">&#x20AC;&#xA0;<xsl:value-of select="format-number($correctie, '0,00', 'european')"/></td>
        </tr>
      </xsl:if>
      <tr>
        <td colspan="2"/>
        <td align="right">
          <b><xsl:value-of select="//lcl/FAC/totaal"/>:</b>
        </td>
        <td style="width:1in;text-align:right">
          <b>&#x20AC;&#xA0;<xsl:value-of select="format-number(kosten, '0,00', 'european')"/></b>
        </td>
      </tr>
    </table>
  </xsl:template>

	
	
	
</xsl:stylesheet>
