<tal:block tal:define="employee python: here.getDestinationSectionValue();
                  employer python: here.getSourceSectionValue();
                  paysheet_details python: here.PaySheetTransaction_getDetails();
                  paysheet_categories python: paysheet_details['paysheet_categories'];
                  urssaf python: employer.getDestinationSectionValue();
                  start_date python: here.getStartDate()">



  <template bottommargin='0.665cm' showboundary='0' topmargin='0.635cm' rightmargin='0.665cm' tal:define='portal python:here.portal_url.getPortalObject()' filename='paysheet.pdf' pagesize='A4' allowsplitting='1' landscape='0' leftmargin='0.635cm'>
    
    <stylesheet>
      <tablestyle name="decompte">
        <stylecmd expr="('FONTSIZE', (0,0), (-1,-1), 7)"/>
        <stylecmd expr="('OUTLINE', (0,0), (-1,-1), 0.7, (0.4,0.4,0.4))"/>
        <stylecmd expr="('LINEAFTER', (0,0), (-1,-1), 0.1, (0.4,0.4,0.4))"/>
        <stylecmd expr="('LEFTPADDING', (0,0), (-1,-1), 4)"/>

        <!-- Entête -->
        <stylecmd expr="('TEXTCOLOR', (0,0), (-1,0), colors.white)"/>
        <stylecmd expr="('FONT', (0,0), (-1,0), 'Helvetica-Bold', 7)"/>
        <stylecmd expr="('BACKGROUND', (0,0), (-1,0), (0.4,0.4,0.4))"/>
        <stylecmd expr="('LINEAFTER', (0,0), (-2,0), 0.1, colors.white)"/>
        <stylecmd expr="('LEFTPADDING', (0,0), (-1,0), 0)"/>
        <stylecmd expr="('RIGHTPADDING', (0,0), (-1,0), 0)"/>
        <stylecmd expr="('ALIGNMENT', (0,0), (-1,0), 'CENTER')"/>

        <!-- Corps -->
        <stylecmd expr="('TOPPADDING', (0,1), (-1,-1), 2)"/>
        <stylecmd expr="('BOTTOMPADDING', (0,1), (-1,-1), 2)"/>
        <stylecmd expr="('BACKGROUND', (0,1), (-1,-1), (0.95, 0.95, 0.95))"/>
        <stylecmd expr="('TEXTCOLOR', (0,1), (-1,-1), colors.black)"/>
        <stylecmd expr="('ALIGNMENT', (-5,1), (-1,-1), 'RIGHT')"/>

        <!-- Pied de tableau -->
        <stylecmd expr="('BACKGROUND', (-1,1), (-1,-2), (0.85,0.85,0.85))"/>
        <stylecmd expr="('BACKGROUND', (0,-1), (-2,-1), (0.85,0.85,0.85))"/>
        <stylecmd expr="('BACKGROUND', (-1,-1), (-1,-1), (0.75,0.75,0.75))"/>
        <stylecmd expr="('LINEABOVE', (0,-1), (-1,-1), 0.1, (0.4,0.4,0.4))"/>
      </tablestyle>



      <tablestyle name="cumul_conges">
        <stylecmd expr="('FONTSIZE', (0,0), (-1,-1), 7)"/>
        <stylecmd expr="('LEFTPADDING', (0,0), (-1,-1), 4)"/>

        <!-- Entête gauche -->
        <stylecmd expr="('TEXTCOLOR', (0,0), (0,0), colors.white)"/>
        <stylecmd expr="('FONT', (0,0), (0,0), 'Helvetica-Bold', 7)"/>
        <stylecmd expr="('BACKGROUND', (0,0), (0,0), (0.4,0.4,0.4))"/>
        <stylecmd expr="('TOPPADDING', (0,0), (0,0), 0)"/>
        <stylecmd expr="('BOTTOMPADDING', (0,0), (0,0), 0)"/>
        <stylecmd expr="('ALIGNMENT', (0,0), (0,0), 'CENTER')"/>
        <stylecmd expr="('VALIGN', (0,0), (0,0), 'MIDDLE')"/>
        
        
        <!-- <!- Première ligne de droite ->
             <stylecmd expr="('LINEABOVE', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
             <stylecmd expr="('LINEBEFORE', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
             <stylecmd expr="('LINEAFTER', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
        -->

      </tablestyle>

      <tablestyle name="cumul_conges_corps">
        <stylecmd expr="('FONTSIZE', (0,0), (-1,-1), 7)"/>
        <stylecmd expr="('LEFTPADDING', (0,0), (-1,-1), 4)"/>

        <!--Tableau de gauche -->
        <stylecmd expr="('GRID', (0,0), (4,1), 0.1, (0.4,0.4,0.4))"/>
        <stylecmd expr="('ALIGNMENT', (0,0), (4,0), 'CENTER')"/>
        <stylecmd expr="('ALIGNMENT', (0,1), (4,1), 'RIGHT')"/>

        <!-- Deuxième ligne de droite -->
        <!-- <stylecmd expr="('LINEBELOW', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
             <stylecmd expr="('LINEBEFORE', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
             <stylecmd expr="('LINEAFTER', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
        -->
        <stylecmd expr="('OUTLINE', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>
        
      </tablestyle>


    </stylesheet>

    <pagetemplate startframe='content' id='FirstPage'>
      <static>
        
        <!-- ATTENTION : L'image ne doit pas être en format png -->
        <fixedimage filename='zodb:logo.jpg' y='27.275cm' x='1.016cm'/>
        <infostring z='' color='(0.0,0.0,0.0)' align='center' y='27.5160804cm' x='14.208cm' font='Helvetica' size='20'>FEUILLE DE SALAIRE</infostring>

        <!-- Cadre employeur -->
        <tal:block tal:condition="python: employer not in (None, '') and employer.getPortalType() == 'Organisation'">
          <tal:block tal:define="employer_group python: employer.getGroup()">
            <rectangle z='' height='5.239cm' width='7.038cm' stroke='(0.4,0.4,0.4)' y='21.074cm' x='1.016cm' linewidth='1'/>
            <line y2='23.646cm' linewidth='1' z='' x2='8.042cm' stroke='(0.6,0.6,0.6)' y1='23.646cm' x1='1.016cm'/>
            <line y2='21.741cm' linewidth='1' z='' x2='8.042cm' stroke='(0.6,0.6,0.6)' y1='21.741cm' x1='1.016cm'/>

            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.90483216cm' x='1.278cm' font='Helvetica-Bold' size='8'
              tal:content="python: employer.getCorporateName()">Nexedi sarl</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.49483216cm' x='1.626cm' font='Helvetica' size='8'
              tal:content="python: employer.getDefaultAddress().getStreetAddress()">943 Avenue de la République</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.21366432cm' x='1.626cm' font='Helvetica' size='8'
              tal:content='python:employer.getDefaultAddress().getZipCode() + " " + employer.getDefaultAddress().getCity()'>59700 Marcq-en-Baroeul</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='24.70683216cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'Etablissement : %s' % employer_group" tal:condition="python: employer_group != None">Etablissement : nexedi</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='24.70683216cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'Etablissement : Etablissement principal'" tal:condition="python: employer_group == None">Etablissement : nexedi</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='24.42566432cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'Siret : %s' % employer.getGeographicIncorporateCode()">Siret : 440047504 00012</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='24.14449648cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'NAF (ex APE) : %s' % employer.getActivityCode()">NAF (ex APE) : 722Z</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='23.23783216cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'N°URSSAF : %s' % employer.getSocialCode()">N°URSSAF : 592 190071289 1013</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='22.95666432cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python:urssaf.getTitle()">URSSAF de Roubaix-Tourcoing</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='22.37383216cm' x='1.626cm' font='Helvetica' size='8'
              tal:content="python:urssaf.getDefaultAddress().getStreetAddress()">28, avenue de la Marne</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='22.09266432cm' x='1.626cm' font='Helvetica' size='8'
              tal:content="python:urssaf.getDefaultAddress().getZipCode() + ' ' + urssaf.getDefaultAddress().getCity()">59208 Tourcoing</infostring>
            <infostring z='' color='(0.0,0.0,0.0)' align='left' y='21.33283216cm' x='1.27cm' font='Helvetica' size='8'
              tal:content="python: 'Convention collective de branche : %s' % employee.getDefaultCollectiveAgreementTitle()">Convention collective de branche : SYNTEC</infostring>
          </tal:block>
        </tal:block>


        <!-- Cadre employé -->
        <tal:block tal:condition="python: employee not in (None, '') and employee.getPortalType() == 'Person'">
          <rectangle z='' height='5.239cm' width='7.038cm' stroke='(0.4,0.4,0.4)' y='21.074cm' x='12.065cm' linewidth='1'/>
          <line y2='23.994cm' linewidth='1' z='' x2='19.099cm' stroke='(0.6,0.6,0.6)' y1='23.994cm' x1='12.073cm'/>
          <line y2='22.165cm' linewidth='1' z='' x2='19.099cm' stroke='(0.6,0.6,0.6)' y1='22.165cm' x1='12.073cm'/>

          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.91383216cm' x='12.327cm' font='Helvetica-Bold' size='8'
            tal:content="python: employee.getTitle()">Sébastien Robin</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.50383216cm' x='12.675cm' font='Helvetica' size='8'
            tal:content="python:employee.getDefaultAddress().getStreetAddress()">11, rue des chaudrons</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='25.22266432cm' x='12.675cm' font='Helvetica' size='8'
            tal:content="python:employee.getDefaultAddress().getZipCode() + ' ' + employee.getDefaultAddress().getCity()">59300 Valenciennes</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='24.29683216cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'N°Secu.Soc. : %s' % employee.getSocialCode()">N°Secu.Soc. : 1 80 04 85 047 027 25</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='23.58583216cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Emploi : %s' % employee.getDefaultCareerTitle()">Emploi : Directeur Technique</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='23.30466432cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Qualification : %s' % employee.getCareerGrade().split('/')[-1:][0]">Qualification : ingenieur</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='23.02349648cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Echelon : %s' % employee.getDefaultCareerSalaryLevel()">Echelon : 1</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='22.74232864cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Coefficient : %s' % employee.getDefaultCareerSalaryCoefficient()">Coefficient : 1</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='21.75683216cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Période : du %s au %s' % (start_date, here.getStopDate())">Période : du 2003/11/01 au 2003/11/30</infostring>
          <infostring z='' color='(0.0,0.0,0.0)' align='left' y='21.47566432cm' x='12.327cm' font='Helvetica' size='8'
            tal:content="python: 'Date de paiement : %s' % here.getTargetStopDate()">Date de paiement : 2003/11/04</infostring>
        </tal:block>

        <line y2='1.506cm' linewidth='1' z='' x2='19.075cm' stroke='(0.6,0.6,0.6)' y1='1.506cm' x1='1.905cm'/>
        <infostring z='' color='(0.0,0.0,0.0)' align='center' y='1.00183216cm' x='10.4855cm' font='Helvetica' size='8'>Dans votre intérêt et pour vous aider à faire valoir vos droits, conservez ce bulletin de paie sans limitation de durée.</infostring>
      </static>
      <frame showBoundary='0' leftpadding='0.1cm' height='18.74cm' width='19.701cm' rightpadding='0.1cm' y='1.689cm' x='0.635cm' nextid='content' toppadding='0.2cm' id='content' bottompadding='0.5cm'/>
    </pagetemplate>
  </template>
</tal:block>