<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
    >
    
    <xsl:template name="getCsvType">
		<xsl:param name="posCd" />
		<xsl:choose>
		<!-- Schaider Peter GmbH -->
			<xsl:when test="$posCd = 'P1' or  $posCd = 'P16' or $posCd = 'P21' or $posCd = 'P29' or $posCd = 'P33' or $posCd = 'P47'  ">
				<xsl:value-of select="'2'" />
			</xsl:when>
			<!-- Schaider & Strassl GmbH -->
			<xsl:when test="$posCd = 'P5' or $posCd = 'P7' or $posCd = 'P8' or $posCd = 'P10' or $posCd = 'P11' or $posCd = 'P13' or $posCd = 'P15' or $posCd = 'P18' or $posCd = 'P19' or $posCd = 'P22'  or $posCd = 'P23'or $posCd = 'P24'  or $posCd = 'P27' or $posCd = 'P28'  or $posCd = 'P30' or $posCd = 'P32' or $posCd = 'P34' or $posCd = 'P36' or $posCd = 'P38' or $posCd = 'P40'  or $posCd = 'P46'  ">
				<xsl:value-of select="'2'" />
			</xsl:when>
			<!--  Strassl & Schaider GmbH -->
			<xsl:when test="$posCd = 'P2' or $posCd = 'P3' or $posCd = 'P4' or $posCd = 'P6' or $posCd = 'P9' or $posCd = 'P12' or $posCd = 'P14' or $posCd = 'P17' or $posCd = 'P20' or $posCd = 'P25' or $posCd = 'P26' or $posCd = 'P31' or $posCd = 'P35' or $posCd = 'P37' or $posCd = 'P41' or $posCd = 'P42' or $posCd = 'P43' or $posCd = 'P48'  or $posCd = 'P49' ">
				<xsl:value-of select="'2'" />
			</xsl:when>
			<xsl:when test="$posCd = 'P45' ">
				<xsl:value-of select="'2'" />
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="'1'" />
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>
    
    
	<xsl:template name="findeKostenstelle">
		<xsl:param name="posCd" />
		<xsl:param name="buNm" />
		
		<xsl:choose>
		
		<!-- Schaider Peter GmbH -->
						<xsl:when test="$posCd='P1'">
							<xsl:value-of select="'30'" />
						</xsl:when>
						<xsl:when test="$posCd='P16'">
							<xsl:value-of select="'40'" />
						</xsl:when>
						<xsl:when test="$posCd='P21'">
							<xsl:value-of select="'50'" />
						</xsl:when>
						<xsl:when test="$posCd='P29'">
							<xsl:value-of select="'20'" />
						</xsl:when>
						<xsl:when test="$posCd='P33'">
							<xsl:value-of select="'60'" />
						</xsl:when>
		
						<xsl:when test="$posCd='P47'">
							<xsl:value-of select="'70'" />
						</xsl:when>
			<!-- Schaider & Strassl GmbH -->
						<xsl:when test="$posCd='P5'">
							<xsl:value-of select="'20'" />
						</xsl:when>
						<xsl:when test="$posCd='P7'">
							<xsl:value-of select="'40'" />
						</xsl:when>
						<xsl:when test="$posCd='P8'">
							<xsl:value-of select="'50'" />
						</xsl:when>
						<xsl:when test="$posCd='P10'">
							<xsl:value-of select="'160'" />
						</xsl:when>
						<xsl:when test="$posCd='P11'">
							<xsl:value-of select="'70'" />
						</xsl:when>
						<xsl:when test="$posCd='P13'">
							<xsl:value-of select="'80'" />
						</xsl:when>
						<xsl:when test="$posCd='P15'">
							<xsl:value-of select="'100'" />
						</xsl:when>
						<xsl:when test="$posCd='P18'">
							<xsl:value-of select="'110'" />
						</xsl:when>
						<xsl:when test="$posCd='P19'">
							<xsl:value-of select="'120'" />
						</xsl:when>
						<xsl:when test="$posCd='P22'">
							<xsl:value-of select="'130'" />
						</xsl:when>
						<xsl:when test="$posCd='P23'">
							<xsl:value-of select="'30'" />
						</xsl:when>
						<xsl:when test="$posCd='P24'">
							<xsl:value-of select="'140'" />
						</xsl:when>
						<xsl:when test="$posCd='P27'">
							<xsl:value-of select="'150'" />
						</xsl:when>
						<xsl:when test="$posCd='P28'">
							<xsl:value-of select="'60'" />
						</xsl:when>
						
						<xsl:when test="$posCd='P30'">
							<xsl:value-of select="'90'" />
						</xsl:when>
						<xsl:when test="$posCd='P32'">
							<xsl:value-of select="'170'" />
						</xsl:when>
					
						<xsl:when test="$posCd='P34'">
							<xsl:value-of select="'180'" />
						</xsl:when>
						<xsl:when test="$posCd='P36'">
							<xsl:value-of select="'190'" />
						</xsl:when>
						<xsl:when test="$posCd='P38'">
							<xsl:value-of select="'200'" />
						</xsl:when>
						<xsl:when test="$posCd='P40'">
							<xsl:value-of select="'210'" />
						</xsl:when>
						<xsl:when test="$posCd='P46'">
							<xsl:value-of select="'30'" />
						</xsl:when>
						
						
					<!--  Strassl & Schaider GmbH -->
						<xsl:when test="$posCd='P2'">
							<xsl:value-of select="'1'" />
						</xsl:when>
						<xsl:when test="$posCd='P3'">
							<xsl:value-of select="'2'" />
						</xsl:when>
						<xsl:when test="$posCd='P4'">
							<xsl:value-of select="'3'" />
						</xsl:when>
						<xsl:when test="$posCd='P6'">
							<xsl:value-of select="'4'" />
						</xsl:when>
						<xsl:when test="$posCd='P9'">
							<xsl:value-of select="'6'" />
						</xsl:when>
						<xsl:when test="$posCd='P12'">
							<xsl:value-of select="'11'" />
						</xsl:when>
						<xsl:when test="$posCd='P14'">
							<xsl:value-of select="'12'" />
						</xsl:when>
						<xsl:when test="$posCd='P17'">
							<xsl:value-of select="'8'" />
						</xsl:when>
						<xsl:when test="$posCd='P20'">
							<xsl:value-of select="'9'" />
						</xsl:when>
						<xsl:when test="$posCd='P25'">
							<xsl:value-of select="'13'" />
						</xsl:when>
						<xsl:when test="$posCd='P26'">
							<xsl:value-of select="'14'" />
						</xsl:when>
						<xsl:when test="$posCd='P31'">
							<xsl:value-of select="'10'" />
						</xsl:when>
						<xsl:when test="$posCd='P35'">
							<xsl:value-of select="'15'" />
						</xsl:when>
						<xsl:when test="$posCd='P37'">
							<xsl:value-of select="'5'" />
						</xsl:when>
						<xsl:when test="$posCd='P41'">
							<xsl:value-of select="'17'" />
						</xsl:when>
						<xsl:when test="$posCd='P42'">
							<xsl:value-of select="'16'" />
						</xsl:when>
						<xsl:when test="$posCd='P43'">
							<xsl:value-of select="'18'" />
						</xsl:when>
						<xsl:when test="$posCd='P48'">
							<xsl:value-of select="'20'" />
						</xsl:when>
						<xsl:when test="$posCd='P49'">
							<xsl:value-of select="'19'" />
						</xsl:when>
						
					<!--  Sonstiges -->
						<xsl:when test="$posCd='P45'">
							<xsl:value-of select="'7'" />
						</xsl:when>
						
						<xsl:otherwise>
							<xsl:value-of select="$buNm" />
						</xsl:otherwise>
					</xsl:choose>
		
		
		</xsl:template>
		
		
		<xsl:template name="findeGegenkonto">
		<xsl:param name="posCd" />
		<xsl:choose>
		
				<!-- Schaider Peter GmbH -->
						<xsl:when test="$posCd='P1'">
							
							<xsl:value-of select="'2705'" />
						</xsl:when>
						<xsl:when test="$posCd='P16'">
							
							<xsl:value-of select="'2702'" />
						</xsl:when>
						<xsl:when test="$posCd='P21'">
							
							<xsl:value-of select="'2703'" />
						</xsl:when>
						<xsl:when test="$posCd='P29'">
							
							<xsl:value-of select="'2700'" />
						</xsl:when>
						<xsl:when test="$posCd='P33'">
							
							<xsl:value-of select="'2704'" />
						</xsl:when>
						<xsl:when test="$posCd='P47'">		
							<xsl:value-of select="'2707'" />
						</xsl:when>
						
			<!-- Schaider & Strassl GmbH -->
						<xsl:when test="$posCd='P5'">
							 <xsl:value-of select="'2700'" />
						</xsl:when>
						<xsl:when test="$posCd='P7'">
							 <xsl:value-of select="'2702'" />
						</xsl:when>
						<xsl:when test="$posCd='P8'">
							 <xsl:value-of select="'2703'" />
						</xsl:when>
						<xsl:when test="$posCd='P10'">
							 <xsl:value-of select="'2714'" />
						</xsl:when>
						<xsl:when test="$posCd='P11'">
							 <xsl:value-of select="'2705'" />
						</xsl:when>
						<xsl:when test="$posCd='P13'">
							
							<xsl:value-of select="'2706'" />
						</xsl:when>
						<xsl:when test="$posCd='P15'">
							
							<xsl:value-of select="'2708'" />
						</xsl:when>
						<xsl:when test="$posCd='P18'">
							
							<xsl:value-of select="'2709'" />
						</xsl:when>
						<xsl:when test="$posCd='P19'">
							
							<xsl:value-of select="'2701'" />
						</xsl:when>
						<xsl:when test="$posCd='P22'">
							
							<xsl:value-of select="'2710'" />
						</xsl:when>
							<xsl:when test="$posCd='P23'">
							
							<xsl:value-of select="'2711'" />
						</xsl:when>
							<xsl:when test="$posCd='P24'">
							
							<xsl:value-of select="'2712'" />
						</xsl:when>
						<xsl:when test="$posCd='P27'">
							
							<xsl:value-of select="'2713'" />
						</xsl:when>
						<xsl:when test="$posCd='P28'">
							
							<xsl:value-of select="'2704'" />
						</xsl:when>
					
						<xsl:when test="$posCd='P30'">
							
							<xsl:value-of select="'2707'" />
						</xsl:when>
						<xsl:when test="$posCd='P32'">
							
							<xsl:value-of select="'2715'" />
						</xsl:when>
						
						<xsl:when test="$posCd='P34'">
							
							<xsl:value-of select="'2716'" />
						</xsl:when>
						<xsl:when test="$posCd='P36'">
							
							<xsl:value-of select="'2717'" />
						</xsl:when>
						<xsl:when test="$posCd='P38'">
							
							<xsl:value-of select="'2718'" />
						</xsl:when>
						<xsl:when test="$posCd='P40'">
							
							<xsl:value-of select="'2719'" />
						</xsl:when>
						<xsl:when test="$posCd='P46'">
							<xsl:value-of select="'2720'" />
						</xsl:when>
					
							<!--  Strassl & Schaider GmbH -->
						<xsl:when test="$posCd='P2'">
							<xsl:value-of select="'27010'" />
						</xsl:when>
						<xsl:when test="$posCd='P3'">
							<xsl:value-of select="'27020'" />
						</xsl:when>
						<xsl:when test="$posCd='P4'">
							<xsl:value-of select="'27030'" />
						</xsl:when>
						<xsl:when test="$posCd='P6'">
							<xsl:value-of select="'27040'" />
						</xsl:when>
						<xsl:when test="$posCd='P9'">
							<xsl:value-of select="'27060'" />
						</xsl:when>
						<xsl:when test="$posCd='P12'">
							<xsl:value-of select="'27110'" />
						</xsl:when>
						<xsl:when test="$posCd='P14'">
							<xsl:value-of select="'27120'" />
						</xsl:when>
						<xsl:when test="$posCd='P17'">
							<xsl:value-of select="'27080'" />
						</xsl:when>
						<xsl:when test="$posCd='P20'">
							<xsl:value-of select="'27090'" />
						</xsl:when>
						<xsl:when test="$posCd='P25'">
							<xsl:value-of select="'27130'" />
						</xsl:when>
						<xsl:when test="$posCd='P26'">
							<xsl:value-of select="'27140'" />
						</xsl:when>
						<xsl:when test="$posCd='P31'">
							<xsl:value-of select="'27100'" />
						</xsl:when>
						<xsl:when test="$posCd='P35'">
							<xsl:value-of select="'27150'" />
						</xsl:when>
						<xsl:when test="$posCd='P37'">
							<xsl:value-of select="'27050'" />
						</xsl:when>
						<xsl:when test="$posCd='P41'">
							<xsl:value-of select="'27170'" />
						</xsl:when>
						<xsl:when test="$posCd='P42'">
							<xsl:value-of select="'27160'" />
						</xsl:when>
						<xsl:when test="$posCd='P43'">
							<xsl:value-of select="'27180'" />
						</xsl:when>
					
						<xsl:when test="$posCd='P48'">
							<xsl:value-of select="'2720'" />
						</xsl:when>
						<xsl:when test="$posCd='P49'">
							<xsl:value-of select="'27190'" />
						</xsl:when>
					
					<!--  Sonstiges -->
						<xsl:when test="$posCd='P45'">
							<xsl:value-of select="'27070'" />
						</xsl:when>
				
					<xsl:otherwise>
							
							<xsl:value-of select="'1600'" />
						</xsl:otherwise>
					</xsl:choose>
		
		
		</xsl:template>
		
    </xsl:stylesheet>