{% if contrat is not defined %}
{% set contrat = contrat_vierge %}
{% endif %}
{% if app_logo is not defined %}
{% set app_logo = societe.logo_path %}
{% endif %}
{% set salarie = contrat.getSalarie %}
{% set infos = salarie.getInfoSalarie %}
{% set adresse_ligne_1 = '' %}
{% set adresse_ligne_2 = '' %}
{% set adresse_code_postal = '' %}
{% set adresse_ville = '' %}
{% if salarie.serializeAdresse is not empty %}
{% set adresse_ligne_1 = salarie.serializeAdresse[0].ligne_1 %}
{% set adresse_ligne_2 = salarie.serializeAdresse[0].ligne_2 %}
{% set adresse_code_postal = salarie.serializeAdresse[0].code_postal %}
{% set adresse_ville = salarie.serializeAdresse[0].ville %}
{% endif %}
{% set moisList = ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"] %}
{% set now = "now"|date("Y") %}
{% set dateDeb = now - 2 %}
{% set dateFin = dateDeb + 5 %}
<input class="id-contrat" type="number" value="{% if contrat.getId is not null %}{{ contrat.getId }}{% else %}0{% endif %}" style="display: none">
<input class="id-projet" type="number" value="{{ contrat.getIdProjet }}" style="display: none">
<input class="id-salarie" type="number" value="{% if contrat.getId is not null %}{{ salarie.getId }}{% else %}0{% endif %}" style="display: none">
<div class="row font-boston">
<div class="col-12 col-sm-12 col-md-12 col-lg-10">
<div class="card card-bordered">
<div class="card-header">
<div class="row">
<div class="col-12 text-center">
<h5>FICHE DE RENSEIGNEMENT SALARIE</h5>
</div>
</div>
<div class="col-12">
<div class="row">
<div class="col-6">
<img class="brand-logo" alt="logo-societe" src="{{ asset('build/images/logo/' ~ app_logo ) }}" height="80">
<p>{{ societe.rue }} - {{ societe.code_postal }} {{ societe.ville }}</p>
<p>{{ societe.telephone }}</p>
<p>{{ societe.site_web }}</p>
</div>
</div>
<div class="row mt-1">
<div class="col-3">
<p>Numéro de production :</p>
</div>
<div class="col-9">
<strong>{{ projet.getNumProd }}</strong>
</div>
</div>
<div class="row">
<div class="col-3">
<p>Numéro objet ASSEDIC :</p>
</div>
<div class="col-9">
<strong>{{ projet.getNumAdministratif }}</strong>
</div>
</div>
<div class="row">
<div class="col-3">
<p>Site emploi :</p>
</div>
<div class="col-9">
<strong>Paris</strong>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center">INFORMATIONS PERSONNELLES DU SALARIE</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="card-body">
<div class="row">
<div class="col-8">
<div class="row">
<div class="col-4">
<p>Nom :</p>
</div>
<div class="col-8">
<strong class="label-nom-salarie">{{ salarie.getNomTiers }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Prénom :</p>
</div>
<div class="col-8">
<strong class="label-prenom-salarie">{{ salarie.getPrenomTiers }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Téléphone :</p>
</div>
<div class="col-8">
<strong class="label-telephone-salarie">{{ salarie.getTelPortableTiers }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Email :</p>
</div>
<div class="col-8">
<strong class="label-email-salarie">{{ salarie.getEmailTiers }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Adresse :</p>
</div>
<div class="col-8">
<strong class="label-ligne-1-adresse">{{ adresse_ligne_1 }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Complément :</p>
</div>
<div class="col-8">
<strong class="label-ligne-2-adresse">{{ adresse_ligne_2 }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Code postal :</p>
</div>
<div class="col-8">
<strong class="label-cp-adresse">{{ adresse_code_postal }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Ville :</p>
</div>
<div class="col-8">
<strong class="label-ville-adresse">{{ adresse_ville }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Pays / Nationalite :</p>
</div>
<div class="col-8">
<strong class="label-nationalite-salarie">{{ infos.getNationalite }}</strong>
</div>
</div>
<div class="row mt-1">
<div class="col-4">
<p>Situation familiale :</p>
</div>
<div class="col-8">
<strong class="label-situation-familiale-salarie">{{ infos.getSituationFamiliale }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Numéro sécurité sociale :</p>
</div>
<div class="col-8">
<strong class="label-num-secu-salarie">{{ infos.getNumSecuSociale }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Date de naissance :</p>
</div>
<div class="col-8">
<strong class="label-date-naissance-salarie">{{ infos.getDateNaissance }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Lieu de naissance :</p>
</div>
<div class="col-8">
<strong class="label-lieu-naissance-salarie">{{ infos.getNationalite }}</strong>
</div>
</div>
<div class="row mt-1">
<div class="col-4">
<p>Fonction :</p>
</div>
<div class="col-8">
<strong class="label-fonction-salarie">{{ infos.getFonction }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Statut :</p>
</div>
<div class="col-8">
<strong class="label-statut-cadre-salarie">{% if infos.getStatutCadre == '0' %}non cadre{% elseif infos.getStatutCadre == '1' %}cadre{% endif %}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Numéro congés spectacle :</p>
</div>
<div class="col-8">
<strong class="label-num-conges-spectacle-salarie">{{ infos.getNumCongesSpectacle }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Numéro carte de séjour :</p>
</div>
<div class="col-8">
<strong class="label-num-carte-sejour-salarie">{{ infos.getNumCarteSejour }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Numéro carte de presse :</p>
</div>
<div class="col-8">
<strong class="label-num-carte-presse-salarie">{{ infos.getNumCartePresse }}</strong>
</div>
</div>
<div class="row">
<div class="col-4">
<p>Visite médicale :</p>
</div>
<div class="col-8">
<strong class="label-date-visite-medicale-salarie">{{ infos.getDateVisiteMedicale }}</strong>
</div>
</div>
</div>
<div class="col-4">
{% if contrat.getId is null %}
<div class="row">
<div class="col-12 mt-1 mt-sm-0">
<div class="form-group">
<label>Salarié</label>
<fieldset class="form-group">
<select class="select2 select-salarie-contrat form-control select2-hidden-accessible"
style="width: 100%"
autocomplete="off"
>
</select>
</fieldset>
</div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-12 mt-1 mt-sm-0">
<div class="form-group">
<label>Charges</label>
<fieldset class="form-group">
<select class="select2 select-charges-contrat form-control select2-hidden-accessible" style="width: 100%">
<option value="67" {% if contrat.getId is not null and contrat.getCharge == 67 %}selected{% else %}selected{% endif %}>67%</option>
<option value="60" {% if contrat.getId is not null and contrat.getCharge == 60 %}selected{% endif %}>60% (Comédiens)</option>
<option value="1" {% if contrat.getId is not null and contrat.getCharge == 1 %}selected{% endif %}>1% (Droits d'auteurs)</option>
</select>
</fieldset>
</div>
</div>
</div>
<div class="row">
<div class="col-12 mt-1 mt-sm-0">
<div class="form-group">
<label>Description</label>
<fieldset class="form-group">
<textarea class="form-control description-contrat" rows="11">{{ contrat.getDescription }}</textarea>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center" colspan="31">JOUR(S) TRAVAILLE(S) & SALAIRE JOURNALIER</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="10">Mois :</td>
<td colspan="6">
<select class="select-mois-contrat" style="border: 0; border-bottom: 1px solid lightgrey;">
{% for i in 1..12%}
<option value="{{ "%02d"|format(i) }}"
{% if contrat.getMois is null %}
{% if "%02d"|format(i) == "now"|date("m") %} selected {% endif %}
{% else %}
{% if i == contrat.getMois %} selected {% endif %}
{% endif %}
>{{ "%02d"|format(i) }} - {{ moisList[i-1] }}</option>
{% endfor %}
</select>
</td>
<td colspan="10">Annee :</td>
<td colspan="5">
<select type="text" class="select-annee-contrat" style="border: 0; border-bottom: 1px solid lightgrey; width: 100%;">
{% if contrat.getAnnee is null %}
{% for y in dateDeb..dateFin %}
<option value="{{ y }}" {% if y == "now"|date("Y") %} selected {% endif %} >{{ y }}</option>
{% endfor %}
{% else %}
{% for y in (contrat.getAnnee-2)..dateFin %}
<option value="{{ y }}" {% if y == contrat.getAnnee %} selected {% endif %}>{{ y }}</option>
{% endfor %}
{% endif %}
</select>
</td>
</tr>
<tr class="tr-libelle-jour">
{% set semaine = ['dim.','lun.','mar.','mer.','jeu.','ven.','sam.'] %}
{% if contrat.getListeDatePointage is empty %}
{% for i in 1..31 %}
{% set w = date(("now"|date('Y-m-') ~ "%02d"|format(i))).format('w') %}
{% set background = '' %}
{% if w == 0 or w == 6 %}
{% set background = 'background-color: lightgrey;' %}
{% endif %}
<td class="text-center" style="padding: 10px 2px; {{ background }}">{{ semaine[w] }}</td>
{% endfor %}
{% else %}
{% for i in 1..31 %}
{% set w = date( contrat.getAnnee ~'-'~ contrat.getMois ~'-'~ "%02d"|format(i)).format('w') %}
{% set background = '' %}
{% if w == 0 or w == 6 %}
{% set background = 'background-color: lightgrey;' %}
{% endif %}
<td class="text-center" style="padding: 10px 2px; {{ background }}">{{ semaine[w] }}</td>
{% endfor %}
{% endif %}
</tr>
<tr class="tr-date-jour">
{% if contrat.getListeDatePointage is empty %}
{% for i in 1..31 %}
<td class="td-jour text-center"
style="
padding: 10px 2px;
cursor: pointer;
"
data-selected="false"
data-timestamp="{{ date(("now"|date('Y-m-') ~ "%02d"|format(i))).format('U') }}"
>{{ "%02d"|format(i) }}</td>
{% endfor %}
{% else %}
{% for i in 1..31 %}
{% set timestamp = date( contrat.getAnnee ~'-'~ contrat.getMois ~'-'~ "%02d"|format(i)).format('U') %}
{% set selected = false %}
{% if timestamp in contrat.getListeDatePointage %}
{% set selected = true %}
{% endif %}
<td class="td-jour text-center"
style="
padding: 10px 2px;
cursor: pointer;
{% if selected == true %}
background-color: #2F2F2E;
color: white;
{% endif %}
"
data-selected="{{ selected }}"
data-timestamp="{{ timestamp }}"
>{{ "%02d"|format(i) }}</td>
{% endfor %}
{% endif %}
</tr>
<tr>
<td colspan="10">Salaire journalier :</td>
<td colspan="6">
<input type="text" class="input-salaire-jour-contrat"
style="border: 0; border-bottom: 1px solid lightgrey; width: 100%;"
autocomplete="off"
value="{{ contrat.getTarifJour }}"/>
</td>
<td colspan="10">Nombre d'heures par jour :</td>
<td colspan="5">
<input type="text" class="input-nb-heure-contrat"
style="border: 0; border-bottom: 1px solid lightgrey; width: 100%;"
autocomplete="off"
value="{{ contrat.getHeureParJour }}"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-12">
<div class="table-responsive">
<table class="table table-bordered mb-0">
<thead>
<tr>
<th class="text-center" colspan="3">RECAPITULATIF</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">Nombre de jour(s)</td>
<td class="text-center">Nombre d'heures</td>
<td class="text-center">Salaire total</td>
</tr>
<tr>
<td class="text-center label-nb-jour-contrat">{{ contrat.getNbJourPointage }}</td>
<td class="text-center label-nb-heure-contrat">{{ contrat.getNbJourPointage * contrat.getHeureParJour }}</td>
<td class="text-center label-salaire-contrat">{{ contrat.getNbJourPointage * contrat.getTarifJour }}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead>
<tr>
<th class="text-center" style="width: 50%;">SIGNATURE DE L'INTERESSE</th>
<th class="text-center" style="width: 50%;">SIGNATURE DE LA PRODUCTION</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center">
{{ salarie.getNomTiers }} {{ salarie.getPrenomTiers }}
</td>
<td class="text-center">
<img alt="signature" src="{{ asset('build/images/signature/' ~ societe.signature_filename ) }}" height="80">
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card-footer text-center">
<p>
{{ societe.lib_societe }}, {{ societe.rue }} - {{ societe.code_postal }} {{ societe.ville }}<br>
{{ societe.statut }} au capital de {{ societe.capital }} Euros /
Code APE - {{ societe.code_ape }} /
{{ societe.registre_commerce }} {{ societe.siret }}
</p>
</div>
</div>
</div>
<div class="col-12 col-sm-12 col-md-12 col-lg-2">
<div class="card card-bordered">
<div class="card-body">
<button type="button" class="btn btn-primary btn-back-contrat btn-block" style="display: none">Retour</button>
<button type="button" class="btn btn-primary btn-print-contrat btn-block" data-id-contrat="{{ contrat.getId }}">Imprimer</button>
<button type="button" class="btn btn-danger btn-cancel-contrat btn-block">{{ label_btn_cancel }}</button>
<button type="button" class="btn btn-success btn-save-contrat btn-block">Sauvegarder</button>
</div>
</div>
</div>
</div>