Subversion Repositories Applications.gtt

Compare Revisions

No changes between revisions

Ignore whitespace Rev 109 → Rev 110

/trunk/documentation/gtt_v4.xml
554,6 → 554,11
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1787" ColName="gp_duree_finance" PrevColName="" Pos="9" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="Dur\195\169e en jour financ\195\169 pour le projet.">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1459" ColName="gp_avancement" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="Pourcentage d\aavancement du projet.">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
711,11 → 716,51
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1489" ColName="gu_temps_de_travail" PrevColName="" Pos="13" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
<COLUMN ID="1489" ColName="gu_temps_de_travail_jour" PrevColName="gu_temps_de_travail" Pos="13" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1789" ColName="gu_temps_de_travail_mois" PrevColName="" Pos="23" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1779" ColName="gu_tdt_lundi" PrevColName="" Pos="16" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1780" ColName="gu_tdt_mardi" PrevColName="" Pos="17" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1781" ColName="gu_tdt_mercredi" PrevColName="" Pos="18" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1782" ColName="gu_tdt_jeudi" PrevColName="" Pos="19" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1783" ColName="gu_tdt_vendredi" PrevColName="" Pos="20" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1784" ColName="gu_tdt_samedi" PrevColName="" Pos="21" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1785" ColName="gu_tdt_dimanche" PrevColName="" Pos="22" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments="">
<OPTIONSELECTED>
<OPTIONSELECT Value="0" />
</OPTIONSELECTED>
</COLUMN>
<COLUMN ID="1490" ColName="gu_mark_admin" PrevColName="" Pos="14" idDatatype="22" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments="">
<OPTIONSELECTED>
</OPTIONSELECTED>
/trunk/documentation/gtt_maj_001.sql
New file
0,0 → 1,9
ALTER TABLE `gestion_projet` ADD `gp_duree_finance` FLOAT NOT NULL AFTER `gp_duree_prevue` ;
 
