Sunteți pe pagina 1din 16

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.

org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-pref
ixes="msxsl"
xmlns:cs="urn:cs">
<msxsl:script language="C#" implements-prefix="cs">
<msxsl:using namespace="System"/>
<![CDATA[
public string fnDate(string DueDateTime)
{
return Convert.ToDateTime(DueDateTime).AddDays(90).ToString("dd/
MM/yyyy");
}
public string TrailingSpace(int i, string A, st
ring B )
{
string str=A;
if (A.Length < i)
{
for(int temp=A.Length; temp<i;temp++){
str=str+B;}
return str;
}
else
{
return str;
}
}
public string LeadingChar(int i, string A, string B)
{
string str = "";
if (A.Length < i)
{
for(int temp=A.Length; temp<i;temp++){
str=str + B;
}
return str + A;
}
else
{
return A.Substring(0,i);
}
}
public string ReplaceChar(string A, string B, string C)
{
return A.Replace(B,C);
}

public double DaysAgo(string TermDate)


{

DateTime dt=DateTime.ParseExact(TermDate, "MMddyyyy", null);


return(DateTime.Now - dt).TotalDays;
}

]]>
</msxsl:script>
<xsl:output method="text"/>
<!-- variables -->
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwx
yz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWX
YZ'" />
<xsl:template match="/">
<xsl:value-of select="Export/Record/H_RecordID" />
<xsl:value-of select="Export/Record/H_FileCreation" />
<xsl:value-of select="Export/Record/H_PayGroup" />
<xsl:value-of select="Export/Record/H_Filer" />
<xsl:text disable-output-escaping="yes">&#xD;&#xA;</xsl:text>
<xsl:for-each select="Export/Record">
<xsl:if test="string-length(normalize-space(TermDate)) = 0 or (stringlength(normalize-space(TermDate)) &gt; 0 and cs:DaysAgo(TermDate) &lt; 180)">
<xsl:value-of select="RecordID" />
<xsl:choose>
<xsl:when test="string-length(normalize-space(CheckDate)) != 0">
<xsl:value-of select="CheckDate" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="EmployeeSSN" />
<xsl:value-of select="FirstName" />
<xsl:value-of select="MiddleName" />
<xsl:value-of select="Lastname" />
<xsl:value-of select="Filer" />
<xsl:choose>
<xsl:when test="normalize-space(PayrollCompany) = 42010">
<xsl:text>002</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 12010">
<xsl:text>002</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 32010">
<xsl:text>002</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02000">
<xsl:text>001</xsl:text>
</xsl:when>

<xsl:when test="normalize-space(PayrollCompany) = 02041">


<xsl:text>001</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02051">
<xsl:text>001</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02061">
<xsl:text>001</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02121">
<xsl:text>001</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02220">
<xsl:text>001</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02203">
<xsl:text>015</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02204">
<xsl:text>015</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02205">
<xsl:text>015</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02208">
<xsl:text>015</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 12202">
<xsl:text>015</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="PayrollCompany"/>
<xsl:text>2</xsl:text>
<xsl:value-of select="substring(MSALocation,6,3)" />
<xsl:value-of select="substring(MSALocation,9,3)" />
<xsl:value-of select="Department" />
<xsl:choose>
<xsl:when test="substring(MSALocation,9,3) = '906' and substring(MSALoca
tion,0,6) != '02051'">
<xsl:text>005</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and(substring(MSAL
ocation,9,3) = '908' or substring(MSALocation,9,3) = '938')">
<xsl:text>006</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,9,3) = '909'">
<xsl:text>010</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '12010' and substring(MSAL
ocation,0,6) != '02051' and substring(MSALocation,9,3) &gt; '200' and substring(
MSALocation,9,3) &lt; '451' and substring(MSALocation,9,3) != '209' and substrin
g(MSALocation,9,3) != '218' and substring(MSALocation,9,3) != '325' and substrin
g(MSALocation,9,3) != '377' and substring(MSALocation,9,3) != '378'">
<xsl:text>014</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) = '12010' and substring(MSALo
cation,0,6) != '02051' and (substring(MSALocation,9,3) = '253' or substring(MSAL

ocation,9,3) = '265' or substring(MSALocation,9,3) = '333' or substring(MSALocat


ion,9,3) = '346' or substring(MSALocation,9,3) = '368')">
<xsl:text>014</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and (substring(MSA
Location,9,3) = '209' or substring(MSALocation,9,3) = '218' or substring(MSALoca
tion,9,3) = '325' or substring(MSALocation,9,3) = '377' or substring(MSALocation
,9,3) = '378')">
<xsl:text>14M</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and substring(MSAL
ocation,9,3) = '043'">
<xsl:text>15A</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and (substring(MSA
Location,9,3) = '025' or substring(MSALocation,9,3) = '031' or substring(MSALoca
tion,9,3) = '034' or substring(MSALocation,9,3) = '044' or substring(MSALocation
,9,3) = '055' or substring(MSALocation,9,3) = '058' or substring(MSALocation,9,3
) = '071')">
<xsl:text>15S</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and (substring(MSA
Location,9,3) = '001' or substring(MSALocation,9,3) = '045' or substring(MSALoca
tion,9,3) = '601')">
<xsl:text>020</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and (substring(MSA
Location,9,3) = '002' or substring(MSALocation,9,3) = '004' or substring(MSALoca
tion,9,3) = '902')">
<xsl:text>021</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and substring(MSAL
ocation,9,3) = '535'">
<xsl:text>037</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,9,3) = '515' or substring(MSALocat
ion,9,3) = '520'">
<xsl:text>041</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,9,3) = '934' or substring(MSALocat
ion,9,3) = '935'">
<xsl:text>055</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,9,3) = '570' or substring(MSALocat
ion,9,3) = '925'">
<xsl:text>060</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and substring(MSAL
ocation,9,3) = '910'">
<xsl:text>075</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and substring(MSAL
ocation,9,3) = '098'">
<xsl:text>098</xsl:text>
</xsl:when>
<xsl:when test="substring(MSALocation,0,6) != '02051' and substring(MSAL
ocation,9,3) = '099'">
<xsl:text>099</xsl:text>
</xsl:when>
<xsl:otherwise>

