fhiiqm/report/prozess_report.php
changeset 41 9c668cd391fa
parent 36 4411d3239444
equal deleted inserted replaced
40:6f4b105daa24 41:9c668cd391fa
    88 
    88 
    89     if ($search && $_GET['s'] != 2)
    89     if ($search && $_GET['s'] != 2)
    90     {    
    90     {    
    91         echo "<span class='sc'>";
    91         echo "<span class='sc'>";
    92         echo "<br />&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/pz_report.php\" target=\"_self\" title=\"Berichte\" class='sc'>&laquo; zur Berichts&uuml;bersicht</a>";
    92         echo "<br />&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/pz_report.php\" target=\"_self\" title=\"Berichte\" class='sc'>&laquo; zur Berichts&uuml;bersicht</a>";
    93         echo "&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"RAG GMV\" class=\"sc\">neuer Bericht Projekte</a>\n";    
    93         echo "&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"RAG GMV\" class=\"sc\">neuer Bericht Projekte - Details</a>\n";    
    94         echo "</span>";
    94         echo "</span>";
    95     }
    95     }
    96     echo "<div align='center'>\n";
    96     echo "<div align='center'>\n";
    97     echo "<p><b>Bericht Projekte - Details</b></p>\n";
    97     echo "<p><b>Bericht Projekte - Details</b></p>\n";
    98     echo "</div>\n";
    98     echo "</div>\n";
   233         if ($pz["pgid"] > "-1")
   233         if ($pz["pgid"] > "-1")
   234         { 
   234         { 
   235             if ($where) $bd = $bind; else $bd = "";
   235             if ($where) $bd = $bind; else $bd = "";
   236             $where .= " $bd prod_group_ID = ".$pz["pgid"];
   236             $where .= " $bd prod_group_ID = ".$pz["pgid"];
   237             $prodg = $dbc->querySingleItem("SELECT prod_group_name FROM fhiiqm.Produkt_Gruppe WHERE prod_group_ID =".$pz["pgid"]);
   237             $prodg = $dbc->querySingleItem("SELECT prod_group_name FROM fhiiqm.Produkt_Gruppe WHERE prod_group_ID =".$pz["pgid"]);
   238             $krit = " [Produktgruppe = '$prodg'] ";
   238             $krit .= $bd." [Produktgruppe = '$prodg'] ";
   239         }    
   239         }    
   240 /*        if ($pz["va"])
   240 /*        if ($pz["va"])
   241         { 
   241         { 
   242             if ($where) $bd = $bind; else $bd = "";
   242             if ($where) $bd = $bind; else $bd = "";
   243             $where .= " $bd verantw LIKE '".$pz["va"] . "%' ";
   243             $where .= " $bd verantw LIKE '".$pz["va"] . "%' ";
   250         }   
   250         }   
   251         if ($pz["sort1"]>"-1" || $pz["sort2"]>"-1")
   251         if ($pz["sort1"]>"-1" || $pz["sort2"]>"-1")
   252         {
   252         {
   253             if ($pz["sort1"]>"-1") $ord  = " ORDER BY " . $pz["sort1"];
   253             if ($pz["sort1"]>"-1") $ord  = " ORDER BY " . $pz["sort1"];
   254             if ($pz["sort2"]>"-1") $ord .= ",".$pz["sort2"];
   254             if ($pz["sort2"]>"-1") $ord .= ",".$pz["sort2"];
   255             $ord .= ",step_sort ";
   255             $ord .= ",proz_bez,proz_ID,step_sort ";
   256         }
   256         }
   257         else $ord = " ORDER BY proz_bez,step_sort";
   257         else $ord = " ORDER BY proz_bez,proz_ID,step_sort";
   258         if ($where) $where = " WHERE $where";
   258         if ($where) $where = " WHERE $where";
   259         
   259         
   260         $sql .= $where . $ord .$lim;
   260         $sql .= $where . $ord .$lim;
   261 //echo "sql = $sql<br />\n";
   261 //echo "sql = $sql<br />\n";
   262         $result = $dbc -> queryObjectArray($sql);
   262         $result = $dbc -> queryObjectArray($sql);
   331                             echo "<th><i>Status</i></th>";
   331                             echo "<th><i>Status</i></th>";
   332                             echo "<th colspan='8'><i>Bemerkung</i></th></tr>\n";
   332                             echo "<th colspan='8'><i>Bemerkung</i></th></tr>\n";
   333                         }
   333                         }
   334                         
   334                         
   335                     }
   335                     }
       
   336                     
   336         			if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
   337         			if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
   337                     echo "<tr bgcolor='" . $bg . "' background='../img/linelightblue.gif'>";
   338                     echo "<tr bgcolor='" . $bg . "' background='../img/linelightblue.gif'>";
   338                     echo "<td>$row->proz_bez</td>";
   339                     echo "<td>$row->proz_bez</td>";
   339                     echo "<td>$row->proz_bez_l</td>";
   340                     echo "<td>$row->proz_bez_l</td>";
   340                     echo "<td>$row->prod_name</td>";
   341                     echo "<td>$row->prod_name</td>";
   367                         echo "<td class=\"left\">" . $dat->format('d.m.Y')."</td>";
   368                         echo "<td class=\"left\">" . $dat->format('d.m.Y')."</td>";
   368                     }
   369                     }
   369                     else  echo "<td>&nbsp;</td>";
   370                     else  echo "<td>&nbsp;</td>";
   370                     if ($row->proz_kosten>"&nbsp;") echo "<td class='right'>".number_format($row->proz_kosten,2,",","."); else echo "<td>&nbsp;</td>";       
   371                     if ($row->proz_kosten>"&nbsp;") echo "<td class='right'>".number_format($row->proz_kosten,2,",","."); else echo "<td>&nbsp;</td>";       
   371                     echo "<td>$row->proz_bem</td></tr>\n";
   372                     echo "<td>$row->proz_bem</td></tr>\n";
       
   373                     // betroffenen Arbeitsgruppen
       
   374                     $rag = array();
       
   375                     $sqlag = "SELECT rag_bez FROM Proz_RaumArbGruppe p 
       
   376                                 LEFT OUTER JOIN RaumArb_Gruppe r ON p.rag_ID=r.rag_ID WHERE p.proz_ID = ".$row->proz_ID . " ORDER BY 1";
       
   377                     $rrag = $dbc -> queryObjectArray($sqlag);
       
   378                     foreach ($rrag as $ro)
       
   379                         $rag[] = $ro->rag_bez;
       
   380                     if (is_array($rag) && count($rag)>0)
       
   381                     {
       
   382                         $srag = implode(" | ", $rag);
       
   383                         echo "<tr bgcolor='" . $bg . "' background='../img/linelightblue.gif'><td>&nbsp;</td><td>betroffene Arbeitsgruppen:</td>";
       
   384                         echo "<td colspan='12'>$srag</td></tr>\n";
       
   385                     } 
   372                     echo "<tr bgcolor='" . $bg . "'>";
   386                     echo "<tr bgcolor='" . $bg . "'>";
   373                     echo "<td colspan='2'>&nbsp;</td>";
   387                     echo "<td colspan='2'>&nbsp;</td>";
   374                     echo "<td colspan='3'><i>$row->proz_step</i></td>";
   388                     echo "<td colspan='3'><i>$row->proz_step</i></td>";
   375                     echo "<td><i>$row->step_stat</i></td>";
   389                     echo "<td><i>$row->step_stat</i></td>";
   376                     echo "<td colspan='8'><i>$row->step_bem</i></td></tr>\n";
   390                     echo "<td colspan='8'><i>$row->step_bem</i></td></tr>\n";
       
   391                     
   377            
   392            
   378                 }
   393                 }
   379                 if ($vproz == $row->proz_ID && $vstep != $row->proz_step_ID)
   394                 if ($vproz == $row->proz_ID && $vstep != $row->proz_step_ID)
   380                 {
   395                 {
   381                     echo "<tr bgcolor='" . $bg . "'>";
   396                     echo "<tr bgcolor='" . $bg . "'>";
   416 
   431 
   417         if ($search != 2)
   432         if ($search != 2)
   418         {    
   433         {    
   419             echo "<span class='sc'>";
   434             echo "<span class='sc'>";
   420             echo "<br />&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/pz_report.php\" target=\"_self\" title=\"Berichte\" class='sc'>&laquo; zur Berichts&uuml;bersicht</a>";
   435             echo "<br />&nbsp;&nbsp;&nbsp;<a href=\"/fhiiqm/pz_report.php\" target=\"_self\" title=\"Berichte\" class='sc'>&laquo; zur Berichts&uuml;bersicht</a>";
   421             echo "&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"Projekt\" class=\"sc\">neuer Bericht Projekte</a>\n";    
   436             echo "&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href=\"" . $_SERVER["PHP_SELF"] . "\" target=\"_self\" title=\"Projekt\" class=\"sc\">neuer Bericht Projekte - Details</a>\n";    
   422             echo "</span>";
   437             echo "</span>";
   423         }
   438         }
   424         else
   439         else
   425             echo "<a href='javascript:history.back();' onMouseOver=\"{window.status='Zur&uuml;ck'; return true;}\">&laquo; Zur&uuml;ck</a>";
   440             echo "<a href='javascript:history.back();' onMouseOver=\"{window.status='Zur&uuml;ck'; return true;}\">&laquo; Zur&uuml;ck</a>";
   426     }
   441     }