ALTER TABLE `gestion_utilisateur` ADD `gu_tdt_lundi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_temps_de_travail_mois` ,
ADD `gu_tdt_mardi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_lundi` ,
ADD `gu_tdt_mercredi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_mardi` ,
ADD `gu_tdt_jeudi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_mercredi` ,
ADD `gu_tdt_vendredi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_jeudi` ,
ADD `gu_tdt_samedi` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_vendredi` ,
ADD `gu_tdt_dimanche` FLOAT NOT NULL DEFAULT '0' AFTER `gu_tdt_samedi` ;
/trunk/presentation/gestion.tpl.html
4,7 → 4,7
</div>
<div id="calendrier_gestion" class="calendrier">
<?php if ($bool_projets) : ?>
<form id="gestion" name="gestion" action="<?=$url_gestion_valider;?>" method="post">
<form class="centre" id="gestion" name="gestion" action="<?=$url_gestion_valider;?>" method="post">
<table id="tab_gestion">
<caption>
<a href="<?=$url_semaine_precedente;?>">&lt;&lt;</a>
32,7 → 32,7
</tr>
<?foreach ($projets as $projet):?>
<tr>
<td class="projet"><?=$projet['nom'];?></td>
<td class="projet" title="<?=$projet['desc'];?>"><?=$projet['nom'];?></td>
<?php foreach ($elements[$s] as $num => $jour) : ?>
<td class="<?=$jour['class'];?>"><input id="pr:<?=$projet['id'];?>:<?=$num;?>" name="pr:<?=$projet['id'];?>:<?=$num;?>" value="<?=$projet['date'][$num];?>" type="text"/></td>
<?php endforeach; ?>
63,7 → 63,7
</tr>
</tbody>
</table>
<input id="btn_valider" name="btn_valider" value="<?=$i18n_general_valider;?>" type="submit" />
<input class="btn_large" id="btn_valider" name="btn_valider" value="<?=$i18n_general_valider;?>" type="submit" />
</form>
<?php else : ?>
<p class="information">Veuillez sélectionner des projets via le menu "Gestion de mes projets".</p>
/trunk/presentation/stat_tableau_charge.tpl.html
26,49 → 26,66
<tr>
<th>Projets</th>
<?php foreach ($elements as $jour) : ?>
<th class="<?=$jour['class']?>">
<?=$jour['jour_nom']?> <?=$jour['jour']?>
</th>
<th class="<?=$jour['class']?>"><?=$jour['jour_nom']?> <?=$jour['jour']?></th>
<?php endforeach; ?>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php if (isset($projets)) : ?>
<?php $ligne = "impair"; ?>
<tr class="total">
<th>Travail</th>
<?php foreach ($elements as $jour) : ?>
<td><?=(!empty($jour['travail'])) ? $jour['travail'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=$total_w;?></td>
</tr>
<?foreach ($projets as $categorie => $pr):?>
<tr class="categories <?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
<td class="entete categories_titre"><?=$categorie;?></td>
<th class="entete categories_titre"><?=$categorie;?></th>
<?php foreach ($elements as $jour_id => $jour) : ?>
<td class="categories_total"><?=(isset($categorie_totaux[$categorie][$jour_id])) ? $categorie_totaux[$categorie][$jour_id] : "&nbsp;";?></td>
<td class="categories_total"><?=(isset($categories[$categorie][$jour_id])) ? $categories[$categorie][$jour_id] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=$categories[$categorie]['total'];?></td>
</tr>
<?foreach ($pr as $id => $projet):?>
<tr class="projets <?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
<td id="pr:<?=$id;?>" class="entete projet_nom"><?=$projet['nom'];?></td>
<th id="pr:<?=$id;?>" class="entete projet_nom" title="<?=$projet['desc'];?>"><?=$projet['nom'];?></th>
<?php foreach ($elements as $jour_id => $jour) : ?>
<td class="projet"><?=(isset($projet['duree'][$jour_id])) ? $projet['duree'][$jour_id] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=(isset($projet['total'])) ? $projet['total'] : "&nbsp;";?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if (isset($absences)) : ?>
<?php $ligne = "impair"; ?>
<tr class="absences">
<td class="entete absences_titre">Absences</td>
<?php foreach ($elements as $jour_id => $jour) : ?>
<td class="absences_total"><?=(isset($ab_total[$jour_id])) ? $ab_total[$jour_id] : "&nbsp;";?></td>
<tr class="total">
<th class="entete absences_titre">Absences</th>
<?php foreach ($elements as $jour) : ?>
<td><?=(!empty($jour['absence'])) ? $jour['absence'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=$total_a;?></td>
</tr>
<?php foreach ($absences as $ab_id => $ab_libelle) : ?>
<?php $ligne = "impair"; ?>
<?php foreach ($absences as $ab_id => $absence) : ?>
<tr class="<?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
<td id="ab:<?=$ab_id;?>" class="entete absence_nom"><?=$ab_libelle;?></td>
<th id="ab:<?=$ab_id;?>" class="entete absence_nom"><?=$absence['nom'];?></th>
<?php foreach ($elements as $jour_id => $jour) : ?>
<td class="absence"><?= (isset($ab[$ab_id][$jour_id])) ? $ab[$ab_id][$jour_id] : "&nbsp;";?></td>
<td><?= (isset($ab[$ab_id][$jour_id])) ? $ab[$ab_id][$jour_id] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=(!empty($absence['total'])) ? $absence['total'] : '&nbsp;' ;?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
<tr class="total">
<th>Total</th>
<?php foreach ($elements as $jour) : ?>
<td><?=(!empty($jour['w_et_a'])) ? $jour['w_et_a'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=$total;?></td>
</tr>
</tbody>
</table>
<?php endif; ?>
/trunk/presentation/styles/emeraude/emeraude.css
43,9 → 43,12
 
/* Présentation générale des tableaux */
table{border:1px dotted black;}
th{
thead th{
background-color:#486300;
color:white;}
tbody th{
text-align:left !important;
width:20%;}
td{text-align:center;}
tr.pair{background-color: #F1F2E7;}
caption{margin-top:1em;}
199,13 → 202,14
#connexion td{
width:50%;}
/* Tableau stats*/
tbody td.total{
width:5%;}
tr.categories,tr.absences{
height:1em;
font-size:1.2em;
text-align:left !important;
padding:1px;
margin:0 0.2em;
background-image: url('images/a2.gif');}
tr.total, tr.total th{
color:white;
font-weight:white;
background-color:#B30000;}
#tab_tps_w_mensuel_salarie{
width:100%;}
.entete{width:250px;}
215,4 → 219,10
display:inline;
float:none;
min-width:0;
font-weight:normal;}
font-weight:normal;}
#preferences .pr_no {
font-weight:bold;
width:30%;}
#preferences .pr_de {
font-size:0.8em;
text-align:left;}
/trunk/presentation/styles/disposition.css
5,8 → 5,13
body,h1,h2,p{
margin:0;
padding:0;}
legend{
margin:0 0 0 1em;}
legend{margin:0 0 0 1em;}
form {width:100%;}
label{
display:block;
float:left;
padding-right:5px;
min-width:150px;}
 
/* Disposition des éléments sur la page */
#zone_entete {
47,14 → 52,13
padding:0 0 0 5px;}
 
/* Détails */
#gestion {
width:100%;
text-align:center;}
#gestion input {width:80px;}
#gestion #btn_valider {
#gestion #btn_valider,.btn_large{
width:50%;
height:50px;
margin:5px auto;}
form.centre{
text-align:center;}
#calendrier_gestion table{
width:100%;
clear:both;}
67,11 → 71,6
#info_semaine{text-align:right;}
 
/*Formulaires*/
label{
display:block;
float:left;
padding-right:5px;
min-width:150px;}
.editer li{
display:block;
float:left;
/trunk/presentation/admin_utilisateur.tpl.html
80,6 → 80,33
<input size="3" name="ut_temps_de_travail_mois" type="text" value="<?=$Utilisateur->getTempsDeTravailMois();?>"/>
</li>
<li>
<label for="ut_tdt">Temps de travail hebdomadaire :</label>
<table id="ut_tdt">
<thead>
<tr>
<th>Lundi</th>
<th>Mardi</th>
<th>Mercredi</th>
<th>Jeudi</th>
<th>Vendredi</th>
<th>Samedi</th>
<th>Dimanche</th>
</tr>
</thead>
<tbody>
<tr>
<td><input size="3" name="ut_tdt_lundi" type="text" value="<?=$Utilisateur->getTdtLundi();?>"/></td>
<td><input size="3" name="ut_tdt_mardi" type="text" value="<?=$Utilisateur->getTdtMardi();?>"/></td>
<td><input size="3" name="ut_tdt_mercredi" type="text" value="<?=$Utilisateur->getTdtMercredi();?>"/></td>
<td><input size="3" name="ut_tdt_jeudi" type="text" value="<?=$Utilisateur->getTdtJeudi();?>"/></td>
<td><input size="3" name="ut_tdt_vendredi" type="text" value="<?=$Utilisateur->getTdtVendredi();?>"/></td>
<td><input size="3" name="ut_tdt_samedi" type="text" value="<?=$Utilisateur->getTdtSamedi();?>"/></td>
<td><input size="3" name="ut_tdt_dimanche" type="text" value="<?=$Utilisateur->getTdtDimanche();?>"/></td>
</tr>
</tbody>
</table>
</li>
<li>
<label for="ut_quota_heures_sup">Heures supplémentaires initiales :</label>
<input size="3" name="ut_quota_heures_supp" type="text" value="<?=$Utilisateur->getQuotaHeuresSupp();?>"/>
</li>
/trunk/presentation/stat_tableau_global.tpl.html
16,17 → 16,24
<tbody>
<?php $ligne = "impair"; ?>
<?php if ($categories) : ?>
<tr class="total">
<th>Travail</th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td><?=(isset($utilisateur['total_w'])) ? $utilisateur['total_w'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td class="total"><?=$total_projets;?></td>
</tr>
<?foreach ($categories as $idc => $categorie):?>
<tr class="categories">
<td class="categories_titre"><?=$categorie['nom'];?></td>
<th class="categories_titre"><?=$categorie['nom'];?></th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td class="categories_total"><?=(isset($utilisateur['projets'][$idc]['total'])) ? $utilisateur['projets'][$idc]['total'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td><?=$categorie['total'];?></td>
<td class="total"><?=$categorie['total'];?></td>
</tr>
<?foreach ($categorie['projets'] as $idp => $projet):?>
<tr class="utilisateur <?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
<td id="pr:<?=$idp;?>" class="projet_nom"><?=$projet['nom'];?></td>
<th id="pr:<?=$idp;?>" title="<?=$projet['desc'];?>"><?=$projet['nom'];?></th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td class="projet"><?=(isset($utilisateur['projets'][$idc][$idp])) ? $utilisateur['projets'][$idc][$idp]['duree'] : "&nbsp;";?></td>
<?php endforeach; ?>
34,25 → 41,18
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<tr class="total">
<td>Total travail</td>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td><?=(isset($utilisateur['total_w'])) ? $utilisateur['total_w'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td><?=$total_projets;?></td>
</tr>
<?php endif; ?>
<?php if ($absences) : ?>
<tr class="absences">
<td class="absences_titre">Absences</td>
<tr class="total">
<th class="absences_titre">Absences</th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td class="absences_total"><?=$utilisateur['total_a'];?></td>
<td><?=$utilisateur['total_a'];?></td>
<?php endforeach; ?>
<td><?=$total_absences;?></td>
<td class="total"><?=$total_absences;?></td>
</tr>
<?php foreach ($absences as $ida => $absence) : ?>
<tr class="utilisateur <?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
<td id="ab:<?=$ida;?>" class="absence_nom"><?=$absence['nom'];?></td>
<th id="ab:<?=$ida;?>" class="absence_nom"><?=$absence['nom'];?></th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td class="absence"><?= (isset($utilisateur['ab'][$ida])) ? $utilisateur['ab'][$ida] : "&nbsp;";?></td>
<?php endforeach; ?>
61,11 → 61,11
<?php endforeach; ?>
<?php endif; ?>
<tr class="total">
<td>Total</td>
<th>Total</th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td><?=(isset($utilisateur['total'])) ? $utilisateur['total'] : "&nbsp;";?></td>
<?php endforeach; ?>
<td><?=$total_absences_projets;?></td>
<td class="total"><?=$total_absences_projets;?></td>
</tr>
</tbody>
</table>
/trunk/presentation/images/pixels/vide.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/presentation/images/pixels/vide.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/presentation/images/pixels/avancement.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/presentation/images/pixels/avancement.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/bibliotheque/metier/Utilisateur.class.php
68,7 → 68,14
private $quota_heures_supp = 0;
private $conges_payes = 0;
private $temps_de_travail_jour = 7;
private $temps_de_travail_mois = 0;
private $temps_de_travail_mois = 0;
private $tdt_lundi = 0;
private $tdt_mardi = 0;
private $tdt_mercredi = 0;
private $tdt_jeudi = 0;
private $tdt_vendredi = 0;
private $tdt_samedi = 0;
private $tdt_dimanche = 0;
private $mark_admin = 0;
private $mark_recapitulatif = 1;
private $notes;
94,6 → 101,13
'gu_conges_payes' => 'conges_payes',
'gu_temps_de_travail_jour' => 'temps_de_travail_jour',
'gu_temps_de_travail_mois' => 'temps_de_travail_mois',
'gu_tdt_lundi' => 'tdt_lundi',
'gu_tdt_mardi' => 'tdt_mardi',
'gu_tdt_mercredi' => 'tdt_mercredi',
'gu_tdt_jeudi' => 'tdt_jeudi',
'gu_tdt_vendredi' => 'tdt_vendredi',
'gu_tdt_samedi' => 'tdt_samedi',
'gu_tdt_dimanche' => 'tdt_dimanche',
'gu_mark_admin' => 'mark_admin',
'gu_mark_recapitulatif' => 'mark_recapitulatif',
'gu_notes' => 'notes');
245,6 → 259,76
$this->temps_de_travail_mois = $tdt;
}
 
// Tdt Lundi
public function getTdtLundi()
{
return $this->tdt_lundi;
}
public function setTdtLundi( $tdt )
{
$this->tdt_lundi = $tdt;
}
 
// Tdt Mardi
public function getTdtMardi()
{
return $this->tdt_mardi;
}
public function setTdtMardi( $tdt )
{
$this->tdt_mardi = $tdt;
}
// Tdt Mercredi
public function getTdtMercredi()
{
return $this->tdt_mercredi;
}
public function setTdtMercredi( $tdt )
{
$this->tdt_mercredi = $tdt;
}
// Tdt Jeudi
public function getTdtJeudi()
{
return $this->tdt_jeudi;
}
public function setTdtJeudi( $tdt )
{
$this->tdt_jeudi = $tdt;
}
 
// Tdt Vendredi
public function getTdtVendredi()
{
return $this->tdt_vendredi;
}
public function setTdtVendredi( $tdt )
{
$this->tdt_vendredi = $tdt;
}
// Tdt Samedi
public function getTdtSamedi()
{
return $this->tdt_samedi;
}
public function setTdtSamedi( $tdt )
{
$this->tdt_samedi = $tdt;
}
 
// Tdt Dimanche
public function getTdtDimanche()
{
return $this->tdt_dimanche;
}
public function setTdtDimanche( $tdt )
{
$this->tdt_dimanche = $tdt;
}
 
// Mark Admin
public function getMarkAdmin()
{
345,28 → 429,28
/**augmenter le nombre d'heure sup
*un acces est fait a la bse de donnees pour enregistrer les changements en temps reel
*/
function augmenterQuotaHeuresSup($nb)
public function augmenterQuotaHeuresSup($nb)
{
$this->quota_heures_supp = $this->quota_heures_supp + $nb;
$this->quota_heures_supp = $this->quota_heures_supp + abs($nb);
}
 
/**diminuer le nb d'heures sup*/
public function diminuerQuotaHeuresSup($nb)
{
$this->quota_heures_supp = $this->quota_heures_supp - $nb;
$this->quota_heures_supp = $this->quota_heures_supp - abs($nb);
/*un quota heure supp negatif implique qu'il y a des heures a rattraper*/
}
 
/**augmenter le nombre de jours de conges */
function augmenterCongesPayes($nb)
public function augmenterCongesPayes($nb)
{
$this->conges_payes = $this->conges_payes + $nb;
$this->conges_payes = $this->conges_payes + abs($nb);
}
 
/**diminuer le nombre de jour de conges */
function diminuerCongesPayes($nb)
public function diminuerCongesPayes($nb)
{
$this->conges_payes = $this->conges_payes - $nb;
$this->conges_payes = $this->conges_payes - abs($nb);
}
}
 
/trunk/bibliotheque/metier/aGttSql.class.php
244,6 → 244,15
}
}
/** Mettre à NULL les champs de l'objet*/
public function initialiser()
{
foreach ($this->getCorrespondance() as $champ => $attribut) {
$methode = $this->donnerMethodeGetAvecAttribut($attribut);
$this->$methode(null);
}
}
/** Afficher l'objet courrant. */
public function afficher()
{
/trunk/actions/GttCtrlActionGestion.class.php
174,6 → 174,7
'id' => $Projet->getIdProjet(),
'valeur' => $Projet->getIdProjet(),
'nom' => $Projet->getNom(),
'desc' => $Projet->getDescription(),
'date' => $aso_tps_w);
248,24 → 249,26
$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_semaine[1]['mysql'], $aso_semaine[7]['mysql']);
$tab_tp = $TravailProjet->consulter($cmd, $param);
 
// Récupération des infos sur l'utilisateur courrant
$tps_w_jour = $GLOBALS['_GTT_']['Utilisateur']->getTempsDeTravailJour();
// Création d'un utilisateur pour les mises à jour des CP et RTT
$Utilisateur = new Utilisateur();
$Utilisateur->initialiser();
$Utilisateur->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
$Utilisateur->setQuotaHeuresSupp($GLOBALS['_GTT_']['Utilisateur']->getQuotaHeuresSupp());
$Utilisateur->setCongesPayes($GLOBALS['_GTT_']['Utilisateur']->getCongesPayes());
$Utilisateur->setTempsDeTravailJour(null);
$Utilisateur->setTempsDeTravailMois(null);
$Utilisateur->setMarkAdmin(null);
$Utilisateur->setMarkRecapitulatif(null);
 
// Initialisation de la variable pour la gestion des heures sup
$jours_w_semaine = array_flip(explode(',', GTT_SEMAINE_JOUR_W_NBRE));
$jours_w_semaine = array('1' => 'lundi', '2' => 'mardi','3' => 'mercredi', '4' => 'jeudi', '5' => 'vendredi', '6' => 'samedi', '7' => 'dimanche');
foreach ($jours_w_semaine as $c => $v) {
$jours_w_semaine[$c] = array('act' => 0, 'pre' => 0, 'act_a' => 0, 'pre_a' => 0, 'mod' => false);
$methode = 'getTdt'.ucfirst($v);
trigger_error(print_r($methode, true), E_USER_NOTICE);
$jours_w_semaine[$c] = array( 'act' => 0,
'pre' => 0,
'act_a' => 0,
'pre_a' => 0,
'mod' => false,
'tdt' => $GLOBALS['_GTT_']['Utilisateur']->$methode());
}
 
trigger_error('ici'.print_r($jours_w_semaine, true), E_USER_NOTICE);
// Ajout ou Mise à jour des durées de travail
if (isset($_POST['pr'])) {
foreach($_POST['pr'] as $projet_id => $jours) {
412,8 → 415,8
// Gestion de la mise à jour des heures sup
foreach ($jours_w_semaine as $c => $j) {
if (($j['pre'] != 0 || $j['act'] != 0) ) {// Modification sur le temps travaillé pour le jour courant
$heure_sup_pre = $j['pre'] - ($tps_w_jour - $j['pre_a']);// -7 = 0 - 7
$heure_sup_act = $j['act'] - ($tps_w_jour - $j['act_a']);// -5 = 2 - 7
$heure_sup_pre = $j['pre'] - ($j['tdt'] - $j['pre_a']);// -7 = 0 - 7
$heure_sup_act = $j['act'] - ($j['tdt'] - $j['act_a']);// -5 = 2 - 7
$heure_sup_dif = $heure_sup_act - $heure_sup_pre ;// 2 = -5 - -7
if ($j['mod'] == false) {// Première fois que l'on modifie le jour
if ($heure_sup_act < 0) {
/trunk/actions/GttCtrlActionStatTableauGlobal.class.php
107,7 → 107,9
'nom' => $Categorie->getLibelle(),
'total' => 0);
}
$aso_stat['categories'][$Categorie->getIdCategorie()]['projets'][$Projet->getIdProjet()]['nom'] = $Projet->getNom();
$aso_stat['categories'][$Categorie->getIdCategorie()]['projets'][$Projet->getIdProjet()] =
array( 'nom' => $Projet->getNom(),
'desc' => $Projet->getDescription());
foreach ($tab_tp as $TP) {
if ($TP->getIdProjet() == $Projet->getIdProjet()) {
/trunk/actions/GttCtrlActionAdminUtilisateur.class.php
130,6 → 130,15
$aso_admin_utilisateur['messages'][] = 'Il est impossible que le temps de travail soit supérieur à 24h !';
$bool = false;
}
$aso_champs_tdt = array('ut_tdt_lundi' => 'Lundi', 'ut_tdt_mardi' => 'Mardi', 'ut_tdt_mercredi' => 'Mercredi',
'ut_tdt_jeudi' => 'Jeudi', 'ut_tdt_vendredi' => 'Vendredi', 'ut_tdt_samedi' => 'Samedi',
'ut_tdt_dimanche' => 'Dimanche');
foreach ($aso_champs_tdt as $champ_id => $libelle) {
if ($_POST[$champ_id] > $_POST['ut_temps_de_travail_jour']) {
$aso_admin_utilisateur['messages'][] = "Le champ temps de travail du $libelle ne doit pas être supérieur à la durée maximum du temps de travail journalier !";
$bool = false;
}
}
$aso_champs_obligatoires = array('ut_nom' => 'Nom', 'ut_prenom' => 'Prénom', 'ut_email' => 'Courriel', 'ut_mot_de_passe' => 'Mot de passe');
foreach ($aso_champs_obligatoires as $champ_id => $libelle) {
if (empty($_POST[$champ_id])) {
185,6 → 194,13
$Utilisateur->setCongesPayes($_POST['ut_conges_payes']);
$Utilisateur->setTempsDeTravailJour($_POST['ut_temps_de_travail_jour']);
$Utilisateur->setTempsDeTravailMois($_POST['ut_temps_de_travail_mois']);
$Utilisateur->setTdtLundi($_POST['ut_tdt_lundi']);
$Utilisateur->setTdtMardi($_POST['ut_tdt_mardi']);
$Utilisateur->setTdtMercredi($_POST['ut_tdt_mercredi']);
$Utilisateur->setTdtJeudi($_POST['ut_tdt_jeudi']);
$Utilisateur->setTdtVendredi($_POST['ut_tdt_vendredi']);
$Utilisateur->setTdtSamedi($_POST['ut_tdt_samedi']);
$Utilisateur->setTdtDimanche($_POST['ut_tdt_dimanche']);
$Utilisateur->setQuotaHeuresSupp($_POST['ut_quota_heures_supp']);
if (!isset($_POST['ut_mark_admin'])) {
$_POST['ut_mark_admin'] = 0;
216,6 → 232,14
$Utilisateur->setCongesPayes($_POST['ut_conges_payes']);
$Utilisateur->setTempsDeTravailJour($_POST['ut_temps_de_travail_jour']);
$Utilisateur->setTempsDeTravailMois($_POST['ut_temps_de_travail_mois']);
$Utilisateur->setTdtLundi($_POST['ut_tdt_lundi']);
$Utilisateur->setTdtMardi($_POST['ut_tdt_mardi']);
$Utilisateur->setTdtMercredi($_POST['ut_tdt_mercredi']);
$Utilisateur->setTdtJeudi($_POST['ut_tdt_jeudi']);
$Utilisateur->setTdtVendredi($_POST['ut_tdt_vendredi']);
$Utilisateur->setTdtSamedi($_POST['ut_tdt_samedi']);
$Utilisateur->setTdtDimanche($_POST['ut_tdt_dimanche']);
$Utilisateur->setQuotaHeuresSupp($_POST['ut_quota_heures_supp']);
if (!isset($_POST['ut_mark_admin'])) {
$_POST['ut_mark_admin'] = 0;
/trunk/actions/GttCtrlActionStatTableauCharge.class.php
9,7 → 9,10
 
public function executer()
{
$aso_stat = array();
//+-------------------------------------------------------------------------------------------------+
// GESTION D'INFO GLOBALES
//+-------------------------------------------------------------------------------------------------+
$aso_stat = array('total_w' => 0,'total_a' => 0, 'total' => 0);
$this->getRegistre()->setTitre('Plan de charge');
 
//+-------------------------------------------------------------------------------------------------+
69,7 → 72,7
foreach ($tab_semaine_jours as $num => $Day) {
// Nous prenons en compte uniquement les jours du mois courant
if ($Day->thisMonth() == $_GET['mois']) {
$element = array();
$element = array('travail' => 0, 'absence' => 0, 'w_et_a' => 0);
$element['jour'] = $Day->thisDay();
$element['jour_nom'] = $Calendrier->getNomJours($num);
$element['class'] = 'jour';
144,18 → 147,38
$j = date('Y-m-d', strtotime($TP->getIdDateTravail()));
if ($TP->getIdProjet() == $Projet->getIdProjet()) {
// Récupération des infos sur les catégories
if (!isset($aso_stat['categorie_totaux'][$Categorie->getLibelle()][$j])) {
$aso_stat['categorie_totaux'][$Categorie->getLibelle()][$j] = 0;
if (!isset($aso_stat['categories'][$Categorie->getLibelle()][$j])) {
$aso_stat['categories'][$Categorie->getLibelle()][$j] = 0;
}
$aso_stat['categorie_totaux'][$Categorie->getLibelle()][$j] += $TP->getDuree();
$aso_stat['categories'][$Categorie->getLibelle()][$j] += $TP->getDuree();
if (!isset($aso_stat['categories'][$Categorie->getLibelle()]['total'])) {
$aso_stat['categories'][$Categorie->getLibelle()]['total'] = 0;
}
$aso_stat['categories'][$Categorie->getLibelle()]['total'] += $TP->getDuree();
// Récupération du total de travail
$aso_stat['total_w'] += $TP->getDuree();
// Récupération du total de temps global (travail+absence)
$aso_stat['total'] += $TP->getDuree();
// Récupération d'info sur le temps travaillé
$aso_stat['elements'][$j]['travail'] += $TP->getDuree();
 
// Récupération du total travail + absence par jour
$aso_stat['elements'][$j]['w_et_a'] += $TP->getDuree();
// Récupération des infos sur les projets
if (!isset($aso_stat['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()])) {
$aso_stat['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()] = array(
'id' => $Projet->getIdProjet(),
'nom' => $Projet->getNom(),
'duree' => array());
'desc' => $Projet->getDescription(),
'duree' => array(),
'total' => 0);
}
$aso_stat['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()]['duree'][$j] = $TP->getDuree();
$aso_stat['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()]['total'] += $TP->getDuree();
}
}
}
181,19 → 204,34
$aso_stat['ab_total'] = '';
if ($tab_am) {
foreach ($tab_am as $AM) {
$aso_stat['absences'][$AM->getIdAbsenceMotif()] = $AM->getLibelle();
//$aso_gestion['ab'][$AM->getIdAbsenceMotif()] = 0;
// Initialisation du tableau des types d'absences
$aso_stat['absences'][$AM->getIdAbsenceMotif()]['nom'] = $AM->getLibelle();
if (!isset($aso_stat['absences'][$AM->getIdAbsenceMotif()]['total'])) {
$aso_stat['absences'][$AM->getIdAbsenceMotif()]['total'] = 0;
}
 
if ($tab_a) {
foreach ($tab_a as $A) {
if ($A->getIdAbsenceMotif() == $AM->getIdAbsenceMotif() && $A->getDuree() != 0) {
$j = date('Y-m-d', strtotime($A->getIdDateAbsence()));
 
// Récupération des infos sur les absences
$aso_stat['ab'][$AM->getIdAbsenceMotif()][$j] = $A->getDuree();
// Récupération du total des absences par jour
$aso_stat['elements'][$j]['absence'] += $A->getDuree();
// Récupération du total travail + absence par jour
$aso_stat['elements'][$j]['w_et_a'] += $A->getDuree();
 
// Récupération du total pour chaque type d'absence
$aso_stat['absences'][$AM->getIdAbsenceMotif()]['total'] += $A->getDuree();
 
// Récupération du total des absences
if (!isset($aso_stat['ab_total'][$j])) {
$aso_stat['ab_total'][$j] = 0;
}
$aso_stat['ab_total'][$j] += $A->getDuree();
$aso_stat['total_a'] += $A->getDuree();
// Récupération du total de temps global (travail+absence)
$aso_stat['total'] += $A->getDuree();
}
}
}
203,8 → 241,7
$aso_stat['messages'][] = 'Aucune absence de mentionnée en '.$aso_stat['mois']['mois'].' '.$aso_stat['mois']['annee'];
}
trigger_error('<pre>'.print_r($aso_stat, true).'</pre>', E_USER_NOTICE);
//trigger_error('<pre>'.print_r($aso_stat, true).'</pre>', E_USER_NOTICE);
$this->getRegistre()->ajouterDonnee('stat_tableau_charge', $aso_stat);
}
}
/trunk/gtt_config.inc.php
55,8 → 55,6
define('GTT_ABSCENCE_ID_RTT', 2);
define('GTT_ABSCENCE_ID_MALADIE', 3);
define('GTT_ABSCENCE_ID_GREVE', 4);
// TODO : mettre cette valeur dans la table utilisateur
define('GTT_SEMAINE_JOUR_W_NBRE', '1,2,3,4,5');
 
// +------------------------------------------------------------------------------------------------------+
// Débogage