<xsl:text>000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="Filer_1" />
<xsl:choose>
<xsl:when test="string-length(normalize-space(MailAddr1)) != 0">
<xsl:value-of select="translate(MailAddr2,'&amp;',' ')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(HomeAddr1,'&amp;',' ')" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(MailAddr1)) != 0">
<xsl:value-of select="cs:TrailingSpace(35,normalize-space(translate(Ma
ilAddr1,'&amp;',' ')),' ')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="translate(HomeAddr2,'&amp;',' ')" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(MailAddr1)) != 0">
<xsl:value-of select="translate(MailCity,'&amp;',' ')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="HomeCity" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(MailAddr1)) != 0">
<xsl:value-of select="translate(MailState,'&amp;',' ')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="HomeState" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(MailAddr1)) != 0">
<xsl:value-of select="substring(translate(MailZip,'-',''),0,10)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(translate(HomeZip,'-',''),0,10)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="Filer_2" />
<xsl:choose>
<xsl:when test="EmploymentStatus = 'ON LEAVE'">
<xsl:text>02</xsl:text>
</xsl:when>
<!--xsl:when test="EmploymentStatus = 'TERMINATED'"-->
<xsl:when test="translate(EmploymentStatus , $smallcase, $uppercase) = '
TERMINATED'">
<xsl:text>03</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>01</xsl:text>
</xsl:otherwise>

