mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 08:22:17 +00:00
Merge branch 'master' into feature/Anrechnungen_NEU
This commit is contained in:
@@ -415,6 +415,5 @@ class datum
|
||||
{
|
||||
return intval(substr($timestring, 0, 2)) + intval(substr($timestring, 3, 2)) / 60;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -335,7 +335,7 @@ class projektbetreuer extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all projektarbeiten by person (only with stundensatz > 0)
|
||||
* Retrieves all projektarbeiten by person
|
||||
* @param $person_id
|
||||
* @return boolean If succeeded true and result-array with objects of each projektarbeit of the person.
|
||||
*/
|
||||
@@ -349,8 +349,6 @@ class projektbetreuer extends basis_db
|
||||
FROM
|
||||
lehre.tbl_projektbetreuer
|
||||
WHERE
|
||||
(stundensatz IS NOT NULL) AND (stundensatz > 0)
|
||||
AND
|
||||
person_id =' . $this->db_add_param($person_id, FHC_INTEGER);
|
||||
|
||||
if ($this->db_query($qry))
|
||||
|
||||
+83
-11
@@ -86,7 +86,7 @@ class ressource extends basis_db
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
return true;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ class ressource extends basis_db
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
//var_dump($this->result);
|
||||
@@ -174,7 +174,7 @@ class ressource extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
$obj->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$obj->projekt_ressource_id= $row->projekt_ressource_id;
|
||||
|
||||
@@ -189,8 +189,8 @@ class ressource extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Lädt die Projektressource
|
||||
@@ -203,15 +203,15 @@ class ressource extends basis_db
|
||||
$this->result=array();
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->ressource_id = $row->ressource_id;
|
||||
$this->beschreibung = $row->beschreibung;
|
||||
$this->aufwand = $row->aufwand;
|
||||
$this->aufwand = $row->aufwand;
|
||||
$this->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$this->projekt_ressource_id= $row->projekt_ressource_id;
|
||||
$this->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$this->projekt_ressource_id= $row->projekt_ressource_id;
|
||||
$this->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$this->projektphase_id = $row->projektphase_id;
|
||||
return true;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ class ressource extends basis_db
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -256,7 +256,7 @@ class ressource extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
$obj->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$obj->projekt_ressource_id = $row->projekt_ressource_id;
|
||||
$this->result[] = $obj;
|
||||
@@ -688,5 +688,77 @@ class ressource extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht eine Ressource zu Projekt Zuordnung
|
||||
* @param type $ressource_id
|
||||
* @param type $projekt_kurzbz
|
||||
* @return boolean
|
||||
*/
|
||||
public function deleteFromProjektWithProjektRessourceId($ressource_id, $projekt_kurzbz, $project_ressource_id)
|
||||
{
|
||||
if($ressource_id == '' || !is_numeric($ressource_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
/*$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz, FHC_STRING, false).';';
|
||||
*/
|
||||
$qry="
|
||||
DELETE FROM fue.tbl_projekt_ressource pr
|
||||
USING fue.tbl_ressource r
|
||||
WHERE r.ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false). "
|
||||
AND pr.projekt_ressource_id=".$this->db_add_param($project_ressource_id, FHC_INTEGER, false). "
|
||||
AND pr.projekt_kurzbz=".$this->db_add_param($projekt_kurzbz, FHC_STRING, false).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht eine Ressource zu Phase Zuordnung
|
||||
* @param type $ressource_id
|
||||
* @param type $projekt_kurzbz
|
||||
* @return boolean
|
||||
*/
|
||||
public function deleteFromPhaseWithProjektRessourceId($ressource_id, $projektphase_id, $project_ressource_id)
|
||||
{
|
||||
if($ressource_id == '' || !is_numeric($ressource_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
if($projektphase_id == '' || !is_numeric($projektphase_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
/*$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER, false).';';
|
||||
*/
|
||||
$qry="
|
||||
DELETE FROM fue.tbl_projekt_ressource pr
|
||||
USING fue.tbl_ressource r
|
||||
WHERE r.ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false). "
|
||||
AND pr.projekt_ressource_id=".$this->db_add_param($project_ressource_id, FHC_INTEGER, false). "
|
||||
AND pr.projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER, false).';';
|
||||
if($this->db_query($qry))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user