1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
for ($i=1; $i<53; $i++)
{
echo "<tr align='center'>";
echo "<td>";
echo "$i";
echo "</td>";
$query_variation="select SUM(minutes) as TOTAL,dossier, date from dossier where tech='vfa' GROUP BY dossier ";
$result_variation=mysql_query($query_variation);
$rtt_acquis_0 = 0; // total pas rtt
$rtt_acquis_1 = 0; // total rtt
while($row = mysql_fetch_assoc($result_variation))
{
if($row["dossier"] != 'RTT-P')
{
$rtt_acquis_0+=$row["TOTAL"];
}
if($row["dossier"] == 'RTT-P')
{
$rtt_acquis_1+=$row["TOTAL"];
}
}
echo "<td>";
$rtt_acquis_0_fin=$rtt_acquis_0/60;
echo round($rtt_acquis_0_fin)." h";
echo "</td>";
echo "<td>";
$rtt_acquis_1_fin=$rtt_acquis_1/60;
echo round($rtt_acquis_1_fin)." h";
echo "</td>";
echo "<td>";
$cumul=round($rtt_acquis_0_fin)-round($rtt_acquis_1_fin)." h";
echo $cumul;
echo "</td>";
echo "</tr>";
}
echo "</table></center>"; |
Partager