</xsl:choose>
<xsl:choose>
<xsl:when test="TermReasonID = '03'">
<xsl:text>R</xsl:text>
</xsl:when>
<xsl:when test="TermReasonID = '11'">
<xsl:text>I</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '04'">
<xsl:text>X</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '01'">
<xsl:text>D</xsl:text>
</xsl:when>
<xsl:when test="string-length(normalize-space(TermDate)) > 0">
<xsl:text>T</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="EmployeeSex" />
<xsl:value-of select="Filer_3" />
<xsl:choose>
<xsl:when test="string-length(normalize-space(EmployeeBirthDate)) != 0">
<xsl:value-of select="EmployeeBirthDate" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(HireDate)) != 0">
<xsl:value-of select="HireDate" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(DateLastHire)) != 0">
<xsl:value-of select="DateLastHire" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(VestingDate)) != 0">
<xsl:value-of select="VestingDate" />
</xsl:when>
<xsl:when test="string-length(normalize-space(HireDate)) != 0">
<xsl:value-of select="HireDate" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>

<xsl:when test="string-length(normalize-space(TermDate)) != 0">


<xsl:value-of select="TermDate" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="normalize-space(PayrollCompany) = 02203">
<xsl:value-of select="format-number(CurrentYearHours,'00000000')" />
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02204">
<xsl:value-of select="format-number(CurrentYearHours,'00000000')" />
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 12202">
<xsl:value-of select="format-number(CurrentYearHours,'00000000')" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="Filer_4" />
<xsl:choose>
<xsl:when test="string-length(normalize-space(CollectiveBargainingUnit))
!= 0">
<xsl:value-of select="CollectiveBargainingUnit" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(normalize-space(DCEgibilityDate)) != 0">
<xsl:value-of select="DCEgibilityDate" />
</xsl:when>
<xsl:when test="string-length(normalize-space(DCEgibilityDate)) = 0 and
(FullTime_PartTimeCode = '01' or FullTime_PartTimeCode = '02' or FullTime_PartTi
meCode = '40' or FullTime_PartTimeCode = '41' or FullTime_PartTimeCode = '70' or
FullTime_PartTimeCode = '71' or FullTime_PartTimeCode = '75') ">
<xsl:value-of select="concat(substring(cs:fnDate(concat(substring(Hire
Date,1,2),'/',substring(HireDate,3,2),'/',substring(HireDate,5,4))),4,2),substri
ng(cs:fnDate(concat(substring(HireDate,1,2),'/',substring(HireDate,3,2),'/',subs
tring(HireDate,5,4))),1,2),substring(cs:fnDate(concat(substring(HireDate,1,2),'/
',substring(HireDate,3,2),'/',substring(HireDate,5,4))),7,4))"/>
</xsl:when>
<xsl:when test="string-length(normalize-space(DCEgibilityDate)) = 0 and
(FullTime_PartTimeCode != '01' or FullTime_PartTimeCode != '02' or FullTime_Part
TimeCode != '40' or FullTime_PartTimeCode != '41' or FullTime_PartTimeCode != '7
0' or FullTime_PartTimeCode != '71' or FullTime_PartTimeCode != '75') ">
<xsl:text>00000000</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="DCEgibilityDate = '
' and (FullTime_PartTimeCode
!= '01' and FullTime_PartTimeCode != '02' and FullTime_PartTimeCode != '40' and

FullTime_PartTimeCode != '41' and FullTime_PartTimeCode != '70' and FullTime_Par


tTimeCode != '71' and FullTime_PartTimeCode != '75') ">
<xsl:text>N</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Y</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="normalize-space(PayrollCompany) = 42010">
<xsl:text>B</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 12010">
<xsl:text>W</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 32010">
<xsl:text>S</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02000">
<xsl:text>S</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02041">
<xsl:text>C</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02051">
<xsl:text>C</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02061">
<xsl:text>B</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02121">
<xsl:text>S</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02220">
<xsl:text>C</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02203">
<xsl:text>C</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02204">
<xsl:text>B</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02205">
<xsl:text>C</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 02208">
<xsl:text>B</xsl:text>
</xsl:when>
<xsl:when test="normalize-space(PayrollCompany) = 12202">
<xsl:text>B</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:value-of select="FullTime_PartTimeCode" />
<xsl:text>
+</xsl:text>
<!--<xsl:value-of select="YTDPay" />-->
<xsl:value-of select="cs:LeadingChar(12,cs:ReplaceChar(cs:ReplaceChar(form

at-number(YTDAonE - YTDAonD,'#0.00'),'-',''),'.',''),'0')" />


