mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Zeitaufzeichnung nach differenzierten Aktivitäten
This commit is contained in:
@@ -82,7 +82,7 @@ $datum = new datum();
|
||||
|
||||
$fieldheadings = array(
|
||||
'id' => $p->t("zeitaufzeichnung/id"), 'user' => $p->t("zeitaufzeichnung/user"), 'projekt' => $p->t("zeitaufzeichnung/projekt"),
|
||||
'oe1' => $p->t("zeitaufzeichnung/oe").'1', 'oe2' => $p->t("zeitaufzeichnung/oe").'2', 'aktivitaet' => $p->t("zeitaufzeichnung/aktivitaet"),
|
||||
'oe1' => $p->t("zeitaufzeichnung/oe"), 'oe2' => $p->t("zeitaufzeichnung/oe").'2', 'aktivitaet' => $p->t("zeitaufzeichnung/aktivitaet"),
|
||||
'service' => $p->t("zeitaufzeichnung/service"), 'start' => $p->t("zeitaufzeichnung/start"), 'ende' => $p->t("zeitaufzeichnung/ende"),
|
||||
'dauer' => $p->t("zeitaufzeichnung/dauer"), 'kunde' => $p->t("zeitaufzeichnung/kunde"), 'beschreibung' => $p->t("global/beschreibung"), 'aktion' => $p->t("global/aktion"),
|
||||
'datum' => $p->t("global/datum")
|
||||
@@ -91,12 +91,12 @@ $fieldheadings = array(
|
||||
if ($rechte->isBerechtigt('basis/servicezeitaufzeichnung'))
|
||||
{
|
||||
$za_simple = 0;
|
||||
$activities = array('Design', 'Operativ', 'Betrieb', 'Pause', 'Lehre', 'Arztbesuch', 'DienstreiseMT', 'Behoerde', 'Ersatzruhe');
|
||||
$activities = array('Design', 'Operativ', 'Betrieb', 'Pause', 'FuE', 'Lehre', 'Arztbesuch', 'DienstreiseMT', 'Behoerde', 'Ersatzruhe');
|
||||
}
|
||||
else
|
||||
{
|
||||
$za_simple = 1;
|
||||
$activities = array('Arbeit', 'Pause', 'Lehre', 'Arztbesuch', 'DienstreiseMT', 'Behoerde', 'Ersatzruhe');
|
||||
$activities = array('Admin', 'FuE','Lehre', 'Pause', 'Arztbesuch', 'DienstreiseMT', 'Behoerde', 'Ersatzruhe');
|
||||
}
|
||||
|
||||
$activities_str = "'".implode("','", $activities)."'";
|
||||
@@ -850,7 +850,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
echo '</SELECT><!--<input type="button" value="'.$p->t("zeitaufzeichnung/uebersicht").'" onclick="loaduebersicht();">--></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
if($za_simple == 0)
|
||||
if($za_simple >= 0)
|
||||
{
|
||||
//OE_KURZBZ_1
|
||||
echo '<tr><td nowrap>'.$p->t("zeitaufzeichnung/organisationseinheiten").'</td>
|
||||
@@ -880,33 +880,36 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
echo '<option value="'.$db->convert_html_chars($row->oe_kurzbz).'" '.$selected.' '.$class.'>'.$db->convert_html_chars($row->bezeichnung.' ('.$row->organisationseinheittyp_kurzbz).')</option>';
|
||||
}
|
||||
echo '</SELECT> ';
|
||||
|
||||
//OE_KURZBZ_2
|
||||
echo '<SELECT style="width:200px;" name="oe_kurzbz_2">';
|
||||
echo '<option value="">-- '.$p->t("zeitaufzeichnung/keineAuswahl").' --</option>';
|
||||
|
||||
$trennlinie = true;
|
||||
|
||||
foreach ($oe->result as $row)
|
||||
if($za_simple == 0)
|
||||
{
|
||||
if($oe_kurzbz_2 == $row->oe_kurzbz)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
//OE_KURZBZ_2
|
||||
echo '<SELECT style="width:200px;" name="oe_kurzbz_2">';
|
||||
echo '<option value="">-- '.$p->t("zeitaufzeichnung/keineAuswahl").' --</option>';
|
||||
|
||||
if($row->aktiv)
|
||||
$class='';
|
||||
else
|
||||
$class='class="inaktiv"';
|
||||
$trennlinie = true;
|
||||
|
||||
if ($row->anzahl =='0' && $trennlinie==true)
|
||||
foreach ($oe->result as $row)
|
||||
{
|
||||
echo '<OPTION value="" disabled="disabled">------------------------</OPTION>';
|
||||
$trennlinie = false;
|
||||
if($oe_kurzbz_2 == $row->oe_kurzbz)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
|
||||
if($row->aktiv)
|
||||
$class='';
|
||||
else
|
||||
$class='class="inaktiv"';
|
||||
|
||||
if ($row->anzahl =='0' && $trennlinie==true)
|
||||
{
|
||||
echo '<OPTION value="" disabled="disabled">------------------------</OPTION>';
|
||||
$trennlinie = false;
|
||||
}
|
||||
echo '<option value="'.$db->convert_html_chars($row->oe_kurzbz).'" '.$selected.' '.$class.'>'.$db->convert_html_chars($row->bezeichnung.' ('.$row->organisationseinheittyp_kurzbz).')</option>';
|
||||
}
|
||||
echo '<option value="'.$db->convert_html_chars($row->oe_kurzbz).'" '.$selected.' '.$class.'>'.$db->convert_html_chars($row->bezeichnung.' ('.$row->organisationseinheittyp_kurzbz).')</option>';
|
||||
echo '</SELECT>';
|
||||
}
|
||||
echo '</SELECT></td></tr>';
|
||||
echo '</td></tr>';
|
||||
}
|
||||
|
||||
//Aktivitaet
|
||||
@@ -1101,7 +1104,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
{
|
||||
//Uebersichtstabelle
|
||||
$woche=date('W');
|
||||
$colspan=($za_simple)?10:13;
|
||||
$colspan=($za_simple)?11:13;
|
||||
echo '
|
||||
<table id="t1" class="" style="width:100%">
|
||||
|
||||
@@ -1184,7 +1187,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
|
||||
$tagessaldo = $tagessaldo-$pausesumme;
|
||||
$tagessaldo = date('H:i', ($tagessaldo));
|
||||
$colspan = ($za_simple)?4:7;
|
||||
$colspan = ($za_simple)?5:7;
|
||||
echo '<tr id="tag_row_'.$datum->formatDatum($tag,'d_m_Y').'"><td '.$style.' colspan="'.$colspan.'")>';
|
||||
|
||||
// Zusaetzlicher span fuer Addon Informationen
|
||||
@@ -1259,7 +1262,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
|
||||
<!--</table>-->';
|
||||
|
||||
$colspan=($za_simple)?10:13;
|
||||
$colspan=($za_simple)?11:13;
|
||||
echo '
|
||||
<!--<table id="t'.$datumwoche.'" class="tablesorter">-->
|
||||
<tr><th colspan="'.$colspan.'"> </th></tr>
|
||||
@@ -1281,7 +1284,7 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
// Diestreisen NEU
|
||||
if (array_key_exists($datumtag, $dr_arr))
|
||||
{
|
||||
$colspan=($za_simple)?4:7;
|
||||
$colspan=($za_simple)?5:7;
|
||||
echo '<tr style="background-color: #aabb99"><td colspan="'.$colspan.'">'.$p->t('zeitaufzeichnung/dienstreise');
|
||||
if (array_key_exists('start', $dr_arr[$datumtag]) && !array_key_exists('ende', $dr_arr[$datumtag]))
|
||||
echo ' '.$p->t('global/beginn');
|
||||
@@ -1339,10 +1342,10 @@ if($projekt->getProjekteMitarbeiter($user, true))
|
||||
<td '.$style.'>'.$db->convert_html_chars($row->zeitaufzeichnung_id).'</td>
|
||||
<td '.$style.'>'.$db->convert_html_chars($row->uid).'</td>
|
||||
<td '.$style.'>'.$db->convert_html_chars($row->projekt_kurzbz).'</td>';
|
||||
echo '<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_1).'</td>';
|
||||
if(!$za_simple)
|
||||
{
|
||||
echo '<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_1).'</td>
|
||||
<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_2).'</td>';
|
||||
echo '<td '.$style.' > '.$db->convert_html_chars($row->oe_kurzbz_2).'</td>';
|
||||
}
|
||||
echo '<td '.$style.'>'.$db->convert_html_chars($row->aktivitaet_kurzbz).'</td>';
|
||||
if(!$za_simple)
|
||||
@@ -1417,11 +1420,11 @@ function printTableHeadings($fieldheadings, $za_simple = false){
|
||||
echo '<tr>
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['id'].'</th>
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['user'].'</th>
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['projekt'].'</th>';
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['projekt'].'</th>
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['oe1'].'</th>';
|
||||
if (!$za_simple)
|
||||
{
|
||||
echo '<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['oe1'].'</th>
|
||||
<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['oe2'].'</th>';
|
||||
echo '<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['oe2'].'</th>';
|
||||
}
|
||||
echo '<th style="background-color:#DCE4EF" align="center">'.$fieldheadings['aktivitaet'].'</th>';
|
||||
if (!$za_simple)
|
||||
@@ -1477,7 +1480,7 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
$datum = new datum();
|
||||
$csvData = array();
|
||||
//headers schreiben
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'])
|
||||
$csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'])
|
||||
: array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung']);
|
||||
foreach ($rawdata as $zeitauf)
|
||||
{
|
||||
@@ -1491,7 +1494,7 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false)
|
||||
if($za_simple)
|
||||
{
|
||||
$csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'),
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->aktivitaet_kurzbz, $beschreibung);
|
||||
$bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user