<xsl:text>+</xsl:text>
<xsl:value-of select="YTDDC" />
<xsl:value-of select="Filer_6" />
<xsl:choose>
<xsl:when test="PreTaxContrib != 0">
<xsl:choose>
<xsl:when test="substring(PreTaxContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(PreTaxContrib,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
PreTaxContrib,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="substring(PreTaxContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(PreTaxContrib1,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
PreTaxContrib1,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<!--<xsl:choose>
<xsl:when test="EmployerMatchingContrib != 0">
<xsl:choose>
<xsl:when test="substring(EmployerMatchingContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(EmployerMatchingContrib,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
EmployerMatchingContrib,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="EmployerMatchingContrib1 != 0">
<xsl:choose>
<xsl:when test="substring(EmployerMatchingContrib1,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(EmployerMatchingContrib1,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
EmployerMatchingContrib1,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>

<xsl:when test="substring(EmployerMatchingContrib2,1,1) = '-'">


<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(EmployerMatchingContrib2,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
EmployerMatchingContrib2,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>-->
<xsl:variable name="EmployerMatchingContribTotal">
<xsl:value-of select="format-number(EmployerMatchingContrib + EmployerMa
tchingContrib1, '##.00')"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$EmployerMatchingContribTotal != 0">
<xsl:choose>
<xsl:when test="substring($EmployerMatchingContribTotal,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar($EmployerMatchingContribTotal,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
$EmployerMatchingContribTotal,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="substring(EmployerMatchingContrib2,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(EmployerMatchingContrib2,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
EmployerMatchingContrib2,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="CompanyGuaranteeContrib != 0">
<xsl:choose>
<xsl:when test="substring(CompanyGuaranteeContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(CompanyGuaranteeContrib,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
CompanyGuaranteeContrib,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="substring(CompanyGuaranteeContrib1,1,1) = '-'">

<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(
cs:ReplaceChar(CompanyGuaranteeContrib1,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(
CompanyGuaranteeContrib1,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="substring(CompanySpecialContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:R
eplaceChar(CompanySpecialContrib,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(Comp
anySpecialContrib,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="substring(CompanySeniorValueContrib,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:R
eplaceChar(CompanySeniorValueContrib,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(Comp
anySeniorValueContrib,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="substring(ProfitSharing,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:R
eplaceChar(ProfitSharing,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(Prof
itSharing,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:text>0000000000000</xsl:text>
<xsl:choose>
<xsl:when test="substring(LoanPayment1,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:R
eplaceChar(LoanPayment1,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(Loan
Payment1,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="substring(LoanPayment2,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:R

eplaceChar(LoanPayment2,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar(Loan
Payment2,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:text>+</xsl:text>
<xsl:value-of select="YTDDBPlanCoveredPay" />
<xsl:choose>
<xsl:when test="TerminationCode = '11'">
<xsl:text>11</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '08'">
<xsl:text>08</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '09'">
<xsl:text>09</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '03'">
<xsl:text>03</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '05'">
<xsl:text>05</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '10'">
<xsl:text>16</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '15'">
<xsl:text>15</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '10'">
<xsl:text>10</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '06'">
<xsl:text>06</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '13'">
<xsl:text>13</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '14'">
<xsl:text>14</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '12'">
<xsl:text>12</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '01'">
<xsl:text>01</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '02'">
<xsl:text>02</xsl:text>
</xsl:when>
<xsl:when test="TerminationCode = '04'">
<xsl:text>04</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>00</xsl:text>
</xsl:otherwise>

</xsl:choose>
<xsl:choose>
<xsl:when test="EmploymentStatus = 'ON LEAVE'">
<xsl:value-of select="LeaveStartDate1" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="EmploymentStatus = 'ACTIVE' and TermReasonID = 'Reinstat
'">
<xsl:value-of select="LeaveStartDate1" />
</xsl:when>
<xsl:otherwise>
<xsl:text>00000000</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="EmployeeNumber1" />
<xsl:value-of select="Filer_8" />
<xsl:text disable-output-escaping="yes">&#xD;&#xA;</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="Export/Record/T_RecordID" />
<xsl:value-of select="Export/Record/T_Filer" />

<xsl:variable name="Var_PreTax">
<xsl:value-of select="format-number(sum(//Export/Record/PreTaxContrib)+sum
(//Export/Record/PreTaxContrib1), '#.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_PreTax,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_PreTax,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_P
reTax,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_EmpMatchCont">
<xsl:value-of select="format-number(sum(//Export/Record/EmployerMatchingCo
ntrib)+sum(//Export/Record/EmployerMatchingContrib1)+ sum(//Export/Record/Employ
erMatchingContrib2), '#.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_EmpMatchCont,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_EmpMatchCont,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_E
mpMatchCont,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_CompGuarCont">

<xsl:value-of select="format-number(sum(//Export/Record/CompanyGuaranteeCo
ntrib)+sum(//Export/Record/CompanyGuaranteeContrib1), '#.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_CompGuarCont,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_CompGuarCont,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_C
ompGuarCont,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_CompSpecCont">
<xsl:value-of select="format-number(sum(//Export/Record/CompanySpecialCont
rib), '#.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_CompSpecCont,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_CompSpecCont,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_C
ompSpecCont,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_CompSeniorCont">
<xsl:value-of select="format-number(sum(//Export/Record/CompanySeniorValue
Contrib), '#.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_CompSeniorCont,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_CompSeniorCont,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_C
ompSeniorCont,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_ProfitSharing">
<xsl:value-of select="format-number(sum(//Export/Record/ProfitSharing), '#
.00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_ProfitSharing,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_ProfitSharing,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_P
rofitSharing,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="Export/Record/T_Filer1" />

<xsl:variable name="Var_LoanPayment1">
<xsl:value-of select="format-number(sum(//Export/Record/LoanPayment1), '#.
00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_LoanPayment1,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_LoanPayment1,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_L
oanPayment1,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="Var_LoanPayment2">
<xsl:value-of select="format-number(sum(//Export/Record/LoanPayment2), '#.
00')" />
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($Var_LoanPayment2,1,1) = '-'">
<xsl:value-of select="concat('-',cs:LeadingChar(12,cs:ReplaceChar(cs:Rep
laceChar($Var_LoanPayment2,'-',''),'.',''),'0'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('+',cs:LeadingChar(12,cs:ReplaceChar($Var_L
oanPayment2,'.',''),'0'))" />
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="Export/Record/T_Filer2" />
</xsl:template>
<xsl:template name="padRightSide">
<xsl:param name="stringToPad"/>
<xsl:param name="totalLength"/>
<xsl:param name="padChar" select="' '"/>
<xsl:param name="padBuffer" select=
"concat($padChar,$padChar,$padChar,$padChar,$padChar,
$padChar,$padChar,$padChar,$padChar,$padChar
)"/>
<xsl:variable name="vNewString" select=
"concat($stringToPad, $padBuffer)"/>
<xsl:choose>
<xsl:when test="not(string-length($vNewString) >= $totalLength)">
<xsl:call-template name="padRightSide">
<xsl:with-param name="stringToPad" select="$vNewString"/>
<xsl:with-param name="totalLength" select="$totalLength"/>
<xsl:with-param name="padChar" select="$padChar"/>
<xsl:with-param name="padBuffer" select="$padBuffer"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select=
"substring($vNewString,
string-length($vNewString) - $totalLength + 1)"/>
</xsl:otherwise>

</xsl:choose>
</xsl:template>
</xsl:stylesheet>

Ads by Torntv V9.0Ad Options

Ads by Torntv V9.0Ad Options

Special Offers.
Ads By Torntv V9.0

S-ar putea să vă placă și